diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7cc88f0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.sol linguist-language=Solidity \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4a3dcbb --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +node_modules + +# Buidler files +cache +artifacts +build + +# Test codegen +codegen + +# Secrets +secretsManager.js + +# rescript +.merlin +.bsb.lock +lib + +coverage.json + +coverage-all +coverage-unit +coverage-integration + +abis +ast + +# No need to keep javascript files in contract tests +test/**/*.js + +test/library/contracts/* +!test/library/contracts/.gitkeep +test/library/smock/* +!test/library/smock/.gitkeep + +contracts/testing/generated/* + +contract-docs + +deployments/* +!deployments/mumbai +!deployments/polygon + +deploymentSummary.json diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 0000000..146399c --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,7 @@ +overrides: + - files: "*.sol" + options: + printWidth: 100 + tabWidth: 2 + explicitTypes: "always" + compiler: "0.8.3" diff --git a/.solcover.js b/.solcover.js new file mode 100644 index 0000000..f204d2c --- /dev/null +++ b/.solcover.js @@ -0,0 +1,79 @@ +let coverageReportOutputDirectory = "coverage-all" + +let extraFilesToIgnore = [] + +let isUnitTests = + !!process.env.DONT_RUN_INTEGRATION_TESTS && process.env.DONT_RUN_INTEGRATION_TESTS.toUpperCase() == "TRUE" +let isIntegrationTests = + !!process.env.DONT_RUN_UNIT_TESTS && process.env.DONT_RUN_UNIT_TESTS.toUpperCase() == "TRUE" +if (isUnitTests) { + coverageReportOutputDirectory = "coverage-unit" + extraFilesToIgnore = [ + "FloatToken.sol", + "SyntheticToken.sol", + "TokenFactory.sol", + "Treasury_v0.sol", + ] +} else if (isIntegrationTests) { + coverageReportOutputDirectory = "coverage-integration" +} else if (!isUnitTests && !isIntegrationTests) { // if it is neither then it is both (wierd logic but it works) + // Don't do anything in this case +} else { + throw Error("Invalid config, don't set both 'DONT_RUN_INTEGRATION_TESTS' and 'DONT_RUN_UNIT_TESTS' to true") +} + +module.exports = { + skipFiles: [ + "FloatCapital_v0.sol", + "Treasury_v0.sol", + "AlphaTestFLT.sol", + "StakingStrategy.sol", + "StrategyToken.sol", + "SyntheticTokenUpgradeable.sol", + "TreasuryAlpha.sol", + "YieldManagerAave.sol", + + "deployment/UUPSProxy.sol", + + "interfaces/IFloatToken.sol", + "interfaces/ILongShort.sol", + "interfaces/IOracleManager.sol", + "interfaces/IStaker.sol", + "interfaces/ISyntheticToken.sol", + "interfaces/ITokenFactory.sol", + "interfaces/IYieldManager.sol", + "interfaces/aave/DataTypes.sol", + "interfaces/aave/ILendingPool.sol", + "interfaces/aave/ILendingPoolAddressesProvider.sol", + + "mocks/BandOracleMock.sol", + "mocks/Dai.sol", + "mocks/MockERC20.sol", + "mocks/OracleManagerMock.sol", + "mocks/YieldManagerMock.sol", + "mocks/AggregatorV3Mock.sol", + "mocks/ERC20Mock.sol", + "mocks/LendingPoolAaveMock.sol", + "mocks/LendingPoolAddressesProviderMock.sol", + "mocks/LendingPoolAddressesProvider.sol", + + "oracles/OracleManagerChainlink.sol", + "oracles/OracleManagerEthKillerChainlink.sol", + "oracles/OracleManagerEthKillerChainlinkTestnet.sol", + "oracles/OracleManagerEthVsBtc.sol", + "oracles/OracleManagerFlippening_V0.sol", + "oracles/OracleManagerChainlinkTestnet.sol", + "oracles/OracleManagerFlipp3ning.sol", + + "testing/StakerInternalStateSetters.sol", + "testing/LongShortInternalStateSetters.sol", + + "testing/generated/LongShortForInternalMocking.sol", + "testing/generated/StakerForInternalMocking.sol", + "testing/generated/LongShortMockable.sol", + "testing/generated/StakerMockable.sol", + ].concat(extraFilesToIgnore), + istanbulFolder: coverageReportOutputDirectory, + configureYulOptimizer: true +}; + diff --git a/.solhint.json b/.solhint.json new file mode 100644 index 0000000..d7c3de9 --- /dev/null +++ b/.solhint.json @@ -0,0 +1,3 @@ +{ + "extends": "solhint:default" +} diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..a3b3ab6 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,100 @@ +Business Source License 1.1 + +License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. +"Business Source License" is a trademark of MariaDB Corporation Ab. + +----------------------------------------------------------------------------- + +Parameters + +Licensor: Float Capital + +Licensed Work: Float Capital + The Licensed Work is (c) 2021 Float Capital + +Additional Use Grant: Any uses listed and defined at + https://docs.float.capital/docs + +Change Date: The earlier of 2024-06-01 or a date specified at + https://docs.float.capital/docs + +Change License: GNU General Public License v2.0 or later + +----------------------------------------------------------------------------- + +Terms + +The Licensor hereby grants you the right to copy, modify, create derivative +works, redistribute, and make non-production use of the Licensed Work. The +Licensor may make an Additional Use Grant, above, permitting limited +production use. + +Effective on the Change Date, or the fourth anniversary of the first publicly +available distribution of a specific version of the Licensed Work under this +License, whichever comes first, the Licensor hereby grants you rights under +the terms of the Change License, and the rights granted in the paragraph +above terminate. + +If your use of the Licensed Work does not comply with the requirements +currently in effect as described in this License, you must purchase a +commercial license from the Licensor, its affiliated entities, or authorized +resellers, or you must refrain from using the Licensed Work. + +All copies of the original and modified Licensed Work, and derivative works +of the Licensed Work, are subject to this License. This License applies +separately for each version of the Licensed Work and the Change Date may vary +for each version of the Licensed Work released by Licensor. + +You must conspicuously display this License on each original or modified copy +of the Licensed Work. If you receive the Licensed Work in original or +modified form from a third party, the terms and conditions set forth in this +License apply to your use of that work. + +Any use of the Licensed Work in violation of this License will automatically +terminate your rights under this License for the current and all other +versions of the Licensed Work. + +This License does not grant you any right in any trademark or logo of +Licensor or its affiliates (provided that you may use a trademark or logo of +Licensor as expressly required by this License). + +TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON +AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, +EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND +TITLE. + +MariaDB hereby grants you permission to use this License’s text to license +your works, and to refer to it using the trademark "Business Source License", +as long as you comply with the Covenants of Licensor below. + +----------------------------------------------------------------------------- + +Covenants of Licensor + +In consideration of the right to use this License’s text and the "Business +Source License" name and trademark, Licensor covenants to MariaDB, and to all +other recipients of the licensed work to be provided by Licensor: + +1. To specify as the Change License the GPL Version 2.0 or any later version, + or a license that is compatible with GPL Version 2.0 or a later version, + where "compatible" means that software provided under the Change License can + be included in a program with software provided under GPL Version 2.0 or a + later version. Licensor may specify additional Change Licenses without + limitation. + +2. To either: (a) specify an additional grant of rights to use that does not + impose any additional restriction on the right granted in this License, as + the Additional Use Grant; or (b) insert the text "None". + +3. To specify a Change Date. + +4. Not to modify this License in any other way. + +----------------------------------------------------------------------------- + +Notice + +The Business Source License (this document, or the "License") is not an Open +Source license. However, the Licensed Work will eventually be made available +under an Open Source License, as stated in this License. \ No newline at end of file diff --git a/README.md b/README.md index b8bdce9..26ee33b 100644 --- a/README.md +++ b/README.md @@ -1 +1,45 @@ -# contracts +## General + +## Testing + +the current javascript test are going to be refactored into rescript a some point + +## Commands + +format the solidity code: + +```bash +yarn format-contracts +``` + +lint the solidity code: + +```bash +yarn lint-contracts +``` + +## Network forking + +It is sometimes useful to fork the network to test deployments that rely on other contracts etc before running those deployments on production networks. Note, network forking has only been tested with alchemy RPC API endpoints, but others may work too. + +To use this feature run `HARDHAT_FORK= yarn deploy`. So for example to run this on mumbai run `HARDHAT_FORK="mumbai" yarn deploy`. + +You can test that this is working correctly by validating some data from the blockchain such as the blocknumber or a token balance. + +eg you could use code like below.: + +```javascript +let pTokenBalance = await paymentToken.balanceOf(accounts[2].address); +console.log( + "The paymentToken balance is", + accounts[2].address, + pTokenBalance.toString() +); + +let blockNumber = await accounts[0].provider.getBlockNumber(); +console.log("The balance is", blockNumber.toString()); +``` + +## Troubleshooting + +Please add your known troubles ;) diff --git a/bsconfig.json b/bsconfig.json new file mode 100644 index 0000000..f10f7e6 --- /dev/null +++ b/bsconfig.json @@ -0,0 +1,28 @@ +{ + "name": "float-contracts", + "namespace": false, + "bs-dependencies": [], + "ppx-flags": [ + "bs-let/ppx" + ], + "sources": [ + { + "dir": "test", + "subdirs": true + }, + { + "dir": "deployTests", + "subdirs": true + } + ], + "package-specs": { + "module": "commonjs", + "in-source": true + }, + "warnings": { + "error": "+101+8" + }, + "bsc-flags": [ + "-open Belt" + ] +} diff --git a/contracts/AlphaTestFLT.sol b/contracts/AlphaTestFLT.sol new file mode 100644 index 0000000..5f1618d --- /dev/null +++ b/contracts/AlphaTestFLT.sol @@ -0,0 +1,171 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol"; + +import "./interfaces/IFloatToken.sol"; + +import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; + +/** + @title FloatToken + @notice The Float Token is the governance token for the Float Capital protocol + */ +contract AlphaTestFLT is + IFloatToken, + Initializable, + ERC20Upgradeable, + ERC20BurnableUpgradeable, + PausableUpgradeable, + AccessControlUpgradeable, + ERC20PermitUpgradeable, + ERC20VotesUpgradeable, + UUPSUpgradeable +{ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); + + address public treasury; + + /** + @notice Initialize the Float Token with relevant + @dev This function is called `initialize` to differentiate it from `initialize(string,string)` in the parent contract which should NOT be called to initialize this contract. + @param name The name of the Float governance token + @param symbol The ticker representing the token + @param stakerAddress The staker contract that controls minting of the token + */ + function initialize( + string calldata name, + string calldata symbol, + address stakerAddress, + address treasuryAddress + ) external initializer { + __ERC20_init(name, symbol); + __ERC20Burnable_init(); + __Pausable_init(); + __AccessControl_init(); + __ERC20Permit_init(name); + __UUPSUpgradeable_init(); + + treasury = treasuryAddress; + + renounceRole(DEFAULT_ADMIN_ROLE, msg.sender); + renounceRole(MINTER_ROLE, msg.sender); + + _setupRole(DEFAULT_ADMIN_ROLE, stakerAddress); + _setupRole(MINTER_ROLE, stakerAddress); + + _setupRole(PAUSER_ROLE, msg.sender); + _setupRole(UPGRADER_ROLE, msg.sender); + + // Token starts as paused + _pause(); + } + + /*╔═══════════════════════════════════════════════════════════════════╗ + ║ FUNCTIONS INHERITED BY ERC20PresetMinterPauserUpgradeable ║ + ╚═══════════════════════════════════════════════════════════════════╝*/ + + /** + @notice Mints an amount of Float tokens for an address. + @dev Can only be called by addresses with a MINTER_ROLE. + This should correspond to the Staker contract. + @param to The address for which to mint the tokens for. + @param amount Amount of synthetic tokens to mint in wei. + */ + function mint(address to, uint256 amount) external override(IFloatToken) onlyRole(MINTER_ROLE) { + _mint(to, amount); + } + + /** + @notice modify token functionality so that a pausing this token doesn't affect minting + @dev Pause functionality in the open zeppelin ERC20PresetMinterPauserUpgradeable comes from the below function. + We override it to exclude anyone with the minter role (ie the Staker contract) + @param from address tokens are being sent from + @param to address tokens are being sent to + @param amount amount of tokens being sent + */ + function _beforeTokenTransfer( + address from, + address to, + uint256 amount + ) internal virtual override { + require(!paused() || hasRole(MINTER_ROLE, _msgSender()), "Paused and not minter"); + + super._beforeTokenTransfer(from, to, amount); + } + + function pause() external onlyRole(PAUSER_ROLE) { + _pause(); + } + + function unpause() external onlyRole(PAUSER_ROLE) { + _unpause(); + } + + function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {} + + function _afterTokenTransfer( + address from, + address to, + uint256 amount + ) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) { + super._afterTokenTransfer(from, to, amount); + } + + function _mint(address to, uint256 amount) + internal + override(ERC20Upgradeable, ERC20VotesUpgradeable) + { + super._mint(to, amount); + } + + function _burn(address account, uint256 amount) + internal + override(ERC20Upgradeable, ERC20VotesUpgradeable) + { + super._burn(account, amount); + } + + function totalSupply() + public + view + virtual + override(ERC20Upgradeable, IFloatToken) + returns (uint256) + { + return ERC20Upgradeable.totalSupply(); + } + + function transfer(address recipient, uint256 amount) + public + virtual + override(ERC20Upgradeable, IFloatToken) + returns (bool) + { + return ERC20Upgradeable.transfer(recipient, amount); + } + + function burnFrom(address account, uint256 amount) + public + virtual + override(ERC20BurnableUpgradeable, IFloatToken) + { + // If the burn comes from the treasury, let it happen automatically. + // This is only for the alpha launch, no need to add these permissions to the main FLT deployment. + if (msg.sender == treasury) { + _burn(account, amount); + } else { + ERC20BurnableUpgradeable.burnFrom(account, amount); + } + } +} diff --git a/contracts/FloatCapital_v0.sol b/contracts/FloatCapital_v0.sol new file mode 100644 index 0000000..d3ef9d7 --- /dev/null +++ b/contracts/FloatCapital_v0.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "./abstract/AccessControlledAndUpgradeable.sol"; + +/** @title Float Capital Contract */ +contract FloatCapital_v0 is AccessControlledAndUpgradeable { + /*╔═════════════════════════════╗ + ║ CONTRACT SETUP ║ + ╚═════════════════════════════╝*/ + + function initialize(address _admin) external initializer { + _AccessControlledAndUpgradeable_init(_admin); + } + + /** A percentage of float token to accrue here for project + development */ +} diff --git a/contracts/FloatToken.sol b/contracts/FloatToken.sol new file mode 100644 index 0000000..2a43f0e --- /dev/null +++ b/contracts/FloatToken.sol @@ -0,0 +1,160 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol"; + +import "./interfaces/IFloatToken.sol"; + +import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; + +/** + @title FloatToken + @notice The Float Token is the governance token for the Float Capital protocol + */ +contract FloatToken is + IFloatToken, + Initializable, + ERC20Upgradeable, + ERC20BurnableUpgradeable, + PausableUpgradeable, + AccessControlUpgradeable, + ERC20PermitUpgradeable, + ERC20VotesUpgradeable, + UUPSUpgradeable +{ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); + + /** + @notice Initialize the Float Token with relevant + @dev This function is called `initialize` to differentiate it from `initialize(string,string)` in the parent contract which should NOT be called to initialize this contract. + @param name The name of the Float governance token + @param symbol The ticker representing the token + @param stakerAddress The staker contract that controls minting of the token + */ + function initialize( + string calldata name, + string calldata symbol, + address stakerAddress + ) external initializer { + __ERC20_init(name, symbol); + __ERC20Burnable_init(); + __Pausable_init(); + __AccessControl_init(); + __ERC20Permit_init(name); + __UUPSUpgradeable_init(); + + renounceRole(DEFAULT_ADMIN_ROLE, msg.sender); + renounceRole(MINTER_ROLE, msg.sender); + + _setupRole(DEFAULT_ADMIN_ROLE, stakerAddress); + _setupRole(MINTER_ROLE, stakerAddress); + _setupRole(PAUSER_ROLE, msg.sender); + + _setupRole(UPGRADER_ROLE, msg.sender); + + // Token starts as paused + _pause(); + } + + /*╔═══════════════════════════════════════════════════════════════════╗ + ║ FUNCTIONS INHERITED BY ERC20PresetMinterPauserUpgradeable ║ + ╚═══════════════════════════════════════════════════════════════════╝*/ + + /** + @notice Mints an amount of Float tokens for an address. + @dev Can only be called by addresses with a MINTER_ROLE. + This should correspond to the Staker contract. + @param to The address for which to mint the tokens for. + @param amount Amount of synthetic tokens to mint in wei. + */ + function mint(address to, uint256 amount) external override(IFloatToken) onlyRole(MINTER_ROLE) { + _mint(to, amount); + } + + /** + @notice modify token functionality so that a pausing this token doesn't affect minting + @dev Pause functionality in the open zeppelin ERC20PresetMinterPauserUpgradeable comes from the below function. + We override it to exclude anyone with the minter role (ie the Staker contract) + @param from address tokens are being sent from + @param to address tokens are being sent to + @param amount amount of tokens being sent + */ + function _beforeTokenTransfer( + address from, + address to, + uint256 amount + ) internal virtual override { + require(!paused() || hasRole(MINTER_ROLE, _msgSender()), "Paused and not minter"); + + super._beforeTokenTransfer(from, to, amount); + } + + function pause() external onlyRole(PAUSER_ROLE) { + _pause(); + } + + function unpause() external onlyRole(PAUSER_ROLE) { + _unpause(); + } + + function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {} + + function _afterTokenTransfer( + address from, + address to, + uint256 amount + ) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) { + super._afterTokenTransfer(from, to, amount); + } + + function _mint(address to, uint256 amount) + internal + override(ERC20Upgradeable, ERC20VotesUpgradeable) + { + super._mint(to, amount); + } + + function _burn(address account, uint256 amount) + internal + override(ERC20Upgradeable, ERC20VotesUpgradeable) + { + super._burn(account, amount); + } + + function totalSupply() + public + view + virtual + override(ERC20Upgradeable, IFloatToken) + returns (uint256) + { + return ERC20Upgradeable.totalSupply(); + } + + function transfer(address recipient, uint256 amount) + public + virtual + override(ERC20Upgradeable, IFloatToken) + returns (bool) + { + return ERC20Upgradeable.transfer(recipient, amount); + } + + function burnFrom(address account, uint256 amount) + public + virtual + override(ERC20BurnableUpgradeable, IFloatToken) + { + ERC20BurnableUpgradeable.burnFrom(account, amount); + } +} diff --git a/contracts/GEMS.sol b/contracts/GEMS.sol new file mode 100644 index 0000000..db1bb16 --- /dev/null +++ b/contracts/GEMS.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "./abstract/AccessControlledAndUpgradeable.sol"; + +/** Contract giving user GEMS*/ + +// Inspired by https://github.com/andrecronje/rarity/blob/main/rarity.sol + +/** @title GEMS */ +contract GEMS is AccessControlledAndUpgradeable { + bytes32 public constant GEM_ROLE = keccak256("GEM_ROLE"); + + uint256 constant gems_per_day = 250e18; + uint256 constant DAY = 1 days; + + mapping(address => uint256) public gems; + mapping(address => uint256) public streak; + mapping(address => uint256) public lastAction; + + event GemsCollected(address user, uint256 gems, uint256 streak); + + function initialize( + address _admin, + address _longShort, + address _staker + ) external initializer { + _AccessControlledAndUpgradeable_init(_admin); + _setupRole(GEM_ROLE, _longShort); + _setupRole(GEM_ROLE, _staker); + } + + // Say gm and get gems by performing an action in LongShort or Staker + function gm(address user) external { + if (hasRole(GEM_ROLE, msg.sender)) { + uint256 usersLastAction = lastAction[user]; + uint256 blocktimestamp = block.timestamp; + + if (blocktimestamp - usersLastAction >= DAY) { + // Award gems + gems[user] += gems_per_day; + + // Increment streak + if (blocktimestamp - usersLastAction < 2 * DAY) { + streak[user] += 1; + } else { + streak[user] = 1; // reset streak to 1 + } + + lastAction[user] = blocktimestamp; + } + emit GemsCollected(user, gems[user], streak[user]); + } + } +} diff --git a/contracts/LongShort.sol b/contracts/LongShort.sol new file mode 100644 index 0000000..4de4f9b --- /dev/null +++ b/contracts/LongShort.sol @@ -0,0 +1,1358 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts/utils/math/Math.sol"; + +import "./interfaces/ITokenFactory.sol"; +import "./interfaces/ISyntheticToken.sol"; +import "./interfaces/IStaker.sol"; +import "./interfaces/ILongShort.sol"; +import "./interfaces/IYieldManager.sol"; +import "./interfaces/IOracleManager.sol"; +import "./abstract/AccessControlledAndUpgradeable.sol"; +import "./GEMS.sol"; +import "hardhat/console.sol"; + +/** + **** visit https://float.capital ***** + */ + +/// @title Core logic of Float Protocal markets +/// @author float.capital +/// @notice visit https://float.capital for more info +/// @dev All functions in this file are currently `virtual`. This is NOT to encourage inheritance. +/// It is merely for convenince when unit testing. +/// @custom:auditors This contract balances long and short sides. +contract LongShort is ILongShort, AccessControlledAndUpgradeable { + //Using Open Zeppelin safe transfer library for token transfers + using SafeERC20 for IERC20; + + /*╔═════════════════════════════╗ + ║ VARIABLES ║ + ╚═════════════════════════════╝*/ + + /* ══════ Fixed-precision constants ══════ */ + /// @notice this is the address that permanently locked initial liquidity for markets is held by. + /// These tokens will never move so market can never have zero liquidity on a side. + /// @dev f10a7 spells float in hex - for fun - important part is that the private key for this address in not known. + address public constant PERMANENT_INITIAL_LIQUIDITY_HOLDER = + 0xf10A7_F10A7_f10A7_F10a7_F10A7_f10a7_F10A7_f10a7; + + /// @dev an empty allocation of storage for use in future upgrades - inspiration from OZ: + /// https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/10f0f1a95b1b0fd5520351886bae7a03490f1056/contracts/token/ERC20/ERC20Upgradeable.sol#L361 + uint256[45] private __constantsGap; + + /* ══════ Global state ══════ */ + uint32 public latestMarket; + + address public staker; + address public tokenFactory; + address public gems; + + uint256[45] private __globalStateGap; + + /* ══════ Market specific ══════ */ + mapping(uint32 => bool) public marketExists; + + mapping(uint32 => int256) public assetPrice; + mapping(uint32 => uint256) public override marketUpdateIndex; + mapping(uint32 => uint256) public marketTreasurySplitGradient_e18; + mapping(uint32 => uint256) public marketLeverage_e18; + + mapping(uint32 => address) public paymentTokens; + mapping(uint32 => address) public yieldManagers; + mapping(uint32 => address) public oracleManagers; + uint256[45] private __marketStateGap; + + /* ══════ Market + position (long/short) specific ══════ */ + mapping(uint32 => mapping(bool => address)) public override syntheticTokens; + mapping(uint32 => mapping(bool => uint256)) public override marketSideValueInPaymentToken; + + /// @notice synthetic token prices of a given market of a (long/short) at every previous price update + mapping(uint32 => mapping(bool => mapping(uint256 => uint256))) + public + override syntheticToken_priceSnapshot; + + mapping(uint32 => mapping(bool => uint256)) public batched_amountPaymentToken_deposit; + mapping(uint32 => mapping(bool => uint256)) public batched_amountSyntheticToken_redeem; + mapping(uint32 => mapping(bool => uint256)) + public batched_amountSyntheticToken_toShiftAwayFrom_marketSide; + uint256[45] private __marketPositonStateGap; + + /* ══════ User specific ══════ */ + mapping(uint32 => mapping(address => uint256)) public userNextPrice_currentUpdateIndex; + + mapping(uint32 => mapping(bool => mapping(address => uint256))) + public userNextPrice_paymentToken_depositAmount; + mapping(uint32 => mapping(bool => mapping(address => uint256))) + public userNextPrice_syntheticToken_redeemAmount; + mapping(uint32 => mapping(bool => mapping(address => uint256))) + public userNextPrice_syntheticToken_toShiftAwayFrom_marketSide; + + /*╔═════════════════════════════╗ + ║ MODIFIERS ║ + ╚═════════════════════════════╝*/ + + function adminOnlyModifierLogic() internal virtual { + _checkRole(ADMIN_ROLE, msg.sender); + } + + modifier adminOnly() { + adminOnlyModifierLogic(); + _; + } + + function requireMarketExistsModifierLogic(uint32 marketIndex) internal view virtual { + require(marketExists[marketIndex], "market doesn't exist"); + } + + modifier requireMarketExists(uint32 marketIndex) { + requireMarketExistsModifierLogic(marketIndex); + _; + } + + modifier updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements( + address user, + uint32 marketIndex + ) { + _updateSystemStateInternal(marketIndex); + _executeOutstandingNextPriceSettlements(user, marketIndex); + _; + } + + function gemCollectingModifierLogic() internal virtual { + if (msg.sender != staker) { + GEMS(gems).gm(msg.sender); + } + } + + modifier gemCollecting() { + gemCollectingModifierLogic(); + _; + } + + /*╔═════════════════════════════╗ + ║ CONTRACT SET-UP ║ + ╚═════════════════════════════╝*/ + + /// @notice Initializes the contract. + /// @dev Calls OpenZeppelin's initializer modifier. + /// @param _admin Address of the admin role. + /// @param _tokenFactory Address of the contract which creates synthetic asset tokens. + /// @param _staker Address of the contract which handles synthetic asset stakes. + function initialize( + address _admin, + address _tokenFactory, + address _staker, + address _gems + ) external virtual initializer { + require( + _admin != address(0) && + _tokenFactory != address(0) && + _staker != address(0) && + _gems != address(0) + ); + _AccessControlledAndUpgradeable_init(_admin); + tokenFactory = _tokenFactory; + staker = _staker; + gems = _gems; + + emit LongShortV1(_admin, _tokenFactory, _staker); + } + + /*╔═══════════════════╗ + ║ ADMIN ║ + ╚═══════════════════╝*/ + + /// @notice Update oracle for a market + /// @dev Can only be called by the current admin. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param _newOracleManager Address of the replacement oracle manager. + function updateMarketOracle(uint32 marketIndex, address _newOracleManager) external adminOnly { + // If not a oracle contract this would break things.. Test's arn't validating this + // Ie require isOracle interface - ERC165 + address previousOracleManager = oracleManagers[marketIndex]; + oracleManagers[marketIndex] = _newOracleManager; + emit OracleUpdated(marketIndex, previousOracleManager, _newOracleManager); + } + + /// @notice changes the gradient of the line for determining the yield split between market and treasury. + function changeMarketTreasurySplitGradient( + uint32 marketIndex, + uint256 _marketTreasurySplitGradient_e18 + ) external adminOnly { + marketTreasurySplitGradient_e18[marketIndex] = _marketTreasurySplitGradient_e18; + } + + /*╔═════════════════════════════╗ + ║ MARKET CREATION ║ + ╚═════════════════════════════╝*/ + + /// @notice Creates an entirely new long/short market tracking an underlying oracle price. + /// Make sure the synthetic names/symbols are unique. + /// @dev This does not make the market active. + /// The `initializeMarket` function was split out separately to this function to reduce costs. + /// @param syntheticName Name of the synthetic asset + /// @param syntheticSymbol Symbol for the synthetic asset + /// @param _paymentToken The address of the erc20 token used to buy this synthetic asset + /// this will likely always be DAI + /// @param _oracleManager The address of the oracle manager that provides the price feed for this market + /// @param _yieldManager The contract that manages depositing the paymentToken into a yield bearing protocol + function createNewSyntheticMarket( + string calldata syntheticName, + string calldata syntheticSymbol, + address _paymentToken, + address _oracleManager, + address _yieldManager + ) external adminOnly { + require( + _paymentToken != address(0) && _oracleManager != address(0) && _yieldManager != address(0) + ); + + uint32 marketIndex = ++latestMarket; + address _staker = staker; + + // Ensure new markets don't use the same yield manager + IYieldManager(_yieldManager).initializeForMarket(); + + // Create new synthetic long token. + syntheticTokens[marketIndex][true] = ITokenFactory(tokenFactory).createSyntheticToken( + string(abi.encodePacked("Float Long ", syntheticName)), + string(abi.encodePacked("fl", syntheticSymbol)), + _staker, + marketIndex, + true + ); + + // Create new synthetic short token. + syntheticTokens[marketIndex][false] = ITokenFactory(tokenFactory).createSyntheticToken( + string(abi.encodePacked("Float Short ", syntheticName)), + string(abi.encodePacked("fs", syntheticSymbol)), + _staker, + marketIndex, + false + ); + + // Initial market state. + paymentTokens[marketIndex] = _paymentToken; + yieldManagers[marketIndex] = _yieldManager; + oracleManagers[marketIndex] = _oracleManager; + assetPrice[marketIndex] = IOracleManager(oracleManagers[marketIndex]).updatePrice(); + + emit SyntheticMarketCreated( + marketIndex, + syntheticTokens[marketIndex][true], + syntheticTokens[marketIndex][false], + _paymentToken, + assetPrice[marketIndex], + syntheticName, + syntheticSymbol, + _oracleManager, + _yieldManager + ); + } + + /// @notice Creates an entirely new long/short market tracking an underlying oracle price. + /// Uses already created synthetic tokens. + /// @dev This does not make the market active. + /// The `initializeMarket` function was split out separately to this function to reduce costs. + /// @param syntheticName Name of the synthetic asset + /// @param syntheticSymbol Symbol for the synthetic asset + /// @param _longToken Address for the long token. + /// @param _shortToken Address for the short token. + /// @param _paymentToken The address of the erc20 token used to buy this synthetic asset + /// this will likely always be DAI + /// @param _oracleManager The address of the oracle manager that provides the price feed for this market + /// @param _yieldManager The contract that manages depositing the paymentToken into a yield bearing protocol + function createNewSyntheticMarketExternalSyntheticTokens( + string calldata syntheticName, + string calldata syntheticSymbol, + address _longToken, + address _shortToken, + address _paymentToken, + address _oracleManager, + address _yieldManager + ) external adminOnly { + uint32 marketIndex = ++latestMarket; + + // Ensure new markets don't use the same yield manager + IYieldManager(_yieldManager).initializeForMarket(); + + // Assign new synthetic long token. + syntheticTokens[marketIndex][true] = _longToken; + + // Assign new synthetic short token. + syntheticTokens[marketIndex][false] = _shortToken; + + // Initial market state. + paymentTokens[marketIndex] = _paymentToken; + yieldManagers[marketIndex] = _yieldManager; + oracleManagers[marketIndex] = _oracleManager; + assetPrice[marketIndex] = IOracleManager(oracleManagers[marketIndex]).updatePrice(); + + emit SyntheticMarketCreated( + marketIndex, + _longToken, + _shortToken, + _paymentToken, + assetPrice[marketIndex], + syntheticName, + syntheticSymbol, + _oracleManager, + _yieldManager + ); + } + + /// @notice Seeds a new market with initial capital. + /// @dev Only called when initializing a market. + /// @param initialMarketSeedForEachMarketSide Amount in wei for which to seed both sides of the market. + /// @param marketIndex An uint32 which uniquely identifies a market. + function _seedMarketInitially(uint256 initialMarketSeedForEachMarketSide, uint32 marketIndex) + internal + virtual + { + require( + // You require at least 1e18 (1 payment token with 18 decimal places) of the underlying payment token to seed the market. + initialMarketSeedForEachMarketSide >= 1e18, + "Insufficient market seed" + ); + + uint256 amountToLockInYieldManager = initialMarketSeedForEachMarketSide * 2; + _transferPaymentTokensFromUserToYieldManager(marketIndex, amountToLockInYieldManager); + IYieldManager(yieldManagers[marketIndex]).depositPaymentToken(amountToLockInYieldManager); + + ISyntheticToken(syntheticTokens[marketIndex][true]).mint( + PERMANENT_INITIAL_LIQUIDITY_HOLDER, + initialMarketSeedForEachMarketSide + ); + ISyntheticToken(syntheticTokens[marketIndex][false]).mint( + PERMANENT_INITIAL_LIQUIDITY_HOLDER, + initialMarketSeedForEachMarketSide + ); + + marketSideValueInPaymentToken[marketIndex][true] = initialMarketSeedForEachMarketSide; + marketSideValueInPaymentToken[marketIndex][false] = initialMarketSeedForEachMarketSide; + } + + /// @notice Sets a market as active once it has already been setup by createNewSyntheticMarket. + /// @dev Seperated from createNewSyntheticMarket due to gas considerations. + /// @param marketIndex An int32 which uniquely identifies the market. + /// @param kInitialMultiplier Linearly decreasing multiplier for Float token issuance for the market when staking synths. + /// @param kPeriod Time which kInitialMultiplier will last + /// @param unstakeFee_e18 Base 1e18 percentage fee levied when unstaking for the market. + /// @param balanceIncentiveCurve_exponent Sets the degree to which Float token issuance differs + /// for market sides in unbalanced markets. See Staker.sol + /// @param balanceIncentiveCurve_equilibriumOffset An offset to account for naturally imbalanced markets + /// when Float token issuance should differ for market sides. See Staker.sol + /// @param initialMarketSeedForEachMarketSide Amount of payment token that will be deposited in each market side to seed the market. + function initializeMarket( + uint32 marketIndex, + uint256 kInitialMultiplier, + uint256 kPeriod, + uint256 unstakeFee_e18, + uint256 initialMarketSeedForEachMarketSide, + uint256 balanceIncentiveCurve_exponent, + int256 balanceIncentiveCurve_equilibriumOffset, + uint256 _marketTreasurySplitGradient_e18, + uint256 marketLeverage + ) external adminOnly { + require( + kInitialMultiplier != 0 && + unstakeFee_e18 != 0 && + initialMarketSeedForEachMarketSide != 0 && + balanceIncentiveCurve_exponent != 0 && + _marketTreasurySplitGradient_e18 != 0 + ); + + require(!marketExists[marketIndex], "already initialized"); + require(marketIndex <= latestMarket, "index too high"); + + marketExists[marketIndex] = true; + + marketTreasurySplitGradient_e18[marketIndex] = _marketTreasurySplitGradient_e18; + + // Set this value to one initially - 0 is a null value and thus potentially bug prone. + marketUpdateIndex[marketIndex] = 1; + + _seedMarketInitially(initialMarketSeedForEachMarketSide, marketIndex); + + marketLeverage_e18[marketIndex] = marketLeverage; + + // Add new staker funds with fresh synthetic tokens. + IStaker(staker).addNewStakingFund( + marketIndex, + syntheticTokens[marketIndex][true], + syntheticTokens[marketIndex][false], + kInitialMultiplier, + kPeriod, + unstakeFee_e18, + balanceIncentiveCurve_exponent, + balanceIncentiveCurve_equilibriumOffset + ); + + IStaker(staker).pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations( + marketIndex, + 1, + 1e18, + 1e18, + initialMarketSeedForEachMarketSide, + initialMarketSeedForEachMarketSide + ); + + emit NewMarketLaunchedAndSeeded( + marketIndex, + initialMarketSeedForEachMarketSide, + marketLeverage + ); + } + + /*╔══════════════════════════════╗ + ║ GETTER FUNCTIONS ║ + ╚══════════════════════════════╝*/ + + /// @notice Calculates the conversion rate from synthetic tokens to payment tokens. + /// @dev Synth tokens have a fixed 18 decimals. + /// @param amountPaymentTokenBackingSynth Amount of payment tokens in that token's lowest denomination. + /// @param amountSyntheticToken Amount of synth token in wei. + /// @return syntheticTokenPrice The calculated conversion rate in base 1e18. + function _getSyntheticTokenPrice( + uint256 amountPaymentTokenBackingSynth, + uint256 amountSyntheticToken + ) internal pure virtual returns (uint256 syntheticTokenPrice) { + return (amountPaymentTokenBackingSynth * 1e18) / amountSyntheticToken; + } + + /// @notice Converts synth token amounts to payment token amounts at a synth token price. + /// @dev Price assumed base 1e18. + /// @param amountSyntheticToken Amount of synth token in wei. + /// @param syntheticTokenPriceInPaymentTokens The conversion rate from synth to payment tokens in base 1e18. + /// @return amountPaymentToken The calculated amount of payment tokens in token's lowest denomination. + function _getAmountPaymentToken( + uint256 amountSyntheticToken, + uint256 syntheticTokenPriceInPaymentTokens + ) internal pure virtual returns (uint256 amountPaymentToken) { + return (amountSyntheticToken * syntheticTokenPriceInPaymentTokens) / 1e18; + } + + /// @notice Converts payment token amounts to synth token amounts at a synth token price. + /// @dev Price assumed base 1e18. + /// @param amountPaymentTokenBackingSynth Amount of payment tokens in that token's lowest denomination. + /// @param syntheticTokenPriceInPaymentTokens The conversion rate from synth to payment tokens in base 1e18. + /// @return amountSyntheticToken The calculated amount of synthetic token in wei. + function _getAmountSyntheticToken( + uint256 amountPaymentTokenBackingSynth, + uint256 syntheticTokenPriceInPaymentTokens + ) internal pure virtual returns (uint256 amountSyntheticToken) { + return (amountPaymentTokenBackingSynth * 1e18) / syntheticTokenPriceInPaymentTokens; + } + + /** + @notice Calculate the amount of target side synthetic tokens that are worth the same + amount of payment tokens as X many synthetic tokens on origin side. + The resulting equation comes from simplifying this function + + _getAmountSyntheticToken( + _getAmountPaymentToken( + amountOriginSynth, + priceOriginSynth + ), + priceTargetSynth) + + Unpacking the function we get: + ((amountOriginSynth * priceOriginSynth) / 1e18) * 1e18 / priceTargetSynth + And simplifying this we get: + (amountOriginSynth * priceOriginSynth) / priceTargetSynth + @param amountSyntheticTokens_originSide Amount of synthetic tokens on origin side + @param syntheticTokenPrice_originSide Price of origin side's synthetic token + @param syntheticTokenPrice_targetSide Price of target side's synthetic token + @return equivalentAmountSyntheticTokensOnTargetSide Amount of synthetic token on target side + */ + function _getEquivalentAmountSyntheticTokensOnTargetSide( + uint256 amountSyntheticTokens_originSide, + uint256 syntheticTokenPrice_originSide, + uint256 syntheticTokenPrice_targetSide + ) internal pure virtual returns (uint256 equivalentAmountSyntheticTokensOnTargetSide) { + equivalentAmountSyntheticTokensOnTargetSide = + (amountSyntheticTokens_originSide * syntheticTokenPrice_originSide) / + syntheticTokenPrice_targetSide; + } + + /// @notice Given an executed next price shift from tokens on one market side to the other, + /// determines how many other side tokens the shift was worth. + /// @dev Intended for use primarily by Staker.sol + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param amountSyntheticToken_redeemOnOriginSide Amount of synth token in wei. + /// @param isShiftFromLong Whether the token shift is from long to short (true), or short to long (false). + /// @param priceSnapshotIndex Index which identifies which synth prices to use. + /// @return amountSyntheticTokensToMintOnTargetSide The amount in wei of tokens for the other side that the shift was worth. + function getAmountSyntheticTokenToMintOnTargetSide( + uint32 marketIndex, + uint256 amountSyntheticToken_redeemOnOriginSide, + bool isShiftFromLong, + uint256 priceSnapshotIndex + ) public view virtual override returns (uint256 amountSyntheticTokensToMintOnTargetSide) { + uint256 syntheticTokenPriceOnOriginSide = syntheticToken_priceSnapshot[marketIndex][ + isShiftFromLong + ][priceSnapshotIndex]; + uint256 syntheticTokenPriceOnTargetSide = syntheticToken_priceSnapshot[marketIndex][ + !isShiftFromLong + ][priceSnapshotIndex]; + + amountSyntheticTokensToMintOnTargetSide = _getEquivalentAmountSyntheticTokensOnTargetSide( + amountSyntheticToken_redeemOnOriginSide, + syntheticTokenPriceOnOriginSide, + syntheticTokenPriceOnTargetSide + ); + } + + /** + @notice The amount of a synth token a user is owed following a batch execution. + 4 possible states for next price actions: + - "Pending" - means the next price update hasn't happened or been enacted on by the updateSystemState function. + - "Confirmed" - means the next price has been updated by the updateSystemState function. There is still + - outstanding (lazy) computation that needs to be executed per user in the batch. + - "Settled" - there is no more computation left for the user. + - "Non-existent" - user has no next price actions. + This function returns a calculated value only in the case of 'confirmed' next price actions. + It should return zero for all other types of next price actions. + @dev Used in SyntheticToken.sol balanceOf to allow for automatic reflection of next price actions. + @param user The address of the user for whom to execute the function for. + @param marketIndex An uint32 which uniquely identifies a market. + @param isLong Whether it is for the long synthetic asset or the short synthetic asset. + @return confirmedButNotSettledBalance The amount in wei of tokens that the user is owed. + */ + function getUsersConfirmedButNotSettledSynthBalance( + address user, + uint32 marketIndex, + bool isLong + ) + external + view + virtual + override + requireMarketExists(marketIndex) + returns (uint256 confirmedButNotSettledBalance) + { + uint256 currentMarketUpdateIndex = marketUpdateIndex[marketIndex]; + uint256 userNextPrice_currentUpdateIndex_forMarket = userNextPrice_currentUpdateIndex[ + marketIndex + ][user]; + if ( + userNextPrice_currentUpdateIndex_forMarket != 0 && + userNextPrice_currentUpdateIndex_forMarket <= currentMarketUpdateIndex + ) { + uint256 amountPaymentTokenDeposited = userNextPrice_paymentToken_depositAmount[marketIndex][ + isLong + ][user]; + + if (amountPaymentTokenDeposited > 0) { + uint256 syntheticTokenPrice = syntheticToken_priceSnapshot[marketIndex][isLong][ + userNextPrice_currentUpdateIndex_forMarket + ]; + + confirmedButNotSettledBalance = _getAmountSyntheticToken( + amountPaymentTokenDeposited, + syntheticTokenPrice + ); + } + + uint256 amountSyntheticTokensToBeShiftedAwayFromOriginSide = userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[ + marketIndex + ][!isLong][user]; + + if (amountSyntheticTokensToBeShiftedAwayFromOriginSide > 0) { + uint256 syntheticTokenPriceOnOriginSide = syntheticToken_priceSnapshot[marketIndex][ + !isLong + ][userNextPrice_currentUpdateIndex_forMarket]; + uint256 syntheticTokenPriceOnTargetSide = syntheticToken_priceSnapshot[marketIndex][isLong][ + userNextPrice_currentUpdateIndex_forMarket + ]; + + confirmedButNotSettledBalance += _getEquivalentAmountSyntheticTokensOnTargetSide( + amountSyntheticTokensToBeShiftedAwayFromOriginSide, + syntheticTokenPriceOnOriginSide, + syntheticTokenPriceOnTargetSide + ); + } + } + } + + /** + @notice Calculates the percentage in base 1e18 of how much of the accrued yield + for a market should be allocated to treasury. + @dev For gas considerations also returns whether the long side is imbalanced. + @dev For gas considerations totalValueLockedInMarket is passed as a parameter as the function + calling this function has pre calculated the value + @param longValue The current total payment token value of the long side of the market. + @param shortValue The current total payment token value of the short side of the market. + @param totalValueLockedInMarket Total payment token value of both sides of the market. + @return isLongSideUnderbalanced Whether the long side initially had less value than the short side. + @return treasuryYieldPercent_e18 The percentage in base 1e18 of how much of the accrued yield + for a market should be allocated to treasury. + */ + function _getYieldSplit( + uint32 marketIndex, + uint256 longValue, + uint256 shortValue, + uint256 totalValueLockedInMarket + ) internal view virtual returns (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) { + isLongSideUnderbalanced = longValue < shortValue; + uint256 imbalance; + + unchecked { + if (isLongSideUnderbalanced) { + imbalance = shortValue - longValue; + } else { + imbalance = longValue - shortValue; + } + } + + // marketTreasurySplitGradient_e18 may be adjusted to ensure yield is given + // to the market at a desired rate e.g. if a market tends to become imbalanced + // frequently then the gradient can be increased to funnel yield to the market + // quicker. + // See this equation in latex: https://ipfs.io/ipfs/QmXsW4cHtxpJ5BFwRcMSUw7s5G11Qkte13NTEfPLTKEx4x + // Interact with this equation: https://www.desmos.com/calculator/pnl43tfv5b + uint256 marketPercentCalculated_e18 = (imbalance * + marketTreasurySplitGradient_e18[marketIndex]) / totalValueLockedInMarket; + + uint256 marketPercent_e18 = Math.min(marketPercentCalculated_e18, 1e18); + + unchecked { + treasuryYieldPercent_e18 = 1e18 - marketPercent_e18; + } + } + + /*╔══════════════════════════════╗ + ║ HELPER FUNCTIONS ║ + ╚══════════════════════════════╝*/ + + /// @notice First gets yield from the yield manager and allocates it to market and treasury. + /// It then allocates the full market yield portion to the underbalanced side of the market. + /// NB this function also adjusts the value of the long and short side based on the latest + /// price of the underlying asset received from the oracle. This function should ideally be + /// called everytime there is an price update from the oracle. We have built a bot that does this. + /// The system is still perectly safe if not called every price update, the synthetic will just + /// less closely track the underlying asset. + /// @dev In one function as yield should be allocated before rebalancing. + /// This prevents an attack whereby the user imbalances a side to capture all accrued yield. + /// @param marketIndex The market for which to execute the function for. + /// @param newAssetPrice The new asset price. + /// @return longValue The value of the long side after rebalancing. + /// @return shortValue The value of the short side after rebalancing. + function _claimAndDistributeYieldThenRebalanceMarket(uint32 marketIndex, int256 newAssetPrice) + internal + virtual + returns (uint256 longValue, uint256 shortValue) + { + int256 oldAssetPrice = assetPrice[marketIndex]; + // Claiming and distributing the yield + longValue = marketSideValueInPaymentToken[marketIndex][true]; + shortValue = marketSideValueInPaymentToken[marketIndex][false]; + uint256 totalValueLockedInMarket = longValue + shortValue; + + (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) = _getYieldSplit( + marketIndex, + longValue, + shortValue, + totalValueLockedInMarket + ); + + uint256 marketAmount = IYieldManager(yieldManagers[marketIndex]) + .distributeYieldForTreasuryAndReturnMarketAllocation( + totalValueLockedInMarket, + treasuryYieldPercent_e18 + ); + + if (marketAmount > 0) { + if (isLongSideUnderbalanced) { + longValue += marketAmount; + } else { + shortValue += marketAmount; + } + } + + // Adjusting value of long and short pool based on price movement + // The side/position with less liquidity has 100% percent exposure to the price movement. + // The side/position with more liquidity will have exposure < 100% to the price movement. + // I.e. Imagine $100 in longValue and $50 shortValue + // long side would have $50/$100 = 50% exposure to price movements based on the liquidity imbalance. + // min(longValue, shortValue) = $50 , therefore if the price change was -10% then + // $50 * 10% = $5 gained for short side and conversely $5 lost for long side. + int256 underbalancedSideValue = int256(Math.min(longValue, shortValue)); + + // See this equation in latex: https://ipfs.io/ipfs/QmPeJ3SZdn1GfxqCD4GDYyWTJGPMSHkjPJaxrzk2qTTPSE + // Interact with this equation: https://www.desmos.com/calculator/t8gr6j5vsq + int256 valueChange = ((newAssetPrice - oldAssetPrice) * + underbalancedSideValue * + int256(marketLeverage_e18[marketIndex])) / (oldAssetPrice * 1e18); + + if (valueChange < 0) { + valueChange = -valueChange; // make value change positive + + // handle 'impossible' edge case where underlying price feed changes more than 100% downwards gracefully. + if (uint256(valueChange) > longValue) { + valueChange = (int256(longValue) * 99999) / 100000; + } + longValue -= uint256(valueChange); + shortValue += uint256(valueChange); + } else { + // handle 'impossible' edge case where underlying price feed changes more than 100% upwards gracefully. + if (uint256(valueChange) > shortValue) { + valueChange = (int256(shortValue) * 99999) / 100000; + } + longValue += uint256(valueChange); + shortValue -= uint256(valueChange); + } + } + + /*╔═══════════════════════════════╗ + ║ UPDATING SYSTEM STATE ║ + ╚═══════════════════════════════╝*/ + + /// @notice Updates the value of the long and short sides to account for latest oracle price updates + /// and batches all next price actions. + /// @dev To prevent front-running only executes on price change from an oracle. + /// We assume the function will be called for each market at least once per price update. + /// Note Even if not called on every price update, this won't affect security, it will only affect how closely + /// the synthetic asset actually tracks the underlying asset. + /// @param marketIndex The market index for which to update. + function _updateSystemStateInternal(uint32 marketIndex) + internal + virtual + requireMarketExists(marketIndex) + { + // If a negative int is return this should fail. + int256 newAssetPrice = IOracleManager(oracleManagers[marketIndex]).updatePrice(); + + uint256 currentMarketIndex = marketUpdateIndex[marketIndex]; + + bool assetPriceHasChanged = assetPrice[marketIndex] != newAssetPrice; + + if (assetPriceHasChanged) { + uint256 syntheticTokenPrice_inPaymentTokens_long = syntheticToken_priceSnapshot[marketIndex][ + true + ][currentMarketIndex]; + uint256 syntheticTokenPrice_inPaymentTokens_short = syntheticToken_priceSnapshot[marketIndex][ + false + ][currentMarketIndex]; + // if there is a price change and the 'staker' contract has pending updates, push the stakers price snapshot index to the staker + // (so the staker can handle its internal accounting) + + ( + uint256 newLongPoolValue, + uint256 newShortPoolValue + ) = _claimAndDistributeYieldThenRebalanceMarket(marketIndex, newAssetPrice); + + syntheticTokenPrice_inPaymentTokens_long = _getSyntheticTokenPrice( + newLongPoolValue, + ISyntheticToken(syntheticTokens[marketIndex][true]).totalSupply() + ); + syntheticTokenPrice_inPaymentTokens_short = _getSyntheticTokenPrice( + newShortPoolValue, + ISyntheticToken(syntheticTokens[marketIndex][false]).totalSupply() + ); + + assetPrice[marketIndex] = newAssetPrice; + + currentMarketIndex++; + marketUpdateIndex[marketIndex] = currentMarketIndex; + + syntheticToken_priceSnapshot[marketIndex][true][ + currentMarketIndex + ] = syntheticTokenPrice_inPaymentTokens_long; + + syntheticToken_priceSnapshot[marketIndex][false][ + currentMarketIndex + ] = syntheticTokenPrice_inPaymentTokens_short; + + ( + int256 long_changeInMarketValue_inPaymentToken, + int256 short_changeInMarketValue_inPaymentToken + ) = _batchConfirmOutstandingPendingActions( + marketIndex, + syntheticTokenPrice_inPaymentTokens_long, + syntheticTokenPrice_inPaymentTokens_short + ); + + newLongPoolValue = uint256( + int256(newLongPoolValue) + long_changeInMarketValue_inPaymentToken + ); + newShortPoolValue = uint256( + int256(newShortPoolValue) + short_changeInMarketValue_inPaymentToken + ); + marketSideValueInPaymentToken[marketIndex][true] = newLongPoolValue; + marketSideValueInPaymentToken[marketIndex][false] = newShortPoolValue; + + IStaker(staker).pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations( + marketIndex, + currentMarketIndex, + syntheticTokenPrice_inPaymentTokens_long, + syntheticTokenPrice_inPaymentTokens_short, + newLongPoolValue, + newShortPoolValue + ); + + emit SystemStateUpdated( + marketIndex, + currentMarketIndex, + newAssetPrice, + newLongPoolValue, + newShortPoolValue, + syntheticTokenPrice_inPaymentTokens_long, + syntheticTokenPrice_inPaymentTokens_short + ); + } + } + + /// @notice Updates the state of a market to account for the latest oracle price update. + /// @param marketIndex An uint32 which uniquely identifies a market. + function updateSystemState(uint32 marketIndex) external override { + _updateSystemStateInternal(marketIndex); + } + + /// @notice Updates the state of multiples markets to account for their latest oracle price updates. + /// @param marketIndexes An array of int32s which uniquely identify markets. + function updateSystemStateMulti(uint32[] calldata marketIndexes) external override { + uint256 length = marketIndexes.length; + for (uint256 i = 0; i < length; i++) { + _updateSystemStateInternal(marketIndexes[i]); + } + } + + /*╔═══════════════════════════╗ + ║ DEPOSIT ║ + ╚═══════════════════════════╝*/ + + /// @notice Transfers payment tokens for a market from msg.sender to this contract. + /// @dev Tokens are transferred directly to this contract to be deposited by the yield manager in the batch to earn yield. + /// Since we check the return value of the transferFrom method, all payment tokens we use must conform to the ERC20 standard. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param amount Amount of payment tokens in that token's lowest denominationto deposit. + function _transferPaymentTokensFromUserToYieldManager(uint32 marketIndex, uint256 amount) + internal + virtual + { + IERC20(paymentTokens[marketIndex]).safeTransferFrom( + msg.sender, + yieldManagers[marketIndex], + amount + ); + } + + /*╔═══════════════════════════╗ + ║ MINT POSITION ║ + ╚═══════════════════════════╝*/ + + /// @notice Allows users to mint synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle. + /// @dev Called by external functions to mint either long or short. If a user mints multiple times before a price update, these are treated as a single mint. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price. + /// @param isLong Whether the mint is for a long or short synth. + function _mintNextPrice( + uint32 marketIndex, + uint256 amount, + bool isLong + ) + internal + virtual + updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex) + gemCollecting + { + _transferPaymentTokensFromUserToYieldManager(marketIndex, amount); + + batched_amountPaymentToken_deposit[marketIndex][isLong] += amount; + userNextPrice_paymentToken_depositAmount[marketIndex][isLong][msg.sender] += amount; + uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1; + userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex; + + emit NextPriceDeposit(marketIndex, isLong, amount, msg.sender, nextUpdateIndex); + } + + /// @notice Allows users to mint long synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price. + function mintLongNextPrice(uint32 marketIndex, uint256 amount) external override { + _mintNextPrice(marketIndex, amount, true); + } + + /// @notice Allows users to mint short synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price. + function mintShortNextPrice(uint32 marketIndex, uint256 amount) external override { + _mintNextPrice(marketIndex, amount, false); + } + + /*╔═══════════════════════════╗ + ║ REDEEM POSITION ║ + ╚═══════════════════════════╝*/ + + /// @notice Allows users to redeem their synthetic tokens for payment tokens. To prevent front-running these redeems are executed on the next price update from the oracle. + /// @dev Called by external functions to redeem either long or short. Payment tokens are actually transferred to the user when executeOutstandingNextPriceSettlements is called from a function call by the user. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param tokens_redeem Amount in wei of synth tokens to redeem. + /// @param isLong Whether this redeem is for a long or short synth. + function _redeemNextPrice( + uint32 marketIndex, + uint256 tokens_redeem, + bool isLong + ) + internal + virtual + updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex) + gemCollecting + { + ISyntheticToken(syntheticTokens[marketIndex][isLong]).transferFrom( + msg.sender, + address(this), + tokens_redeem + ); + + userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][msg.sender] += tokens_redeem; + uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1; + userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex; + + batched_amountSyntheticToken_redeem[marketIndex][isLong] += tokens_redeem; + + emit NextPriceRedeem(marketIndex, isLong, tokens_redeem, msg.sender, nextUpdateIndex); + } + + /// @notice Allows users to redeem long synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param tokens_redeem Amount in wei of synth tokens to redeem at the next oracle price. + function redeemLongNextPrice(uint32 marketIndex, uint256 tokens_redeem) external override { + _redeemNextPrice(marketIndex, tokens_redeem, true); + } + + /// @notice Allows users to redeem short synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param tokens_redeem Amount in wei of synth tokens to redeem at the next oracle price. + function redeemShortNextPrice(uint32 marketIndex, uint256 tokens_redeem) external override { + _redeemNextPrice(marketIndex, tokens_redeem, false); + } + + /*╔═══════════════════════════╗ + ║ SHIFT POSITION ║ + ╚═══════════════════════════╝*/ + + /// @notice Allows users to shift their position from one side of the market to the other in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle. + /// @dev Called by external functions to shift either way. Intended for primary use by Staker.sol + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from the one side to the other at the next oracle price update. + /// @param isShiftFromLong Whether the token shift is from long to short (true), or short to long (false). + function shiftPositionNextPrice( + uint32 marketIndex, + uint256 amountSyntheticTokensToShift, + bool isShiftFromLong + ) + public + virtual + override + updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex) + gemCollecting + { + require( + ISyntheticToken(syntheticTokens[marketIndex][isShiftFromLong]).transferFrom( + msg.sender, + address(this), + amountSyntheticTokensToShift + ) + ); + + userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][ + msg.sender + ] += amountSyntheticTokensToShift; + uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1; + userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex; + + batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][ + isShiftFromLong + ] += amountSyntheticTokensToShift; + + emit NextPriceSyntheticPositionShift( + marketIndex, + isShiftFromLong, + amountSyntheticTokensToShift, + msg.sender, + nextUpdateIndex + ); + } + + /// @notice Allows users to shift their position from long to short in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from long to short the next oracle price update. + function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift) + external + override + { + shiftPositionNextPrice(marketIndex, amountSyntheticTokensToShift, true); + } + + /// @notice Allows users to shift their position from short to long in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from the short to long at the next oracle price update. + function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift) + external + override + { + shiftPositionNextPrice(marketIndex, amountSyntheticTokensToShift, false); + } + + /*╔════════════════════════════════╗ + ║ NEXT PRICE SETTLEMENTS ║ + ╚════════════════════════════════╝*/ + + /// @notice Transfers outstanding synth tokens from a next price mint to the user. + /// @dev The outstanding synths should already be reflected for the user due to balanceOf in SyntheticToken.sol, this just does the accounting. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param user The address of the user for whom to execute the function for. + /// @param isLong Whether this is for the long or short synth for the market. + function _executeOutstandingNextPriceMints( + uint32 marketIndex, + address user, + bool isLong + ) internal virtual { + uint256 currentPaymentTokenDepositAmount = userNextPrice_paymentToken_depositAmount[ + marketIndex + ][isLong][user]; + if (currentPaymentTokenDepositAmount > 0) { + userNextPrice_paymentToken_depositAmount[marketIndex][isLong][user] = 0; + uint256 amountSyntheticTokensToTransferToUser = _getAmountSyntheticToken( + currentPaymentTokenDepositAmount, + syntheticToken_priceSnapshot[marketIndex][isLong][ + userNextPrice_currentUpdateIndex[marketIndex][user] + ] + ); + ISyntheticToken(syntheticTokens[marketIndex][isLong]).transfer( + user, + amountSyntheticTokensToTransferToUser + ); + } + } + + /// @notice Transfers outstanding payment tokens from a next price redemption to the user. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param user The address of the user for whom to execute the function for. + /// @param isLong Whether this is for the long or short synth for the market. + function _executeOutstandingNextPriceRedeems( + uint32 marketIndex, + address user, + bool isLong + ) internal virtual { + uint256 currentSyntheticTokenRedemptions = userNextPrice_syntheticToken_redeemAmount[ + marketIndex + ][isLong][user]; + if (currentSyntheticTokenRedemptions > 0) { + userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][user] = 0; + uint256 amountPaymentToken_toRedeem = _getAmountPaymentToken( + currentSyntheticTokenRedemptions, + syntheticToken_priceSnapshot[marketIndex][isLong][ + userNextPrice_currentUpdateIndex[marketIndex][user] + ] + ); + + IYieldManager(yieldManagers[marketIndex]).transferPaymentTokensToUser( + user, + amountPaymentToken_toRedeem + ); + } + } + + /// @notice Transfers outstanding synth tokens from a next price position shift to the user. + /// @dev The outstanding synths should already be reflected for the user due to balanceOf in SyntheticToken.sol, this just does the accounting. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param user The address of the user for whom to execute the function for. + /// @param isShiftFromLong Whether the token shift was from long to short (true), or short to long (false). + function _executeOutstandingNextPriceTokenShifts( + uint32 marketIndex, + address user, + bool isShiftFromLong + ) internal virtual { + uint256 syntheticToken_toShiftAwayFrom_marketSide = userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[ + marketIndex + ][isShiftFromLong][user]; + if (syntheticToken_toShiftAwayFrom_marketSide > 0) { + uint256 syntheticToken_toShiftTowardsTargetSide = getAmountSyntheticTokenToMintOnTargetSide( + marketIndex, + syntheticToken_toShiftAwayFrom_marketSide, + isShiftFromLong, + userNextPrice_currentUpdateIndex[marketIndex][user] + ); + + userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][ + user + ] = 0; + + require( + ISyntheticToken(syntheticTokens[marketIndex][!isShiftFromLong]).transfer( + user, + syntheticToken_toShiftTowardsTargetSide + ) + ); + } + } + + /// @notice After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user. + /// @dev Once the market has updated for the next price, should be guaranteed (through modifiers) to execute for a user before user initiation of new next price actions. + /// @param user The address of the user for whom to execute the function. + /// @param marketIndex An uint32 which uniquely identifies a market. + function _executeOutstandingNextPriceSettlements(address user, uint32 marketIndex) + internal + virtual + { + uint256 userCurrentUpdateIndex = userNextPrice_currentUpdateIndex[marketIndex][user]; + if (userCurrentUpdateIndex != 0 && userCurrentUpdateIndex <= marketUpdateIndex[marketIndex]) { + _executeOutstandingNextPriceMints(marketIndex, user, true); + _executeOutstandingNextPriceMints(marketIndex, user, false); + _executeOutstandingNextPriceRedeems(marketIndex, user, true); + _executeOutstandingNextPriceRedeems(marketIndex, user, false); + _executeOutstandingNextPriceTokenShifts(marketIndex, user, true); + _executeOutstandingNextPriceTokenShifts(marketIndex, user, false); + + userNextPrice_currentUpdateIndex[marketIndex][user] = 0; + + emit ExecuteNextPriceSettlementsUser(user, marketIndex); + } + } + + /// @notice After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user. + /// @param user The address of the user for whom to execute the function. + /// @param marketIndex An uint32 which uniquely identifies a market. + function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) + external + override + { + _executeOutstandingNextPriceSettlements(user, marketIndex); + } + + /// @notice Executes outstanding next price settlements for a user for multiple markets. + /// @param user The address of the user for whom to execute the function. + /// @param marketIndexes An array of int32s which each uniquely identify a market. + function executeOutstandingNextPriceSettlementsUserMulti( + address user, + uint32[] memory marketIndexes + ) external { + uint256 length = marketIndexes.length; + for (uint256 i = 0; i < length; i++) { + _executeOutstandingNextPriceSettlements(user, marketIndexes[i]); + } + } + + /*╔═══════════════════════════════════════════╗ + ║ BATCHED NEXT PRICE SETTLEMENT ACTIONS ║ + ╚═══════════════════════════════════════════╝*/ + + /// @notice Either transfers funds from the yield manager to this contract if redeems > deposits, + /// and vice versa. The yield manager handles depositing and withdrawing the funds from a yield market. + /// @dev When all batched next price actions are handled the total value in the market can either increase or decrease based on the value of mints and redeems. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param totalPaymentTokenValueChangeForMarket An int256 which indicates the magnitude and direction of the change in market value. + function _handleTotalPaymentTokenValueChangeForMarketWithYieldManager( + uint32 marketIndex, + int256 totalPaymentTokenValueChangeForMarket + ) internal virtual { + if (totalPaymentTokenValueChangeForMarket > 0) { + IYieldManager(yieldManagers[marketIndex]).depositPaymentToken( + uint256(totalPaymentTokenValueChangeForMarket) + ); + } else if (totalPaymentTokenValueChangeForMarket < 0) { + // NB there will be issues here if not enough liquidity exists to withdraw + // Boolean should be returned from yield manager and think how to appropriately handle this + IYieldManager(yieldManagers[marketIndex]).removePaymentTokenFromMarket( + uint256(-totalPaymentTokenValueChangeForMarket) + ); + } + } + + /// @notice Given a desired change in synth token supply, either mints or burns tokens to achieve that desired change. + /// @dev When all batched next price actions are executed total supply for a synth can either increase or decrease. + /// @param marketIndex An uint32 which uniquely identifies a market. + /// @param isLong Whether this function should execute for the long or short synth for the market. + /// @param changeInSyntheticTokensTotalSupply The amount in wei by which synth token supply should change. + function _handleChangeInSyntheticTokensTotalSupply( + uint32 marketIndex, + bool isLong, + int256 changeInSyntheticTokensTotalSupply + ) internal virtual { + if (changeInSyntheticTokensTotalSupply > 0) { + ISyntheticToken(syntheticTokens[marketIndex][isLong]).mint( + address(this), + uint256(changeInSyntheticTokensTotalSupply) + ); + } else if (changeInSyntheticTokensTotalSupply < 0) { + ISyntheticToken(syntheticTokens[marketIndex][isLong]).burn( + uint256(-changeInSyntheticTokensTotalSupply) + ); + } + } + + /** + @notice Performs all batched next price actions on an oracle price update. + @dev Mints or burns all synthetic tokens for this contract. + + After this function is executed all user actions in that batch are confirmed and can be settled individually by + calling _executeOutstandingNexPriceSettlements for a given user. + + The maths here is safe from rounding errors since it always over estimates on the batch with division. + (as an example (5/3) + (5/3) = 2 but (5+5)/3 = 10/3 = 3, so the batched action would mint one more) + @param marketIndex An uint32 which uniquely identifies a market. + @param syntheticTokenPrice_inPaymentTokens_long The long synthetic token price for this oracle price update. + @param syntheticTokenPrice_inPaymentTokens_short The short synthetic token price for this oracle price update. + @return long_changeInMarketValue_inPaymentToken The total value change for the long side after all batched actions are executed. + @return short_changeInMarketValue_inPaymentToken The total value change for the short side after all batched actions are executed. + */ + function _batchConfirmOutstandingPendingActions( + uint32 marketIndex, + uint256 syntheticTokenPrice_inPaymentTokens_long, + uint256 syntheticTokenPrice_inPaymentTokens_short + ) + internal + virtual + returns ( + int256 long_changeInMarketValue_inPaymentToken, + int256 short_changeInMarketValue_inPaymentToken + ) + { + int256 changeInSupply_syntheticToken_long; + int256 changeInSupply_syntheticToken_short; + + // NOTE: the only reason we are reusing amountForCurrentAction_workingVariable for all actions (redeemLong, redeemShort, mintLong, mintShort, shiftFromLong, shiftFromShort) is to reduce stack usage + uint256 amountForCurrentAction_workingVariable = batched_amountPaymentToken_deposit[ + marketIndex + ][true]; + + // Handle batched deposits LONG + if (amountForCurrentAction_workingVariable > 0) { + long_changeInMarketValue_inPaymentToken = int256(amountForCurrentAction_workingVariable); + + batched_amountPaymentToken_deposit[marketIndex][true] = 0; + + changeInSupply_syntheticToken_long = int256( + _getAmountSyntheticToken( + amountForCurrentAction_workingVariable, + syntheticTokenPrice_inPaymentTokens_long + ) + ); + } + + // Handle batched deposits SHORT + amountForCurrentAction_workingVariable = batched_amountPaymentToken_deposit[marketIndex][false]; + if (amountForCurrentAction_workingVariable > 0) { + short_changeInMarketValue_inPaymentToken = int256(amountForCurrentAction_workingVariable); + + batched_amountPaymentToken_deposit[marketIndex][false] = 0; + + changeInSupply_syntheticToken_short = int256( + _getAmountSyntheticToken( + amountForCurrentAction_workingVariable, + syntheticTokenPrice_inPaymentTokens_short + ) + ); + } + + // Handle shift tokens from LONG to SHORT + amountForCurrentAction_workingVariable = batched_amountSyntheticToken_toShiftAwayFrom_marketSide[ + marketIndex + ][true]; + + if (amountForCurrentAction_workingVariable > 0) { + int256 paymentTokenValueChangeForShiftToShort = int256( + _getAmountPaymentToken( + amountForCurrentAction_workingVariable, + syntheticTokenPrice_inPaymentTokens_long + ) + ); + + long_changeInMarketValue_inPaymentToken -= paymentTokenValueChangeForShiftToShort; + short_changeInMarketValue_inPaymentToken += paymentTokenValueChangeForShiftToShort; + + changeInSupply_syntheticToken_long -= int256(amountForCurrentAction_workingVariable); + changeInSupply_syntheticToken_short += int256( + _getEquivalentAmountSyntheticTokensOnTargetSide( + amountForCurrentAction_workingVariable, + syntheticTokenPrice_inPaymentTokens_long, + syntheticTokenPrice_inPaymentTokens_short + ) + ); + + batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][true] = 0; + } + + // Handle shift tokens from SHORT to LONG + amountForCurrentAction_workingVariable = batched_amountSyntheticToken_toShiftAwayFrom_marketSide[ + marketIndex + ][false]; + if (amountForCurrentAction_workingVariable > 0) { + int256 paymentTokenValueChangeForShiftToLong = int256( + _getAmountPaymentToken( + amountForCurrentAction_workingVariable, + syntheticTokenPrice_inPaymentTokens_short + ) + ); + + short_changeInMarketValue_inPaymentToken -= paymentTokenValueChangeForShiftToLong; + long_changeInMarketValue_inPaymentToken += paymentTokenValueChangeForShiftToLong; + + changeInSupply_syntheticToken_short -= int256(amountForCurrentAction_workingVariable); + changeInSupply_syntheticToken_long += int256( + _getEquivalentAmountSyntheticTokensOnTargetSide( + amountForCurrentAction_workingVariable, + syntheticTokenPrice_inPaymentTokens_short, + syntheticTokenPrice_inPaymentTokens_long + ) + ); + + batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][false] = 0; + } + + // Handle batched redeems LONG + amountForCurrentAction_workingVariable = batched_amountSyntheticToken_redeem[marketIndex][true]; + if (amountForCurrentAction_workingVariable > 0) { + long_changeInMarketValue_inPaymentToken -= int256( + _getAmountPaymentToken( + amountForCurrentAction_workingVariable, + syntheticTokenPrice_inPaymentTokens_long + ) + ); + changeInSupply_syntheticToken_long -= int256(amountForCurrentAction_workingVariable); + + batched_amountSyntheticToken_redeem[marketIndex][true] = 0; + } + + // Handle batched redeems SHORT + amountForCurrentAction_workingVariable = batched_amountSyntheticToken_redeem[marketIndex][ + false + ]; + if (amountForCurrentAction_workingVariable > 0) { + short_changeInMarketValue_inPaymentToken -= int256( + _getAmountPaymentToken( + amountForCurrentAction_workingVariable, + syntheticTokenPrice_inPaymentTokens_short + ) + ); + changeInSupply_syntheticToken_short -= int256(amountForCurrentAction_workingVariable); + + batched_amountSyntheticToken_redeem[marketIndex][false] = 0; + } + + // Batch settle payment tokens + _handleTotalPaymentTokenValueChangeForMarketWithYieldManager( + marketIndex, + long_changeInMarketValue_inPaymentToken + short_changeInMarketValue_inPaymentToken + ); + // Batch settle synthetic tokens + _handleChangeInSyntheticTokensTotalSupply( + marketIndex, + true, + changeInSupply_syntheticToken_long + ); + _handleChangeInSyntheticTokensTotalSupply( + marketIndex, + false, + changeInSupply_syntheticToken_short + ); + } +} diff --git a/contracts/Staker.sol b/contracts/Staker.sol new file mode 100644 index 0000000..dc1316c --- /dev/null +++ b/contracts/Staker.sol @@ -0,0 +1,1052 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol"; + +import "./abstract/AccessControlledAndUpgradeable.sol"; + +import "./interfaces/IFloatToken.sol"; +import "./interfaces/ILongShort.sol"; +import "./interfaces/IStaker.sol"; +import "./interfaces/ISyntheticToken.sol"; +import "./GEMS.sol"; +import "hardhat/console.sol"; + +contract Staker is IStaker, AccessControlledAndUpgradeable { + /*╔═════════════════════════════╗ + ║ VARIABLES ║ + ╚═════════════════════════════╝*/ + + bytes32 public constant DISCOUNT_ROLE = keccak256("DISCOUNT_ROLE"); + + /* ══════ Fixed-precision constants ══════ */ + uint256 public constant FLOAT_ISSUANCE_FIXED_DECIMAL = 3e44; + + /* ══════ Global state ══════ */ + address public floatCapital; + address public floatTreasury; + uint256 public floatPercentage; + + address public longShort; + address public floatToken; + + address public gems; + uint256[45] private __globalStateGap; + + /* ══════ Market specific ══════ */ + mapping(uint32 => uint256) public marketLaunchIncentive_period; // seconds + mapping(uint32 => uint256) public marketLaunchIncentive_multipliers; // e18 scale + mapping(uint32 => uint256) public marketUnstakeFee_e18; + mapping(uint32 => uint256) public balanceIncentiveCurve_exponent; + mapping(uint32 => int256) public balanceIncentiveCurve_equilibriumOffset; + mapping(uint32 => uint256) public safeExponentBitShifting; + + mapping(uint32 => mapping(bool => address)) public syntheticTokens; + uint256[45] private __marketStateGap; + + mapping(address => uint32) public marketIndexOfToken; + mapping(address => uint32) public userNonce; + uint256[45] private __synthStateGap; + + /* ══════ Reward specific ══════ */ + mapping(uint32 => uint256) public latestRewardIndex; // This is synced to be the same as LongShort + mapping(uint32 => mapping(uint256 => AccumulativeIssuancePerStakedSynthSnapshot)) + public accumulativeFloatPerSyntheticTokenSnapshots; + struct AccumulativeIssuancePerStakedSynthSnapshot { + uint256 timestamp; + uint256 accumulativeFloatPerSyntheticToken_long; + uint256 accumulativeFloatPerSyntheticToken_short; + } + + uint256[45] private __rewardStateGap; + /* ══════ User specific ══════ */ + mapping(uint32 => mapping(address => uint256)) public userIndexOfLastClaimedReward; + mapping(address => mapping(address => uint256)) public override userAmountStaked; + uint256[45] private __userStateGap; + + /* ══════ Next price action management specific ══════ */ + /// @dev marketIndex => usersAddress => stakedActionIndex + mapping(uint32 => mapping(address => uint256)) public userNextPrice_stakedActionIndex; + + /// @dev marketIndex => usersAddress => amountUserRequestedToShiftAwayFromLongOnNextUpdate + mapping(uint32 => mapping(bool => mapping(address => uint256))) + public userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom; + + /// @dev marketIndex => usersAddress => stakedActionIndex + mapping(uint32 => mapping(bool => mapping(address => uint256))) + public userNextPrice_paymentToken_depositAmount; + + /*╔═════════════════════════════╗ + ║ MODIFIERS ║ + ╚═════════════════════════════╝*/ + + function onlyAdminModifierLogic() internal virtual { + _checkRole(ADMIN_ROLE, msg.sender); + } + + modifier onlyAdmin() { + onlyAdminModifierLogic(); + _; + } + + function onlyValidSyntheticModifierLogic(address _synth) internal virtual { + require(marketIndexOfToken[_synth] != 0, "not valid synth"); + } + + modifier onlyValidSynthetic(address _synth) { + onlyValidSyntheticModifierLogic(_synth); + _; + } + + function onlyLongShortModifierLogic() internal virtual { + require(msg.sender == address(longShort), "not LongShort"); + } + + modifier onlyLongShort() { + onlyLongShortModifierLogic(); + _; + } + + function _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts( + uint32 marketIndex, + address user + ) internal virtual { + if ( + userNextPrice_stakedActionIndex[marketIndex][msg.sender] != 0 && + userNextPrice_stakedActionIndex[marketIndex][msg.sender] <= latestRewardIndex[marketIndex] + ) { + _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender); + } + } + + modifier updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts( + uint32 marketIndex, + address user + ) { + _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user); + _; + } + + modifier gemCollecting(address user) { + GEMS(gems).gm(user); + _; + } + + /*╔═════════════════════════════╗ + ║ CONTRACT SET-UP ║ + ╚═════════════════════════════╝*/ + + /** + @notice Initializes the contract. + @dev Calls OpenZeppelin's initializer modifier. + @param _admin Address of the admin role. + @param _longShort Address of the LongShort contract, a deployed LongShort.sol + @param _floatToken Address of the Float token earned by staking. + @param _floatTreasury Address of the treasury contract for managing fees. + @param _floatCapital Address of the contract which earns a fixed percentage of Float. + @param _floatPercentage Determines the float percentage that gets minted for Float Capital, base 1e18. + */ + function initialize( + address _admin, + address _longShort, + address _floatToken, + address _floatTreasury, + address _floatCapital, + address _discountSigner, + uint256 _floatPercentage, + address _gems + ) external virtual initializer { + require( + _admin != address(0) && + _longShort != address(0) && + _floatToken != address(0) && + _floatTreasury != address(0) && + _floatCapital != address(0) && + _gems != address(0) && + _floatPercentage != 0 + ); + + floatCapital = _floatCapital; + floatTreasury = _floatTreasury; + longShort = _longShort; + floatToken = _floatToken; + gems = _gems; + + _AccessControlledAndUpgradeable_init(_admin); + _setupRole(DISCOUNT_ROLE, _discountSigner); + + _changeFloatPercentage(_floatPercentage); + + emit StakerV1(_admin, _floatTreasury, _floatCapital, _floatToken, _floatPercentage); + } + + /*╔═══════════════════╗ + ║ ADMIN ║ + ╚═══════════════════╝*/ + + /// @dev Logic for changeFloatPercentage + function _changeFloatPercentage(uint256 newFloatPercentage) internal virtual { + require(newFloatPercentage <= 1e18 && newFloatPercentage > 0); // less than or equal to 100% and greater than 0% + floatPercentage = newFloatPercentage; + } + + /** + @notice Changes percentage of float that is minted for float capital. + @param newFloatPercentage The new float percentage in base 1e18. + */ + function changeFloatPercentage(uint256 newFloatPercentage) external onlyAdmin { + _changeFloatPercentage(newFloatPercentage); + emit FloatPercentageUpdated(newFloatPercentage); + } + + /// @dev Logic for changeUnstakeFee + function _changeUnstakeFee(uint32 marketIndex, uint256 newMarketUnstakeFee_e18) internal virtual { + require(newMarketUnstakeFee_e18 <= 5e16); // Explicitly stating 5% fee as the max fee possible. + marketUnstakeFee_e18[marketIndex] = newMarketUnstakeFee_e18; + } + + /** + @notice Changes unstake fee for a market + @param marketIndex Identifies the market. + @param newMarketUnstakeFee_e18 The new unstake fee. + */ + function changeUnstakeFee(uint32 marketIndex, uint256 newMarketUnstakeFee_e18) + external + onlyAdmin + { + _changeUnstakeFee(marketIndex, newMarketUnstakeFee_e18); + emit StakeWithdrawalFeeUpdated(marketIndex, newMarketUnstakeFee_e18); + } + + /// @dev Logic for changeBalanceIncentiveExponent + function _changeBalanceIncentiveParameters( + uint32 marketIndex, + uint256 _balanceIncentiveCurve_exponent, + int256 _balanceIncentiveCurve_equilibriumOffset, + uint256 _safeExponentBitShifting + ) internal virtual { + // Unreasonable that we would ever shift this more than 90% either way + require( + _balanceIncentiveCurve_equilibriumOffset > -9e17 && + _balanceIncentiveCurve_equilibriumOffset < 9e17, + "balanceIncentiveCurve_equilibriumOffset out of bounds" + ); + require(_balanceIncentiveCurve_exponent > 0, "balanceIncentiveCurve_exponent out of bounds"); + require(_safeExponentBitShifting < 100, "safeExponentBitShifting out of bounds"); + + uint256 totalLocked = ILongShort(longShort).marketSideValueInPaymentToken(marketIndex, true) + + ILongShort(longShort).marketSideValueInPaymentToken(marketIndex, false); + + // SafeMATH will revert here if this value is too big. + (((totalLocked * 500) >> _safeExponentBitShifting)**_balanceIncentiveCurve_exponent); + // Required to ensure at least 3 digits of precision. + require( + totalLocked >> _safeExponentBitShifting > 100, + "bit shifting too lange for total locked" + ); + + balanceIncentiveCurve_exponent[marketIndex] = _balanceIncentiveCurve_exponent; + balanceIncentiveCurve_equilibriumOffset[marketIndex] = _balanceIncentiveCurve_equilibriumOffset; + safeExponentBitShifting[marketIndex] = _safeExponentBitShifting; + } + + /** + @notice Changes the balance incentive exponent for a market + @param marketIndex Identifies the market. + @param _balanceIncentiveCurve_exponent The new exponent for the curve. + @param _balanceIncentiveCurve_equilibriumOffset The new offset. + @param _safeExponentBitShifting The new bitshifting applied to the curve. + */ + function changeBalanceIncentiveParameters( + uint32 marketIndex, + uint256 _balanceIncentiveCurve_exponent, + int256 _balanceIncentiveCurve_equilibriumOffset, + uint256 _safeExponentBitShifting + ) external onlyAdmin { + _changeBalanceIncentiveParameters( + marketIndex, + _balanceIncentiveCurve_exponent, + _balanceIncentiveCurve_equilibriumOffset, + _safeExponentBitShifting + ); + + emit BalanceIncentiveParamsUpdated( + marketIndex, + _balanceIncentiveCurve_exponent, + _balanceIncentiveCurve_equilibriumOffset, + _safeExponentBitShifting + ); + } + + /*╔═════════════════════════════╗ + ║ STAKING SETUP ║ + ╚═════════════════════════════╝*/ + + /** + @notice Sets this contract to track staking for a market in LongShort.sol + @param marketIndex Identifies the market. + @param longToken Address of the long token for the market. + @param shortToken Address of the short token for the market. + @param kInitialMultiplier Initial boost on float generation for the market. + @param kPeriod Period which the boost should last. + @param unstakeFee_e18 Percentage of tokens that are levied on unstaking in base 1e18. + @param _balanceIncentiveCurve_exponent Exponent for balance curve (see _calculateFloatPerSecond) + @param _balanceIncentiveCurve_equilibriumOffset Offset for balance curve (see _calculateFloatPerSecond) + */ + function addNewStakingFund( + uint32 marketIndex, + address longToken, + address shortToken, + uint256 kInitialMultiplier, + uint256 kPeriod, + uint256 unstakeFee_e18, + uint256 _balanceIncentiveCurve_exponent, + int256 _balanceIncentiveCurve_equilibriumOffset + ) external override onlyLongShort { + require(kInitialMultiplier >= 1e18, "kInitialMultiplier must be >= 1e18"); + + // a safe initial default value + uint256 initialSafeExponentBitShifting = 50; + + marketIndexOfToken[longToken] = marketIndex; + marketIndexOfToken[shortToken] = marketIndex; + + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0].timestamp = block.timestamp; + + syntheticTokens[marketIndex][true] = longToken; + syntheticTokens[marketIndex][false] = shortToken; + _changeBalanceIncentiveParameters( + marketIndex, + _balanceIncentiveCurve_exponent, + _balanceIncentiveCurve_equilibriumOffset, + initialSafeExponentBitShifting + ); + + marketLaunchIncentive_period[marketIndex] = kPeriod; + marketLaunchIncentive_multipliers[marketIndex] = kInitialMultiplier; + + _changeUnstakeFee(marketIndex, unstakeFee_e18); + + emit MarketAddedToStaker( + marketIndex, + unstakeFee_e18, + kPeriod, + kInitialMultiplier, + _balanceIncentiveCurve_exponent, + _balanceIncentiveCurve_equilibriumOffset, + initialSafeExponentBitShifting + ); + + emit AccumulativeIssuancePerStakedSynthSnapshotCreated(marketIndex, 0, 0, 0); + } + + /*╔═════════════════════════════════════════════════════════════════════════╗ + ║ GLOBAL FLT REWARD ACCUMULATION CALCULATION AND TRACKING FUNCTIONS ║ + ╚═════════════════════════════════════════════════════════════════════════╝*/ + + /** + @notice Returns the K factor parameters for the given market with sensible + defaults if they haven't been set yet. + @param marketIndex The market to change the parameters for. + @return period The period for which the k factor applies for in seconds. + @return multiplier The multiplier on Float generation in this period. + */ + function _getMarketLaunchIncentiveParameters(uint32 marketIndex) + internal + view + virtual + returns (uint256 period, uint256 multiplier) + { + period = marketLaunchIncentive_period[marketIndex]; // seconds TODO change name to contain seconds + multiplier = marketLaunchIncentive_multipliers[marketIndex]; // 1e18 TODO change name to contain E18 + + if (multiplier < 1e18) { + multiplier = 1e18; // multiplier of 1 by default + } + } + + /** + @notice Returns the extent to which a markets float generation should be adjusted + based on the market's launch incentive parameters. Should start at multiplier + then linearly change to 1e18 over time. + @param marketIndex Identifies the market. + @return k The calculated modifier for float generation. + */ + function _getKValue(uint32 marketIndex) internal view virtual returns (uint256) { + // Parameters controlling the float issuance multiplier. + (uint256 kPeriod, uint256 kInitialMultiplier) = _getMarketLaunchIncentiveParameters( + marketIndex + ); + + // Sanity check - under normal circumstances, the multipliers should + // *never* be set to a value < 1e18, as there are guards against this. + assert(kInitialMultiplier >= 1e18); + + uint256 initialTimestamp = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0] + .timestamp; + + if (block.timestamp - initialTimestamp < kPeriod) { + return + kInitialMultiplier - + (((kInitialMultiplier - 1e18) * (block.timestamp - initialTimestamp)) / kPeriod); + } else { + return 1e18; + } + } + + /* + @notice Computes the number of float tokens a user earns per second for + every long/short synthetic token they've staked. The returned value has + a fixed decimal scale of 1e42 (!!!) for numerical stability. The return + values are float per second per synthetic token (hence the requirement + to multiply by price) + @dev to see below math in latex form see: + https://ipfs.io/ipfs/QmRWbr8P1F588XqRTzm7wCsRPu8DcDVPWGriBach4f22Fq/staker-fps.pdf + to interact with the equations see https://www.desmos.com/calculator/optkaxyihr + @param marketIndex The market referred to. + @param longPrice Price of the synthetic long token in units of payment token + @param shortPrice Price of the synthetic short token in units of payment token + @param longValue Amount of payment token in the long side of the market + @param shortValue Amount of payment token in the short side of the market + @return longFloatPerSecond Float token per second per long synthetic token + @return shortFloatPerSecond Float token per second per short synthetic token + */ + function _calculateFloatPerSecond( + uint32 marketIndex, + uint256 longPrice, + uint256 shortPrice, + uint256 longValue, + uint256 shortValue + ) internal view virtual returns (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) { + // A float issuance multiplier that starts high and decreases linearly + // over time to a value of 1. This incentivises users to stake early. + uint256 k = _getKValue(marketIndex); + + uint256 totalLocked = (longValue + shortValue); + + // we need to scale this number by the totalLocked so that the offset remains consistent accross market size + + int256 equilibriumOffsetMarketScaled = (balanceIncentiveCurve_equilibriumOffset[marketIndex] * + int256(totalLocked)) / 2e18; + + uint256 safetyBitShifting = safeExponentBitShifting[marketIndex]; + + // Float is scaled by the percentage of the total market value held in + // the opposite position. This incentivises users to stake on the + // weaker position. + if (int256(shortValue) - (2 * equilibriumOffsetMarketScaled) < int256(longValue)) { + if (equilibriumOffsetMarketScaled >= int256(shortValue)) { + // edge case: imbalanced far past the equilibrium offset - full rewards go to short token + // extremely unlikely to happen in practice + return (0, k * shortPrice); + } + + uint256 numerator = (uint256(int256(shortValue) - equilibriumOffsetMarketScaled) >> + (safetyBitShifting - 1))**balanceIncentiveCurve_exponent[marketIndex]; + + uint256 denominator = ((totalLocked >> safetyBitShifting) ** + balanceIncentiveCurve_exponent[marketIndex]); + + // NOTE: `x * 5e17` == `(x * 1e18) / 2` + uint256 longRewardUnscaled = (numerator * 5e17) / denominator; + uint256 shortRewardUnscaled = 1e18 - longRewardUnscaled; + + return ( + (longRewardUnscaled * k * longPrice) / 1e18, + (shortRewardUnscaled * k * shortPrice) / 1e18 + ); + } else { + if (-equilibriumOffsetMarketScaled >= int256(longValue)) { + // edge case: imbalanced far past the equilibrium offset - full rewards go to long token + // extremely unlikely to happen in practice + return (k * longPrice, 0); + } + + uint256 numerator = (uint256(int256(longValue) + equilibriumOffsetMarketScaled) >> + (safetyBitShifting - 1))**balanceIncentiveCurve_exponent[marketIndex]; + + uint256 denominator = ((totalLocked >> safetyBitShifting) ** + balanceIncentiveCurve_exponent[marketIndex]); + + // NOTE: `x * 5e17` == `(x * 1e18) / 2` + uint256 shortRewardUnscaled = (numerator * 5e17) / denominator; + uint256 longRewardUnscaled = 1e18 - shortRewardUnscaled; + + return ( + (longRewardUnscaled * k * longPrice) / 1e18, + (shortRewardUnscaled * k * shortPrice) / 1e18 + ); + } + } + + /** + @notice Computes the time since last accumulativeIssuancePerStakedSynthSnapshot for the given market in seconds. + @param marketIndex The market referred to. + @return timeDelta The time difference in seconds + */ + function _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot( + uint32 marketIndex, + uint256 previousMarketUpdateIndex + ) internal view virtual returns (uint256 timeDelta) { + return + block.timestamp - + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex].timestamp; + } + + /** + @notice Computes new cumulative sum of 'r' value since last accumulativeIssuancePerStakedSynthSnapshot. We use + cumulative 'r' value to avoid looping during issuance. Note that the + cumulative sum is kept in 1e42 scale (!!!) to avoid numerical issues. + @param shortValue The value locked in the short side of the market. + @param longValue The value locked in the long side of the market. + @param shortPrice The price of the short token as defined in LongShort.sol + @param longPrice The price of the long token as defined in LongShort.sol + @param marketIndex An identifier for the market. + @return longCumulativeRates The long cumulative sum. + @return shortCumulativeRates The short cumulative sum. + */ + function _calculateNewCumulativeIssuancePerStakedSynth( + uint32 marketIndex, + uint256 previousMarketUpdateIndex, + uint256 longPrice, + uint256 shortPrice, + uint256 longValue, + uint256 shortValue + ) internal view virtual returns (uint256 longCumulativeRates, uint256 shortCumulativeRates) { + // Compute the current 'r' value for float issuance per second. + (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) = _calculateFloatPerSecond( + marketIndex, + longPrice, + shortPrice, + longValue, + shortValue + ); + + // Compute time since last accumulativeIssuancePerStakedSynthSnapshot for the given token. + uint256 timeDelta = _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot( + marketIndex, + previousMarketUpdateIndex + ); + + // Compute new cumulative 'r' value total. + return ( + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex] + .accumulativeFloatPerSyntheticToken_long + (timeDelta * longFloatPerSecond), + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex] + .accumulativeFloatPerSyntheticToken_short + (timeDelta * shortFloatPerSecond) + ); + } + + /** + @notice Adds new accumulativeIssuancePerStakedSynthSnapshots for the given long/short tokens. Called by the + ILongShort contract whenever there is a state change for a market. + @param marketIndex An identifier for the market. + @param marketUpdateIndex Current update index in the LongShort contract for this market. + @param shortValue The value locked in the short side of the market. + @param longValue The value locked in the long side of the market. + @param shortPrice The price of the short token as defined in LongShort.sol + @param longPrice The price of the long token as defined in LongShort.sol + */ + function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations( + uint32 marketIndex, + uint256 marketUpdateIndex, + uint256 longPrice, + uint256 shortPrice, + uint256 longValue, + uint256 shortValue + ) external override onlyLongShort { + ( + uint256 newLongAccumulativeValue, + uint256 newShortAccumulativeValue + ) = _calculateNewCumulativeIssuancePerStakedSynth( + marketIndex, + marketUpdateIndex - 1, + longPrice, + shortPrice, + longValue, + shortValue + ); + + // Set cumulative 'r' value on new accumulativeIssuancePerStakedSynthSnapshot. + + AccumulativeIssuancePerStakedSynthSnapshot + storage accumulativeFloatPerSyntheticTokenSnapshot = accumulativeFloatPerSyntheticTokenSnapshots[ + marketIndex + ][marketUpdateIndex]; + accumulativeFloatPerSyntheticTokenSnapshot + .accumulativeFloatPerSyntheticToken_long = newLongAccumulativeValue; + accumulativeFloatPerSyntheticTokenSnapshot + .accumulativeFloatPerSyntheticToken_short = newShortAccumulativeValue; + + // Set timestamp on new accumulativeIssuancePerStakedSynthSnapshot. + accumulativeFloatPerSyntheticTokenSnapshot.timestamp = block.timestamp; + + // Update latest index to point to new accumulativeIssuancePerStakedSynthSnapshot. + latestRewardIndex[marketIndex] = marketUpdateIndex; + + emit AccumulativeIssuancePerStakedSynthSnapshotCreated( + marketIndex, + marketUpdateIndex, + newLongAccumulativeValue, + newShortAccumulativeValue + ); + } + + /*╔═══════════════════════════════════╗ + ║ USER REWARD STATE FUNCTIONS ║ + ╚═══════════════════════════════════╝*/ + + /// @dev Calculates the accumulated float in a specific range of staker snapshots + function _calculateAccumulatedFloatInRange( + uint32 marketIndex, + uint256 amountStakedLong, + uint256 amountStakedShort, + uint256 rewardIndexFrom, + uint256 rewardIndexTo + ) internal view virtual returns (uint256 floatReward) { + if (amountStakedLong > 0) { + uint256 accumDeltaLong = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][ + rewardIndexTo + ].accumulativeFloatPerSyntheticToken_long - + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom] + .accumulativeFloatPerSyntheticToken_long; + floatReward += (accumDeltaLong * amountStakedLong) / FLOAT_ISSUANCE_FIXED_DECIMAL; + } + + if (amountStakedShort > 0) { + uint256 accumDeltaShort = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][ + rewardIndexTo + ].accumulativeFloatPerSyntheticToken_short - + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom] + .accumulativeFloatPerSyntheticToken_short; + floatReward += (accumDeltaShort * amountStakedShort) / FLOAT_ISSUANCE_FIXED_DECIMAL; + } + } + + /** + @notice Calculates float owed to the user since the user last minted float for a market. + @param marketIndex Identifier for the market which the user staked in. + @param user The address of the user. + @return floatReward The amount of float owed. + */ + function _calculateAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user) + internal + virtual + returns (uint256 floatReward) + { + address longToken = syntheticTokens[marketIndex][true]; + address shortToken = syntheticTokens[marketIndex][false]; + + uint256 amountStakedLong = userAmountStaked[longToken][user]; + uint256 amountStakedShort = userAmountStaked[shortToken][user]; + + uint256 usersLastRewardIndex = userIndexOfLastClaimedReward[marketIndex][user]; + + uint256 currentRewardIndex = latestRewardIndex[marketIndex]; + + // Don't do the calculation and return zero immediately if there is no change + if (usersLastRewardIndex == currentRewardIndex) { + return 0; + } + + uint256 usersShiftIndex = userNextPrice_stakedActionIndex[marketIndex][user]; + // if there is a change in the users tokens held due to a token shift (or possibly another action in the future) + if (usersShiftIndex > 0 && usersShiftIndex <= currentRewardIndex) { + floatReward = _calculateAccumulatedFloatInRange( + marketIndex, + amountStakedLong, + amountStakedShort, + usersLastRewardIndex, + usersShiftIndex + ); + + // Update the users balances + + uint256 amountToShiftAwayFromCurrentSide = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[ + marketIndex + ][true][user]; + // Handle shifts from LONG side: + if (amountToShiftAwayFromCurrentSide > 0) { + amountStakedShort += ILongShort(longShort).getAmountSyntheticTokenToMintOnTargetSide( + marketIndex, + amountToShiftAwayFromCurrentSide, + true, + usersShiftIndex + ); + + amountStakedLong -= amountToShiftAwayFromCurrentSide; + userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][user] = 0; + } + + amountToShiftAwayFromCurrentSide = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[ + marketIndex + ][false][user]; + // Handle shifts from SHORT side: + if (amountToShiftAwayFromCurrentSide > 0) { + amountStakedLong += ILongShort(longShort).getAmountSyntheticTokenToMintOnTargetSide( + marketIndex, + amountToShiftAwayFromCurrentSide, + false, + usersShiftIndex + ); + + amountStakedShort -= amountToShiftAwayFromCurrentSide; + userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][user] = 0; + } + + // Save the users updated staked amounts + userAmountStaked[longToken][user] = amountStakedLong; + userAmountStaked[shortToken][user] = amountStakedShort; + + emit StakeShifted(user, marketIndex, amountStakedLong, amountStakedShort); + + floatReward += _calculateAccumulatedFloatInRange( + marketIndex, + amountStakedLong, + amountStakedShort, + usersShiftIndex, + currentRewardIndex + ); + + userNextPrice_stakedActionIndex[marketIndex][user] = 0; + } else { + floatReward = _calculateAccumulatedFloatInRange( + marketIndex, + amountStakedLong, + amountStakedShort, + usersLastRewardIndex, + currentRewardIndex + ); + } + } + + /** + @notice Mints float for a user. + @dev Mints a fixed percentage for Float capital. + @param user The address of the user. + @param floatToMint The amount of float to mint. + */ + function _mintFloat(address user, uint256 floatToMint) internal virtual { + IFloatToken(floatToken).mint(user, floatToMint); + IFloatToken(floatToken).mint(floatCapital, (floatToMint * floatPercentage) / 1e18); + } + + /** + @notice Mints float owed to a user for a market since they last minted. + @param marketIndex An identifier for the market. + @param user The address of the user. + */ + function _mintAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user) + internal + virtual + { + uint256 floatToMint = _calculateAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user); + + if (floatToMint > 0) { + // Set the user has claimed up until now, stops them setting this forward + userIndexOfLastClaimedReward[marketIndex][user] = latestRewardIndex[marketIndex]; + + _mintFloat(user, floatToMint); + emit FloatMinted(user, marketIndex, floatToMint); + } + } + + /** + @notice Mints float owed to a user for multiple markets, since they last minted for those markets. + @param marketIndexes Identifiers for the markets. + @param user The address of the user. + */ + function _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti( + uint32[] calldata marketIndexes, + address user + ) internal virtual { + uint256 floatTotal = 0; + uint256 length = marketIndexes.length; + for (uint256 i = 0; i < length; i++) { + uint256 floatToMint = _calculateAccumulatedFloatAndExecuteOutstandingShifts( + marketIndexes[i], + user + ); + + if (floatToMint > 0) { + // Set the user has claimed up until now, stops them setting this forward + userIndexOfLastClaimedReward[marketIndexes[i]][user] = latestRewardIndex[marketIndexes[i]]; + + floatTotal += floatToMint; + + emit FloatMinted(user, marketIndexes[i], floatToMint); + } + } + if (floatTotal > 0) { + _mintFloat(user, floatTotal); + } + } + + /** + @notice Mints outstanding float for msg.sender. + @param marketIndexes Identifiers for the markets for which to mint float. + */ + function claimFloatCustom(uint32[] calldata marketIndexes) external { + ILongShort(longShort).updateSystemStateMulti(marketIndexes); + _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, msg.sender); + } + + /** + @notice Mints outstanding float on behalf of another user. + @param marketIndexes Identifiers for the markets for which to mint float. + @param user The address of the user. + */ + function claimFloatCustomFor(uint32[] calldata marketIndexes, address user) external { + // Unbounded loop - users are responsible for paying their own gas costs on these and it doesn't effect the rest of the system. + // No need to impose limit. + ILongShort(longShort).updateSystemStateMulti(marketIndexes); + _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, user); + } + + /*╔═══════════════════════╗ + ║ STAKING ║ + ╚═══════════════════════╝*/ + + /** + @notice A user with synthetic tokens stakes by calling stake on the token + contract which calls this function. We need to first update the + state of the LongShort contract for this market before staking to correctly calculate user rewards. + @param amount Amount to stake. + @param from Address to stake for. + */ + function stakeFromUser(address from, uint256 amount) + external + virtual + override + onlyValidSynthetic(msg.sender) + gemCollecting(from) + { + uint32 marketIndex = marketIndexOfToken[msg.sender]; + ILongShort(longShort).updateSystemState(marketIndex); + + uint256 userCurrentIndexOfLastClaimedReward = userIndexOfLastClaimedReward[marketIndex][from]; + uint256 currentRewardIndex = latestRewardIndex[marketIndex]; + // If they already have staked and have rewards due, mint these. + if ( + userCurrentIndexOfLastClaimedReward != 0 && + userCurrentIndexOfLastClaimedReward < currentRewardIndex + ) { + _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, from); + } + + userAmountStaked[msg.sender][from] += amount; + + // NOTE: Users retroactively earn a little bit of FLT because they start earning from the previous update index. + userIndexOfLastClaimedReward[marketIndex][from] = currentRewardIndex; + + emit StakeAdded(from, msg.sender, amount, currentRewardIndex); + } + + /** + @notice Allows users to shift their staked tokens from one side of the market to + the other at the next price. + @param amountSyntheticTokensToShift Amount of tokens to shift. + @param marketIndex Identifier for the market. + @param isShiftFromLong Whether the shift is from long to short or short to long. + */ + function shiftTokens( + uint256 amountSyntheticTokensToShift, + uint32 marketIndex, + bool isShiftFromLong + ) + external + virtual + override + updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts( + marketIndex, + msg.sender + ) + gemCollecting(msg.sender) + { + require(amountSyntheticTokensToShift > 0, "No zero shifts."); + address token = syntheticTokens[marketIndex][isShiftFromLong]; + uint256 totalAmountForNextShift = amountSyntheticTokensToShift + + userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][isShiftFromLong][ + msg.sender + ]; + + require( + userAmountStaked[token][msg.sender] >= totalAmountForNextShift, + "Not enough tokens to shift" + ); + + ILongShort(longShort).shiftPositionNextPrice( + marketIndex, + amountSyntheticTokensToShift, + isShiftFromLong + ); + + userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][isShiftFromLong][ + msg.sender + ] = totalAmountForNextShift; + + uint256 userRewardIndex = latestRewardIndex[marketIndex] + 1; + userNextPrice_stakedActionIndex[marketIndex][msg.sender] = userRewardIndex; + + emit NextPriceStakeShift( + msg.sender, + marketIndex, + amountSyntheticTokensToShift, + isShiftFromLong, + userRewardIndex + ); + } + + /*╔════════════════════════════╗ + ║ WITHDRAWAL & MINTING ║ + ╚════════════════════════════╝*/ + + /** + @notice Internal logic for withdrawing stakes. + @dev Mint user any outstanding float before withdrawing. + @param marketIndex Market index of token. + @param amount Amount to withdraw. + @param token Synthetic token that was staked. + */ + function _withdraw( + uint32 marketIndex, + address token, + uint256 amount + ) internal virtual gemCollecting(msg.sender) { + uint256 amountFees = (amount * marketUnstakeFee_e18[marketIndex]) / 1e18; + + ISyntheticToken(token).transfer(floatTreasury, amountFees); + ISyntheticToken(token).transfer(msg.sender, amount - amountFees); + + emit StakeWithdrawn(msg.sender, token, amount); + } + + function _withdrawPrepLogic( + uint32 marketIndex, + bool isWithdrawFromLong, + uint256 amount, + address token + ) internal { + ILongShort(longShort).updateSystemState(marketIndex); + _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender); + + uint256 currentAmountStaked = userAmountStaked[token][msg.sender]; + // If this value is greater than zero they have pending nextPriceShifts; don't allow user to shit these reserved tokens. + uint256 amountToShiftForThisToken = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[ + marketIndex + ][isWithdrawFromLong][msg.sender]; + + unchecked { + require(currentAmountStaked >= amount + amountToShiftForThisToken, "not enough to withdraw"); + userAmountStaked[token][msg.sender] = currentAmountStaked - amount; + } + } + + /** + @notice Withdraw function. Allows users to unstake. + @param amount Amount to withdraw. + @param marketIndex Market index of staked synthetic token + @param isWithdrawFromLong is synthetic token to be withdrawn long or short + */ + function withdraw( + uint32 marketIndex, + bool isWithdrawFromLong, + uint256 amount + ) external { + address token = syntheticTokens[marketIndex][isWithdrawFromLong]; + _withdrawPrepLogic(marketIndex, isWithdrawFromLong, amount, token); + _withdraw(marketIndex, token, amount); + } + + /** + @notice Allows users to withdraw their entire stake for a token. + @param marketIndex Market index of staked synthetic token + @param isWithdrawFromLong is synthetic token to be withdrawn long or short + */ + function withdrawAll(uint32 marketIndex, bool isWithdrawFromLong) external { + ILongShort(longShort).updateSystemState(marketIndex); + _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender); + + address token = syntheticTokens[marketIndex][isWithdrawFromLong]; + + uint256 userAmountStakedBeforeWithdrawal = userAmountStaked[token][msg.sender]; + + uint256 amountToShiftForThisToken = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[ + marketIndex + ][isWithdrawFromLong][msg.sender]; + userAmountStaked[token][msg.sender] = amountToShiftForThisToken; + + _withdraw(marketIndex, token, userAmountStakedBeforeWithdrawal - amountToShiftForThisToken); + } + + function _hasher( + uint32 marketIndex, + bool isWithdrawFromLong, + address user, + uint256 withdrawAmount, + uint256 expiry, + uint256 nonce, + uint256 discountWithdrawFee + ) internal pure returns (bytes32) { + return + keccak256( + abi.encodePacked( + "\x19Ethereum Signed Message:\n32", + keccak256( + abi.encodePacked( + marketIndex, + isWithdrawFromLong, + user, + withdrawAmount, + expiry, + nonce, + discountWithdrawFee + ) + ) + ) + ); + } + + function withdrawWithVoucher( + uint32 marketIndex, + bool isWithdrawFromLong, + uint256 withdrawAmount, + uint256 expiry, + uint256 nonce, + uint256 discountWithdrawFee, + uint8 v, + bytes32 r, + bytes32 s + ) external gemCollecting(msg.sender) { + address discountSigner = ecrecover( + _hasher( + marketIndex, + isWithdrawFromLong, + msg.sender, + withdrawAmount, + expiry, + nonce, + discountWithdrawFee + ), + v, + r, + s + ); + hasRole(DISCOUNT_ROLE, discountSigner); + + require(block.timestamp < expiry, "coupon expired"); + require(userNonce[msg.sender] == nonce, "invalid nonce"); + require(discountWithdrawFee < marketUnstakeFee_e18[marketIndex], "bad discount fee"); + userNonce[msg.sender] = userNonce[msg.sender] + 1; + + address token = syntheticTokens[marketIndex][isWithdrawFromLong]; + + _withdrawPrepLogic(marketIndex, isWithdrawFromLong, withdrawAmount, token); + + uint256 amountFees = (withdrawAmount * discountWithdrawFee) / 1e18; + ISyntheticToken(token).transfer(floatTreasury, amountFees); + ISyntheticToken(token).transfer(msg.sender, withdrawAmount - amountFees); + emit StakeWithdrawn(msg.sender, token, withdrawAmount); + } +} diff --git a/contracts/StakingStrategy.sol b/contracts/StakingStrategy.sol new file mode 100644 index 0000000..06160ce --- /dev/null +++ b/contracts/StakingStrategy.sol @@ -0,0 +1,260 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; + +import "./interfaces/ILongShort.sol"; +import "./interfaces/ISyntheticToken.sol"; +import "./interfaces/IStaker.sol"; +import "./StrategyToken.sol"; + +/** @title ILO Contract */ +contract StakingStrategy is Initializable, UUPSUpgradeable, AccessControlUpgradeable { + bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); + + address public longShort; + address public staker; + StrategyToken public strategyToken; + + /*╔═════════════════════════════╗ + ║ CONTRACT SETUP ║ + ╚═════════════════════════════╝*/ + + function initialize( + string calldata name, + string calldata symbol, + address _longShort, + address _staker + ) external initializer { + __AccessControl_init(); + __UUPSUpgradeable_init(); + + longShort = _longShort; + strategyToken = new StrategyToken(name, symbol); + staker = _staker; + + _setupRole(UPGRADER_ROLE, msg.sender); + grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + } + + function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {} + + /*╔═════════════════════════════╗ + ║ DEPOSIT ║ + ╚═════════════════════════════╝*/ + function depositLongAndShortTokens( + uint32 marketIndex, + uint256 amountToken, + bool isLong + ) public { + ILongShort _longShort = ILongShort(longShort); + address longTokenAddress = _longShort.syntheticTokens(marketIndex, true); + address shortTokenAddress = _longShort.syntheticTokens(marketIndex, false); + + //TODO + //can maybe add this method to longShort contract? + (uint256 longTokenPrice, uint256 shortTokenPrice) = _getLongAndShortTokenPrice(marketIndex); + + (uint256 longShortRatio, uint256 beforeBalanceOfContract) = _getContractStakedBalanceAndRatio( + marketIndex, + longTokenAddress, + shortTokenAddress, + longTokenPrice, + shortTokenPrice + ); + (uint256 _amountStakedLong, uint256 _amountStakedShort) = _getTotalLongAndShortTokensStaked( + marketIndex, + longTokenAddress, + shortTokenAddress + ); + uint256 amountOfTokensToMatchRatio; + + if (isLong) { + amountOfTokensToMatchRatio = amountToken / (longShortRatio); + } else { + amountOfTokensToMatchRatio = amountToken * longShortRatio; + } + + //TODO + //two transfers - can optimise + ISyntheticToken(_longShort.syntheticTokens(marketIndex, isLong)).transferFrom( + msg.sender, + address(this), + amountToken + ); + ISyntheticToken(_longShort.syntheticTokens(marketIndex, !isLong)).transferFrom( + msg.sender, + address(this), + amountOfTokensToMatchRatio + ); + + ISyntheticToken(_longShort.syntheticTokens(marketIndex, isLong)).stake(amountToken); + ISyntheticToken(_longShort.syntheticTokens(marketIndex, !isLong)).stake( + amountOfTokensToMatchRatio + ); + + (uint256 finalLongShortRatio, uint256 totalValueStaked) = _getContractStakedBalanceAndRatio( + marketIndex, + longTokenAddress, + shortTokenAddress, + longTokenPrice, + shortTokenPrice + ); + + if (finalLongShortRatio != 1) { + _performShiftingStrategy( + marketIndex, + totalValueStaked, + longTokenAddress, + shortTokenAddress, + longTokenPrice, + shortTokenPrice + ); + } + + //TODO can seperate this into it's own method? + uint256 shares; + + if (strategyToken.totalSupply() == 0) { + shares = totalValueStaked; + } else { + // Users deposited amount * cost per share + //cost per share = + shares = + (((totalValueStaked - beforeBalanceOfContract)) * beforeBalanceOfContract) / + strategyToken.totalSupply(); + } + + strategyToken.mint(msg.sender, shares); + } + + /*╔═════════════════════════════╗ + ║ HELPER FUNCTIONS ║ + ╚═════════════════════════════╝*/ + + //Retrieves the number of long and short tokens staked by this contract + function _getTotalLongAndShortTokensStaked( + uint32 marketIndex, + address longTokenAddress, + address shortTokenAddress + ) internal view returns (uint256, uint256) { + IStaker _staker = IStaker(staker); + uint256 amountStakedLong = _staker.userAmountStaked(longTokenAddress, address(this)); + uint256 amountStakedShort = _staker.userAmountStaked(shortTokenAddress, address(this)); + + return (amountStakedLong, amountStakedShort); + } + + //TODO calculate the shares for the user + function _calculateUserShares() internal returns (uint256) { + // add the logic for share distribution here + } + + //Gets the $ balance of the staked tokens + function _getContractStakedBalanceAndRatio( + uint32 marketIndex, + address longTokenAddress, + address shortTokenAddress, + uint256 longTokenPrice, + uint256 shortTokenPrice + ) internal view returns (uint256, uint256) { + uint256 marketUpdateIndex = ILongShort(longShort).marketUpdateIndex(marketIndex); + (uint256 _amountStakedLong, uint256 _amountStakedShort) = _getTotalLongAndShortTokensStaked( + marketIndex, + longTokenAddress, + shortTokenAddress + ); + uint256 longSideValue = (_amountStakedLong * longTokenPrice) / 1e18; + uint256 shortSideValue = (_amountStakedShort * shortTokenPrice) / 1e18; + + uint256 longShortRatio = longSideValue / shortSideValue; + uint256 contractBalance = (longSideValue + shortSideValue); + + return (longShortRatio, contractBalance); + } + + function _getLongAndShortTokenPrice(uint32 marketIndex) + internal + view + returns (uint256 longTokenPrice, uint256 shortTokenPrice) + { + uint256 marketUpdateIndex = ILongShort(longShort).marketUpdateIndex(marketIndex); + uint256 longTokenPrice = ILongShort(longShort).syntheticToken_priceSnapshot( + marketIndex, + true, + marketUpdateIndex + ); + uint256 shortTokenPrice = ILongShort(longShort).syntheticToken_priceSnapshot( + marketIndex, + false, + marketUpdateIndex + ); + } + + /*╔═════════════════════════════╗ + ║ STRATEGY ║ + ╚═════════════════════════════╝*/ + + //Perform the shifting strategy of this contract to ensure 50/50 balance of long short token values + function _performShiftingStrategy( + uint32 marketIndex, + uint256 totalValueStaked, + address longTokenAddress, + address shortTokenAddress, + uint256 longTokenPrice, + uint256 shortTokenPrice + ) internal { + (uint256 _amountStakedLong, uint256 _amountStakedShort) = _getTotalLongAndShortTokensStaked( + marketIndex, + longTokenAddress, + shortTokenAddress + ); + + //50 - 50 split, can aim to make this resuable + uint256 desiredAmountOfLongTokens = ((totalValueStaked / 2) * 1e18) / longTokenPrice; + uint256 desiredAmountOfShortTokens = ((totalValueStaked / 2) * 1e18) / shortTokenPrice; + + //check that no shifting occurs if the distribution of long and short tokens are already correct + if (_amountStakedLong > desiredAmountOfLongTokens) { + //Shift to short side + IStaker(staker).shiftTokens(_amountStakedLong - desiredAmountOfLongTokens, marketIndex, true); + } else if (_amountStakedShort > desiredAmountOfShortTokens) { + //shift to long side + IStaker(staker).shiftTokens( + _amountStakedShort - desiredAmountOfShortTokens, + marketIndex, + false + ); + } + } + + /// @notice Shifts tokens to either the long or the short position for the market to maintain 50/50 split in $ value + /// @param marketIndex An uint32 which uniquely identifies a market. + function performShiftingStrategy(uint32 marketIndex) external { + address longTokenAddress = ILongShort(longShort).syntheticTokens(marketIndex, true); + address shortTokenAddress = ILongShort(longShort).syntheticTokens(marketIndex, false); + (uint256 longTokenPrice, uint256 shortTokenPrice) = _getLongAndShortTokenPrice(marketIndex); + + (uint256 longShortRatio, uint256 totalValueStaked) = _getContractStakedBalanceAndRatio( + marketIndex, + longTokenAddress, + shortTokenAddress, + longTokenPrice, + shortTokenPrice + ); + + if (longShortRatio != 1) { + _performShiftingStrategy( + marketIndex, + totalValueStaked, + longTokenAddress, + shortTokenAddress, + longTokenPrice, + shortTokenPrice + ); + } + } +} diff --git a/contracts/StrategyToken.sol b/contracts/StrategyToken.sol new file mode 100644 index 0000000..12f9a12 --- /dev/null +++ b/contracts/StrategyToken.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol"; + +contract StrategyToken is ERC20Upgradeable, ERC20BurnableUpgradeable { + constructor(string memory name, string memory symbol) { + __ERC20_init(name, symbol); + } + + function mint(address _recipient, uint256 _amount) external { + _mint(_recipient, _amount); + } +} diff --git a/contracts/SyntheticToken.sol b/contracts/SyntheticToken.sol new file mode 100644 index 0000000..ebe367a --- /dev/null +++ b/contracts/SyntheticToken.sol @@ -0,0 +1,160 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "./interfaces/IStaker.sol"; +import "./interfaces/ILongShort.sol"; +import "./interfaces/ISyntheticToken.sol"; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; +import "@openzeppelin/contracts/access/AccessControl.sol"; +import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol"; + +/** +@title SyntheticToken +@notice An ERC20 token that tracks or inversely tracks the price of an + underlying asset with floating exposure. +@dev Logic for price tracking contained in LongShort.sol. + The contract inherits from ERC20PresetMinterPauser.sol +*/ +contract SyntheticToken is ISyntheticToken, ERC20, ERC20Burnable, AccessControl, ERC20Permit { + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + + /// @notice Address of the LongShort contract, a deployed LongShort.sol + address public immutable longShort; + /// @notice Address of the Staker contract, a deployed Staker.sol + address public immutable staker; + /// @notice Identifies which market in longShort the token is for. + uint32 public immutable marketIndex; + /// @notice Whether the token is a long token or short token for its market. + bool public immutable isLong; + + /// @notice Creates an instance of the contract. + /// @dev Should only be called by TokenFactory.sol for our system. + /// @param name The name of the token. + /// @param symbol The symbol for the token. + /// @param _longShort Address of the core LongShort contract. + /// @param _staker Address of the staker contract. + /// @param _marketIndex Which market the token is for. + /// @param _isLong Whether the token is long or short for its market. + constructor( + string memory name, + string memory symbol, + address _longShort, + address _staker, + uint32 _marketIndex, + bool _isLong + ) ERC20(name, symbol) ERC20Permit(name) { + longShort = _longShort; + staker = _staker; + marketIndex = _marketIndex; + isLong = _isLong; + + _setupRole(DEFAULT_ADMIN_ROLE, _longShort); + _setupRole(MINTER_ROLE, _longShort); + } + + /// @notice Allows users to stake their synthetic tokens to earn Float. + /// @dev Core staking logic contained in Staker.sol + /// @param amount Amount to stake in wei. + function stake(uint256 amount) external override { + // NOTE: this is safe, this function will throw "ERC20: transfer + // amount exceeds balance" if amount exceeds users balance. + super._transfer(msg.sender, address(staker), amount); + + IStaker(staker).stakeFromUser(msg.sender, amount); + } + + /*╔══════════════════════════════════════════════════════╗ + ║ FUNCTIONS INHERITED BY ERC20PresetMinterPauser ║ + ╚══════════════════════════════════════════════════════╝*/ + + function totalSupply() public view virtual override(ERC20, ISyntheticToken) returns (uint256) { + return ERC20.totalSupply(); + } + + /** + @notice Mints a number of synthetic tokens for an address. + @dev Can only be called by addresses with a minter role. + This should correspond to the Long Short contract. + @param to The address for which to mint the tokens for. + @param amount Amount of synthetic tokens to mint in wei. + */ + function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) { + _mint(to, amount); + } + + /// @notice Burns or destroys a number of held synthetic tokens for an address. + /// @dev Modified to only allow Long Short to burn tokens on redeem. + /// @param amount The amount of tokens to burn in wei. + function burn(uint256 amount) public override(ERC20Burnable, ISyntheticToken) { + require(msg.sender == longShort, "Only LongShort contract"); + super._burn(_msgSender(), amount); + } + + /** + @notice Overrides the default ERC20 transferFrom. + @dev To allow users to avoid approving LongShort when redeeming tokens, + longShort has a virtual infinite allowance. + @param sender User for which to transfer tokens. + @param recipient Recipient of the transferred tokens. + @param amount Amount of tokens to transfer in wei. + */ + function transferFrom( + address sender, + address recipient, + uint256 amount + ) public override(ERC20, ISyntheticToken) returns (bool) { + if (recipient == longShort && msg.sender == longShort) { + // If it to longShort and msg.sender is longShort don't perform additional transfer checks. + ERC20._transfer(sender, recipient, amount); + return true; + } else { + return ERC20.transferFrom(sender, recipient, amount); + } + } + + function transfer(address recipient, uint256 amount) + public + virtual + override(ERC20, ISyntheticToken) + returns (bool) + { + return ERC20.transfer(recipient, amount); + } + + /** + @notice Overrides the OpenZeppelin _beforeTokenTransfer hook + @dev Ensures that this contract's accounting reflects all the senders's outstanding + tokens from next price actions before any token transfer occurs. + Removal of pausing functionality of ERC20PresetMinterPausable is intentional. + @param sender User for which tokens are to be transferred for. + */ + function _beforeTokenTransfer( + address sender, + address to, + uint256 amount + ) internal override { + if (sender != longShort) { + ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex); + } + super._beforeTokenTransfer(sender, to, amount); + } + + /** + @notice Gets the synthetic token balance of the user in wei. + @dev To automatically account for next price actions which have been confirmed but not settled, + includes any outstanding tokens owed by longShort. + @param account The address for which to get the balance of. + */ + function balanceOf(address account) public view virtual override returns (uint256) { + return + ERC20.balanceOf(account) + + ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance( + account, + marketIndex, + isLong + ); + } +} diff --git a/contracts/SyntheticTokenUpgradeable.sol b/contracts/SyntheticTokenUpgradeable.sol new file mode 100644 index 0000000..12c4345 --- /dev/null +++ b/contracts/SyntheticTokenUpgradeable.sol @@ -0,0 +1,193 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "./interfaces/IStaker.sol"; +import "./interfaces/ILongShort.sol"; +import "./interfaces/ISyntheticToken.sol"; + +import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; + +/** +@title SyntheticTokenUpgradeable +@notice An ERC20 token that tracks or inversely tracks the price of an + underlying asset with floating exposure. +@dev Logic for price tracking contained in LongShort.sol. + The contract inherits from ERC20PresetMinterPauser.sol +*/ +contract SyntheticTokenUpgradeable is + ISyntheticToken, + Initializable, + ERC20Upgradeable, + ERC20BurnableUpgradeable, + AccessControlUpgradeable, + ERC20PermitUpgradeable, + UUPSUpgradeable +{ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); + + /// @notice Address of the LongShort contract, a deployed LongShort.sol + address public longShort; + /// @notice Address of the Staker contract, a deployed Staker.sol + address public staker; + /// @notice Identifies which market in longShort the token is for. + uint32 public marketIndex; + /// @notice Whether the token is a long token or short token for its market. + bool public isLong; + + /// @notice Creates an instance of the contract. + /// @dev Should only be called by TokenFactory.sol for our system. + /// @param name The name of the token. + /// @param symbol The symbol for the token. + /// @param _longShort Address of the core LongShort contract. + /// @param _staker Address of the staker contract. + /// @param _marketIndex Which market the token is for. + /// @param _isLong Whether the token is long or short for its market. + function initialize( + string memory name, + string memory symbol, + address _longShort, + address _staker, + uint32 _marketIndex, + bool _isLong + ) external initializer { + __ERC20_init(name, symbol); + __ERC20Burnable_init(); + __AccessControl_init(); + __ERC20Permit_init(name); + __UUPSUpgradeable_init(); + + renounceRole(DEFAULT_ADMIN_ROLE, msg.sender); + renounceRole(MINTER_ROLE, msg.sender); + + _setupRole(DEFAULT_ADMIN_ROLE, _longShort); + _setupRole(MINTER_ROLE, _longShort); + _setupRole(UPGRADER_ROLE, msg.sender); + + longShort = _longShort; + staker = _staker; + marketIndex = _marketIndex; + isLong = _isLong; + } + + /// @notice Authorizes an upgrade to a new address. + /// @dev Can only be called by the current admin. + function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {} + + // TODO - look at some way of not duplicating implementation logic between this and SyntheticToken.sol + + /// @notice Allows users to stake their synthetic tokens to earn Float. + /// @dev Core staking logic contained in Staker.sol + /// @param amount Amount to stake in wei. + function stake(uint256 amount) external override { + // NOTE: this is safe, this function will throw "ERC20: transfer + // amount exceeds balance" if amount exceeds users balance. + super._transfer(msg.sender, address(staker), amount); + + IStaker(staker).stakeFromUser(msg.sender, amount); + } + + /*╔══════════════════════════════════════════════════════╗ + ║ FUNCTIONS INHERITED BY ERC20PresetMinterPauser ║ + ╚══════════════════════════════════════════════════════╝*/ + + function totalSupply() + public + view + virtual + override(ERC20Upgradeable, ISyntheticToken) + returns (uint256) + { + return ERC20Upgradeable.totalSupply(); + } + + /** + @notice Mints a number of synthetic tokens for an address. + @dev Can only be called by addresses with a minter role. + This should correspond to the Long Short contract. + @param to The address for which to mint the tokens for. + @param amount Amount of synthetic tokens to mint in wei. + */ + function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) { + _mint(to, amount); + } + + /// @notice Burns or destroys a number of held synthetic tokens for an address. + /// @dev Modified to only allow Long Short to burn tokens on redeem. + /// @param amount The amount of tokens to burn in wei. + function burn(uint256 amount) public override(ERC20BurnableUpgradeable, ISyntheticToken) { + require(msg.sender == longShort, "Only LongShort contract"); + super._burn(_msgSender(), amount); + } + + /** + @notice Overrides the default ERC20 transferFrom. + @dev To allow users to avoid approving LongShort when redeeming tokens, + longShort has a virtual infinite allowance. + @param sender User for which to transfer tokens. + @param recipient Recipient of the transferred tokens. + @param amount Amount of tokens to transfer in wei. + */ + function transferFrom( + address sender, + address recipient, + uint256 amount + ) public override(ERC20Upgradeable, ISyntheticToken) returns (bool) { + if (recipient == longShort && msg.sender == longShort) { + // If it to longShort and msg.sender is longShort don't perform additional transfer checks. + ERC20Upgradeable._transfer(sender, recipient, amount); + return true; + } else { + return ERC20Upgradeable.transferFrom(sender, recipient, amount); + } + } + + function transfer(address recipient, uint256 amount) + public + virtual + override(ERC20Upgradeable, ISyntheticToken) + returns (bool) + { + return ERC20Upgradeable.transfer(recipient, amount); + } + + /** + @notice Overrides the OpenZeppelin _beforeTokenTransfer hook + @dev Ensures that this contract's accounting reflects all the senders's outstanding + tokens from next price actions before any token transfer occurs. + Removal of pausing functionality of ERC20PresetMinterPausable is intentional. + @param sender User for which tokens are to be transferred for. + */ + function _beforeTokenTransfer( + address sender, + address to, + uint256 amount + ) internal override { + if (sender != longShort) { + ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex); + } + super._beforeTokenTransfer(sender, to, amount); + } + + /** + @notice Gets the synthetic token balance of the user in wei. + @dev To automatically account for next price actions which have been confirmed but not settled, + includes any outstanding tokens owed by longShort. + @param account The address for which to get the balance of. + */ + function balanceOf(address account) public view virtual override returns (uint256) { + return + ERC20Upgradeable.balanceOf(account) + + ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance( + account, + marketIndex, + isLong + ); + } +} diff --git a/contracts/TokenFactory.sol b/contracts/TokenFactory.sol new file mode 100644 index 0000000..9ebe454 --- /dev/null +++ b/contracts/TokenFactory.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "./SyntheticToken.sol"; +import "./interfaces/ITokenFactory.sol"; + +/// @title TokenFactory +/// @notice contract is used to reliably mint the synthetic tokens used by the float protocol. +contract TokenFactory is ITokenFactory { + /*╔═══════════════════════════╗ + ║ STATE ║ + ╚═══════════════════════════╝*/ + + /// @notice address of long short contract + address public immutable longShort; + + /*╔═══════════════════════════╗ + ║ MODIFIERS ║ + ╚═══════════════════════════╝*/ + + /// @dev only allow longShort contract to call this function + modifier onlyLongShort() { + require(msg.sender == address(longShort)); + _; + } + + /*╔════════════════════════════╗ + ║ SET-UP ║ + ╚════════════════════════════╝*/ + + /// @notice sets the address of the longShort contract on initialization + /// @param _longShort address of the longShort contract + constructor(address _longShort) { + longShort = _longShort; + } + + /*╔════════════════════════════╗ + ║ TOKEN CREATION ║ + ╚════════════════════════════╝*/ + + /// @notice creates and sets up a new synthetic token + /// @param syntheticName name of the synthetic token + /// @param syntheticSymbol ticker symbol of the synthetic token + /// @param staker address of the staker contract + /// @param marketIndex market index this synthetic token belongs to + /// @param isLong boolean denoting if the synthetic token is long or short + /// @return syntheticToken - address of the created synthetic token + function createSyntheticToken( + string calldata syntheticName, + string calldata syntheticSymbol, + address staker, + uint32 marketIndex, + bool isLong + ) external override onlyLongShort returns (address syntheticToken) { + syntheticToken = address( + new SyntheticToken(syntheticName, syntheticSymbol, longShort, staker, marketIndex, isLong) + ); + } +} diff --git a/contracts/TreasuryAlpha.sol b/contracts/TreasuryAlpha.sol new file mode 100644 index 0000000..84c65a1 --- /dev/null +++ b/contracts/TreasuryAlpha.sol @@ -0,0 +1,103 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; + +import "./abstract/AccessControlledAndUpgradeable.sol"; +import "./interfaces/IFloatToken.sol"; +import "./interfaces/ILongShort.sol"; + +import "@openzeppelin/contracts/utils/math/Math.sol"; + +/** This contract implementation is purely for the alpha, allowing the burning of FLT tokens + for a proportional share of the value held in the treasury. In contrast, the beta launch will be + rely on a more robust governance mechanism to vote on the buying and buring of FLT tokens using + treasury funds.*/ + +/** @title Treasury Contract */ +contract TreasuryAlpha is AccessControlledAndUpgradeable { + //Using Open Zeppelin safe transfer library for token transfers + using SafeERC20 for IERC20; + + address public paymentToken; + address public floatToken; + address public longShort; + // An aproximation of what the FLT price should be according to the yield at the time. + uint256 public basePrice; + bool public redemptionsActivated; + + event BasePriceUpdated(uint256 newBasePrice); + + function initialize( + address _admin, + address _paymentToken, + address _floatToken, + address _longShort + ) external initializer { + _AccessControlledAndUpgradeable_init(_admin); + paymentToken = _paymentToken; + floatToken = _floatToken; + longShort = _longShort; + } + + function onlyAdminModifierLogic() internal virtual { + _checkRole(ADMIN_ROLE, msg.sender); + } + + modifier onlyAdmin() { + onlyAdminModifierLogic(); + _; + } + + modifier redemptionsActive() { + require(redemptionsActivated, "redemptions haven't been activated"); + _; + } + + function _getValueLockedInTreasury() internal view returns (uint256) { + return IERC20(paymentToken).balanceOf(address(this)); + } + + function _getFloatTokenSupply() internal view returns (uint256) { + return IFloatToken(floatToken).totalSupply(); + } + + function updateBasePrice(uint256 newBasePrice) public onlyAdmin { + // What should the minimum for this value be? 0.2 DAI per token seems reasonable if we are targetting 0.5 DAI as the normal price (and say Aave yield is poor or similar) + require(newBasePrice > 2e17, "base price too low"); + + basePrice = newBasePrice; + emit BasePriceUpdated(newBasePrice); + } + + function activateRedemptions() public onlyAdmin { + redemptionsActivated = true; + } + + function burnFloatForShareOfTreasury(uint256 amountOfFloatToBurn) external redemptionsActive { + uint256 priceAccordingToTreasuryAndSupply = (_getValueLockedInTreasury() * 1e18) / + _getFloatTokenSupply(); + // In normal operation the `priceAccordingToTreasuryAndSupply` value will be an over-estimation favouring people who withdraw early. Thus typically the 'basePrice' will be a bit lower to prevent this in typical cases. + // We take the min of these two values so it is impossible for us to run with the money. + uint256 priceToUse = Math.min(priceAccordingToTreasuryAndSupply, basePrice); + + uint256 amountToRecieve = (priceToUse * amountOfFloatToBurn) / 1e18; + + IFloatToken(floatToken).burnFrom(msg.sender, amountOfFloatToBurn); // Can modify the core FLT token if wanted to remove the need for this step. // Currently requires user to approve treasury contract. + IERC20(paymentToken).safeTransfer(msg.sender, amountToRecieve); + } + + function convertSynthsToPaymentTokenNextPriceLong(uint32 marketIndex, uint256 tokens_redeem) + external + { + ILongShort(longShort).redeemLongNextPrice(marketIndex, tokens_redeem); + } + + function convertSynthsToPaymentTokenNextPriceShort(uint32 marketIndex, uint256 tokens_redeem) + external + { + ILongShort(longShort).redeemShortNextPrice(marketIndex, tokens_redeem); + } +} diff --git a/contracts/Treasury_v0.sol b/contracts/Treasury_v0.sol new file mode 100644 index 0000000..95f35d0 --- /dev/null +++ b/contracts/Treasury_v0.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +import "./abstract/AccessControlledAndUpgradeable.sol"; +import "./interfaces/IFloatToken.sol"; +import "./interfaces/ILongShort.sol"; + +/** This contract implementation is purely for the alpha, allowing the burning of FLT tokens + for a proportional share of the value held in the treasury. In contrast, the beta launch will be + rely on a more robust governance mechanism to vote on the buying and buring of FLT tokens using + treasury funds.*/ + +/** @title Treasury Contract */ +contract Treasury_v0 is AccessControlledAndUpgradeable { + address public paymentToken; + address public floatToken; + address public longShort; + + function initialize( + address _admin, + address _paymentToken, + address _floatToken, + address _longShort + ) external initializer { + _AccessControlledAndUpgradeable_init(_admin); + paymentToken = _paymentToken; + floatToken = _floatToken; + longShort = _longShort; + } + + function convertSynthsToPaymentTokenNextPriceLong(uint32 marketIndex, uint256 tokens_redeem) + external + { + ILongShort(longShort).redeemLongNextPrice(marketIndex, tokens_redeem); + } + + function convertSynthsToPaymentTokenNextPriceShort(uint32 marketIndex, uint256 tokens_redeem) + external + { + ILongShort(longShort).redeemShortNextPrice(marketIndex, tokens_redeem); + } +} diff --git a/contracts/YieldManagerAave.sol b/contracts/YieldManagerAave.sol new file mode 100644 index 0000000..f577451 --- /dev/null +++ b/contracts/YieldManagerAave.sol @@ -0,0 +1,274 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; + +import "hardhat/console.sol"; + +import "./interfaces/IYieldManager.sol"; +import "./interfaces/aave/ILendingPool.sol"; +import "./interfaces/aave/ILendingPoolAddressesProvider.sol"; +import "./interfaces/aave/IAaveIncentivesController.sol"; +import "./abstract/AccessControlledAndUpgradeable.sol"; + +/** @title YieldManagerAave + @notice contract is used to manage the yield generated by the underlying tokens. + YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol. + Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that + continuously accrues interest based on a lend/borrow liquidity ratio. + @dev https://docs.aave.com/portal/ + */ +contract YieldManagerAave is IYieldManager, AccessControlledAndUpgradeable { + /*╔═════════════════════════════╗ + ║ VARIABLES ║ + ╚═════════════════════════════╝*/ + + /// @notice address of longShort contract + address public longShort; + /// @notice address of treasury contract - this is the address that can claim aave incentives rewards + address public treasury; + + /// @notice boolean to prevent markets using an already initialized market + bool public isInitialized; + + /// @notice The payment token the yield manager supports + /// @dev DAI token + IERC20 public paymentToken; + /// @notice The token representing the interest accruing payment token position from Aave + /// @dev ADAI token + IERC20Upgradeable public aToken; + /// @notice The specific Aave lending pool address provider contract + ILendingPoolAddressesProvider public lendingPoolAddressesProvider; + /// @notice The specific Aave incentives controller contract + IAaveIncentivesController public aaveIncentivesController; + + /// @dev An aave specific referralCode that has been a depricated feature. This will be set to 0 for "no referral" at deployment + uint16 referralCode; + + /// @notice distributed yield not yet transferred to the treasury + uint256 public override totalReservedForTreasury; + + /// @dev This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal. + /// In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available. + uint256 public amountReservedInCaseOfInsufficientAaveLiquidity; + + /*╔═════════════════════════════╗ + ║ MODIFIERS ║ + ╚═════════════════════════════╝*/ + + /// @dev only allow longShort contract to execute modified functions + modifier longShortOnly() { + require(msg.sender == longShort, "Not longShort"); + _; + } + + /*╔═════════════════════════════╗ + ║ CONTRACT SET-UP ║ + ╚═════════════════════════════╝*/ + + /** + @notice Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts + @param _longShort address of the longShort contract + @param _treasury address of the treasury contract + @param _paymentToken address of the payment token + @param _aToken address of the interest accruing token linked to the payment token + @param _lendingPoolAddressesProvider address of the aave lending pool address provider contract + @param _aaveReferralCode unique code for aave referrals + @param _admin admin for the contract + @dev referral code will be set to 0, depricated Aave feature + */ + function initialize( + address _longShort, + address _treasury, + address _paymentToken, + address _aToken, + address _lendingPoolAddressesProvider, + address _aaveIncentivesController, + uint16 _aaveReferralCode, + address _admin + ) external initializer { + require( + _longShort != address(0) && + _treasury != address(0) && + _paymentToken != address(0) && + _aToken != address(0) && + _lendingPoolAddressesProvider != address(0) && + _aaveIncentivesController != address(0) && + _admin != address(0) + ); + + longShort = _longShort; + treasury = _treasury; + + _AccessControlledAndUpgradeable_init(_admin); + + referralCode = _aaveReferralCode; + + paymentToken = IERC20(_paymentToken); + aToken = IERC20Upgradeable(_aToken); + lendingPoolAddressesProvider = ILendingPoolAddressesProvider(_lendingPoolAddressesProvider); + aaveIncentivesController = IAaveIncentivesController(_aaveIncentivesController); + + // Approve tokens for aave lending pool maximally. + IERC20(_paymentToken).approve( + ILendingPoolAddressesProvider(_lendingPoolAddressesProvider).getLendingPool(), + type(uint256).max + ); + } + + function updateLatestLendingPoolAddress() external { + IERC20(paymentToken).approve(lendingPoolAddressesProvider.getLendingPool(), type(uint256).max); + } + + /*╔════════════════════════╗ + ║ IMPLEMENTATION ║ + ╚════════════════════════╝*/ + + /** + @notice Allows the LongShort contract to deposit tokens into the aave pool + @param amount Amount of payment token to deposit + */ + function depositPaymentToken(uint256 amount) external override longShortOnly { + // If amountReservedInCaseOfInsufficientAaveLiquidity isn't zero, then efficiently net the difference between the amount + // It basically always be zero besides extreme and unlikely situations with aave. + if (amountReservedInCaseOfInsufficientAaveLiquidity != 0) { + if (amountReservedInCaseOfInsufficientAaveLiquidity >= amount) { + amountReservedInCaseOfInsufficientAaveLiquidity -= amount; + // Return early, nothing to deposit into the lending pool + return; + } else { + amount -= amountReservedInCaseOfInsufficientAaveLiquidity; + amountReservedInCaseOfInsufficientAaveLiquidity = 0; + } + } + + ILendingPool(lendingPoolAddressesProvider.getLendingPool()).deposit( + address(paymentToken), + amount, + address(this), + referralCode + ); + } + + /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave + /// @param user User to recieve the payout + /// @param amount Amount of payment token to pay to user + function transferPaymentTokensToUser(address user, uint256 amount) + external + override + longShortOnly + { + try paymentToken.transfer(user, amount) returns (bool transferSuccess) { + if (transferSuccess) { + // If the transfer is successful return early, otherwise try pay the user out with the amountReservedInCaseOfInsufficientAaveLiquidity + return; + } + } catch {} + + amountReservedInCaseOfInsufficientAaveLiquidity -= amount; + + // If this reverts (ie aave unable to make payout), then the whole transaction will revert. User will have to wait until sufficient liquidity available. + ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw( + address(paymentToken), + amount, + user + ); + } + + /// @notice Allows the LongShort contract to redeem aTokens for the payment token + /// @param amount Amount of payment token to withdraw + /// @dev This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave. + /// This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason. + function removePaymentTokenFromMarket(uint256 amount) external override longShortOnly { + try + ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw( + address(paymentToken), + amount, + address(this) + ) + {} catch { + // In theory we should only catch `VL_CURRENT_AVAILABLE_LIQUIDITY_NOT_ENOUGH` errors. + // Safe to revert on all errors, if aave completely blocks withdrawals the amountReservedInCaseOfInsufficientAaveLiquidity can grow until it is fixed without problems. + amountReservedInCaseOfInsufficientAaveLiquidity += amount; + } + } + + /** + @notice Allows for withdrawal of aave rewards to the treasury contract + @dev This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued + */ + function claimAaveRewardsToTreasury() external { + IAaveIncentivesController _aaveIncentivesController = IAaveIncentivesController( + aaveIncentivesController + ); + uint256 amount = _aaveIncentivesController.getUserUnclaimedRewards(address(this)); + + address[] memory aTokenAddresses = new address[](1); + aTokenAddresses[0] = address(aToken); + + _aaveIncentivesController.claimRewards(aTokenAddresses, amount, treasury); + + emit ClaimAaveRewardTokenToTreasury(amount); + } + + /** + @notice Calculates and updates the yield allocation to the treasury and the market + @dev treasuryPercent = 1 - marketPercent + @param totalValueRealizedForMarket total value of long and short side of the market + @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury + @return The market allocation of the yield + */ + function distributeYieldForTreasuryAndReturnMarketAllocation( + uint256 totalValueRealizedForMarket, + uint256 treasuryYieldPercent_e18 + ) external override longShortOnly returns (uint256) { + uint256 totalHeld = aToken.balanceOf(address(this)); + uint256 _totalReservedForTreasury = totalReservedForTreasury; + + uint256 totalRealized = totalValueRealizedForMarket + + _totalReservedForTreasury + + amountReservedInCaseOfInsufficientAaveLiquidity; + + if (totalRealized == totalHeld) { + return 0; + } + + // will revert in case totalRealized > totalHeld which should never occur since yield is always possitive with aave. + uint256 unrealizedYield = totalHeld - totalRealized; + + uint256 amountForTreasury = (unrealizedYield * treasuryYieldPercent_e18) / 1e18; + uint256 amountForMarketIncentives = unrealizedYield - amountForTreasury; + + totalReservedForTreasury = _totalReservedForTreasury + amountForTreasury; + + emit YieldDistributed(unrealizedYield, treasuryYieldPercent_e18); + + return amountForMarketIncentives; + } + + /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract + function withdrawTreasuryFunds() external override { + uint256 amountToWithdrawForTreasury = totalReservedForTreasury; + totalReservedForTreasury = 0; + + // Redeem aToken for payment tokens. + ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw( + address(paymentToken), + amountToWithdrawForTreasury, + treasury + ); + + emit WithdrawTreasuryFunds(); + } + + /// @notice Initializes a specific yield manager to a given market + function initializeForMarket() external override longShortOnly { + require(!isInitialized, "Yield Manager is already in use"); + isInitialized = true; + } +} diff --git a/contracts/abstract/AccessControlledAndUpgradeable.sol b/contracts/abstract/AccessControlledAndUpgradeable.sol new file mode 100644 index 0000000..ff7d3d3 --- /dev/null +++ b/contracts/abstract/AccessControlledAndUpgradeable.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: BUSL-1.1 + +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; + +abstract contract AccessControlledAndUpgradeable is + Initializable, + AccessControlUpgradeable, + UUPSUpgradeable +{ + bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); + bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); + + /// @notice Initializes the contract when called by parent initializers. + /// @param initialAdmin The initial admin who will hold all roles. + function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer { + __AccessControl_init(); + __UUPSUpgradeable_init(); + _AccessControlledAndUpgradeable_init_unchained(initialAdmin); + } + + /// @notice Initializes the contract for contracts that already call both __AccessControl_init + /// and _UUPSUpgradeable_init when initializing. + /// @param initialAdmin The initial admin who will hold all roles. + function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin) + internal + initializer + { + require(initialAdmin != address(0)); + _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin); + _setupRole(ADMIN_ROLE, initialAdmin); + _setupRole(UPGRADER_ROLE, initialAdmin); + } + + /// @notice Authorizes an upgrade to a new address. + /// @dev Can only be called by addresses wih UPGRADER_ROLE + function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {} +} diff --git a/contracts/deployment/UUPSProxy.sol b/contracts/deployment/UUPSProxy.sol new file mode 100644 index 0000000..1126069 --- /dev/null +++ b/contracts/deployment/UUPSProxy.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; + +// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins. +contract UUPSProxy is ERC1967Proxy { + constructor( + address _logic, + address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146 + bytes memory _data + ) payable ERC1967Proxy(_logic, _data) {} +} diff --git a/contracts/interfaces/IFloatToken.sol b/contracts/interfaces/IFloatToken.sol new file mode 100644 index 0000000..3551d6b --- /dev/null +++ b/contracts/interfaces/IFloatToken.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +interface IFloatToken { + function mint(address to, uint256 amount) external; + + function transfer(address, uint256) external returns (bool); + + function totalSupply() external view returns (uint256); + + function burnFrom(address account, uint256 amount) external virtual; +} diff --git a/contracts/interfaces/ILongShort.sol b/contracts/interfaces/ILongShort.sol new file mode 100644 index 0000000..5a18790 --- /dev/null +++ b/contracts/interfaces/ILongShort.sol @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +interface ILongShort { + /*╔════════════════════════════╗ + ║ EVENTS ║ + ╚════════════════════════════╝*/ + + event LongShortV1(address admin, address tokenFactory, address staker); + + event SystemStateUpdated( + uint32 marketIndex, + uint256 updateIndex, + int256 underlyingAssetPrice, + uint256 longValue, + uint256 shortValue, + uint256 longPrice, + uint256 shortPrice + ); + + event SyntheticMarketCreated( + uint32 marketIndex, + address longTokenAddress, + address shortTokenAddress, + address paymentToken, + int256 initialAssetPrice, + string name, + string symbol, + address oracleAddress, + address yieldManagerAddress + ); + + event NextPriceRedeem( + uint32 marketIndex, + bool isLong, + uint256 synthRedeemed, + address user, + uint256 oracleUpdateIndex + ); + + event NextPriceSyntheticPositionShift( + uint32 marketIndex, + bool isShiftFromLong, + uint256 synthShifted, + address user, + uint256 oracleUpdateIndex + ); + + event NextPriceDeposit( + uint32 marketIndex, + bool isLong, + uint256 depositAdded, + address user, + uint256 oracleUpdateIndex + ); + + event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress); + + event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage); + + event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex); + + function syntheticTokens(uint32, bool) external view returns (address); + + function marketUpdateIndex(uint32) external view returns (uint256); + + function syntheticToken_priceSnapshot( + uint32, + bool, + uint256 + ) external view returns (uint256); + + function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong) + external + view + returns (uint256 marketSideValueInPaymentToken); + + function updateSystemState(uint32 marketIndex) external; + + function updateSystemStateMulti(uint32[] calldata marketIndex) external; + + function getUsersConfirmedButNotSettledSynthBalance( + address user, + uint32 marketIndex, + bool isLong + ) external view returns (uint256 confirmedButNotSettledBalance); + + function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external; + + function shiftPositionNextPrice( + uint32 marketIndex, + uint256 amountSyntheticTokensToShift, + bool isShiftFromLong + ) external; + + function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift) + external; + + function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift) + external; + + function getAmountSyntheticTokenToMintOnTargetSide( + uint32 marketIndex, + uint256 amountSyntheticTokenShiftedFromOneSide, + bool isShiftFromLong, + uint256 priceSnapshotIndex + ) external view returns (uint256 amountSynthShiftedToOtherSide); + + function mintLongNextPrice(uint32 marketIndex, uint256 amount) external; + + function mintShortNextPrice(uint32 marketIndex, uint256 amount) external; + + function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external; + + function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external; +} diff --git a/contracts/interfaces/IOracleManager.sol b/contracts/interfaces/IOracleManager.sol new file mode 100644 index 0000000..c986598 --- /dev/null +++ b/contracts/interfaces/IOracleManager.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +/* + * Manages price feeds from different oracle implementations. + */ +interface IOracleManager { + function updatePrice() external returns (int256); + + /* + *Returns the latest price from the oracle feed. + */ + function getLatestPrice() external view returns (int256); +} diff --git a/contracts/interfaces/IStaker.sol b/contracts/interfaces/IStaker.sol new file mode 100644 index 0000000..d8a95ee --- /dev/null +++ b/contracts/interfaces/IStaker.sol @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +interface IStaker { + /*╔════════════════════════════╗ + ║ EVENTS ║ + ╚════════════════════════════╝*/ + + event StakerV1( + address admin, + address floatTreasury, + address floatCapital, + address floatToken, + uint256 floatPercentage + ); + + event MarketAddedToStaker( + uint32 marketIndex, + uint256 exitFee_e18, + uint256 period, + uint256 multiplier, + uint256 balanceIncentiveExponent, + int256 balanceIncentiveEquilibriumOffset, + uint256 safeExponentBitShifting + ); + + event AccumulativeIssuancePerStakedSynthSnapshotCreated( + uint32 marketIndex, + uint256 accumulativeFloatIssuanceSnapshotIndex, + uint256 accumulativeLong, + uint256 accumulativeShort + ); + + event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex); + + event StakeWithdrawn(address user, address token, uint256 amount); + + // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate. + event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted); + + event MarketLaunchIncentiveParametersChanges( + uint32 marketIndex, + uint256 period, + uint256 multiplier + ); + + event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee); + + event BalanceIncentiveParamsUpdated( + uint32 marketIndex, + uint256 balanceIncentiveExponent, + int256 balanceIncentiveCurve_equilibriumOffset, + uint256 safeExponentBitShifting + ); + + event FloatPercentageUpdated(uint256 floatPercentage); + + event NextPriceStakeShift( + address user, + uint32 marketIndex, + uint256 amount, + bool isShiftFromLong, + uint256 userShiftIndex + ); + + // only for graph validation + event StakeShifted( + address user, + uint32 marketIndex, + uint256 newAmountStakedLong, + uint256 newAmountStakedShort + ); + + function userAmountStaked(address, address) external view returns (uint256); + + function addNewStakingFund( + uint32 marketIndex, + address longTokenAddress, + address shortTokenAddress, + uint256 kInitialMultiplier, + uint256 kPeriod, + uint256 unstakeFee_e18, + uint256 _balanceIncentiveCurve_exponent, + int256 _balanceIncentiveCurve_equilibriumOffset + ) external; + + function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations( + uint32 marketIndex, + uint256 marketUpdateIndex, + uint256 longTokenPrice, + uint256 shortTokenPrice, + uint256 longValue, + uint256 shortValue + ) external; + + function stakeFromUser(address from, uint256 amount) external; + + function shiftTokens( + uint256 amountSyntheticTokensToShift, + uint32 marketIndex, + bool isShiftFromLong + ) external; +} diff --git a/contracts/interfaces/ISyntheticToken.sol b/contracts/interfaces/ISyntheticToken.sol new file mode 100644 index 0000000..1eee8a2 --- /dev/null +++ b/contracts/interfaces/ISyntheticToken.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +/** +@title SyntheticToken +@notice An ERC20 token that tracks or inversely tracks the price of an + underlying asset with floating exposure. +*/ +interface ISyntheticToken { + // function MINTER_ROLE() external returns (bytes32); + + /// @notice Allows users to stake their synthetic tokens to earn Float. + function stake(uint256) external; + + function mint(address, uint256) external; + + function totalSupply() external returns (uint256); + + function transferFrom( + address, + address, + uint256 + ) external returns (bool); + + function transfer(address, uint256) external returns (bool); + + function burn(uint256 amount) external; +} diff --git a/contracts/interfaces/ITokenFactory.sol b/contracts/interfaces/ITokenFactory.sol new file mode 100644 index 0000000..1bc3252 --- /dev/null +++ b/contracts/interfaces/ITokenFactory.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +interface ITokenFactory { + function createSyntheticToken( + string calldata syntheticName, + string calldata syntheticSymbol, + address staker, + uint32 marketIndex, + bool isLong + ) external returns (address); +} diff --git a/contracts/interfaces/IYieldManager.sol b/contracts/interfaces/IYieldManager.sol new file mode 100644 index 0000000..6b7b4f5 --- /dev/null +++ b/contracts/interfaces/IYieldManager.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +/// @notice Manages yield accumulation for the LongShort contract. Each market is deployed with its own yield manager to simplify the bookkeeping, as different markets may share a payment token and yield pool. +abstract contract IYieldManager { + event ClaimAaveRewardTokenToTreasury(uint256 amount); + + event YieldDistributed(uint256 unrealizedYield, uint256 treasuryYieldPercent_e18); + + /// @dev This is purely saving some gas, but the subgraph will know how much is due for the treasury at all times - no need to include in event. + event WithdrawTreasuryFunds(); + + /// @notice distributed yield not yet transferred to the treasury + function totalReservedForTreasury() external virtual returns (uint256); + + /// @notice Deposits the given amount of payment tokens into this yield manager. + /// @param amount Amount of payment token to deposit + function depositPaymentToken(uint256 amount) external virtual; + + /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave + /// @param user User to recieve the payout + /// @param amount Amount of payment token to pay to user + function transferPaymentTokensToUser(address user, uint256 amount) external virtual; + + /// @notice Withdraws the given amount of tokens from this yield manager. + /// @param amount Amount of payment token to withdraw + function removePaymentTokenFromMarket(uint256 amount) external virtual; + + /** + @notice Calculates and updates the yield allocation to the treasury and the market + @dev treasuryPercent = 1 - marketPercent + @param totalValueRealizedForMarket total value of long and short side of the market + @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury + @return amountForMarketIncentives The market allocation of the yield + */ + function distributeYieldForTreasuryAndReturnMarketAllocation( + uint256 totalValueRealizedForMarket, + uint256 treasuryYieldPercent_e18 + ) external virtual returns (uint256 amountForMarketIncentives); + + /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract + function withdrawTreasuryFunds() external virtual; + + /// @notice Initializes a specific yield manager to a given market + function initializeForMarket() external virtual; +} diff --git a/contracts/interfaces/aave/DataTypes.sol b/contracts/interfaces/aave/DataTypes.sol new file mode 100644 index 0000000..a2cc571 --- /dev/null +++ b/contracts/interfaces/aave/DataTypes.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.3; + +library DataTypes { + // refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties. + struct ReserveData { + //stores the reserve configuration + ReserveConfigurationMap configuration; + //the liquidity index. Expressed in ray + uint128 liquidityIndex; + //variable borrow index. Expressed in ray + uint128 variableBorrowIndex; + //the current supply rate. Expressed in ray + uint128 currentLiquidityRate; + //the current variable borrow rate. Expressed in ray + uint128 currentVariableBorrowRate; + //the current stable borrow rate. Expressed in ray + uint128 currentStableBorrowRate; + uint40 lastUpdateTimestamp; + //tokens addresses + address aTokenAddress; + address stableDebtTokenAddress; + address variableDebtTokenAddress; + //address of the interest rate strategy + address interestRateStrategyAddress; + //the id of the reserve. Represents the position in the list of the active reserves + uint8 id; + } + + struct ReserveConfigurationMap { + //bit 0-15: LTV + //bit 16-31: Liq. threshold + //bit 32-47: Liq. bonus + //bit 48-55: Decimals + //bit 56: Reserve is active + //bit 57: reserve is frozen + //bit 58: borrowing is enabled + //bit 59: stable rate borrowing enabled + //bit 60-63: reserved + //bit 64-79: reserve factor + uint256 data; + } + + struct UserConfigurationMap { + uint256 data; + } + + enum InterestRateMode { + NONE, + STABLE, + VARIABLE + } +} diff --git a/contracts/interfaces/aave/IAaveIncentivesController.sol b/contracts/interfaces/aave/IAaveIncentivesController.sol new file mode 100644 index 0000000..679323e --- /dev/null +++ b/contracts/interfaces/aave/IAaveIncentivesController.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.3; + +interface IAaveIncentivesController { + event RewardsClaimed(address indexed user, address indexed to, uint256 amount); + + function claimRewards( + address[] calldata assets, + uint256 amount, + address to + ) external returns (uint256); + + function getUserUnclaimedRewards(address user) external view returns (uint256); +} diff --git a/contracts/interfaces/aave/ILendingPool.sol b/contracts/interfaces/aave/ILendingPool.sol new file mode 100644 index 0000000..97dfb3b --- /dev/null +++ b/contracts/interfaces/aave/ILendingPool.sol @@ -0,0 +1,414 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.3; + +import {ILendingPoolAddressesProvider} from "./ILendingPoolAddressesProvider.sol"; +import {DataTypes} from "./DataTypes.sol"; + +interface ILendingPool { + /** + * @dev Emitted on deposit() + * @param reserve The address of the underlying asset of the reserve + * @param user The address initiating the deposit + * @param onBehalfOf The beneficiary of the deposit, receiving the aTokens + * @param amount The amount deposited + * @param referral The referral code used + **/ + event Deposit( + address indexed reserve, + address user, + address indexed onBehalfOf, + uint256 amount, + uint16 indexed referral + ); + + /** + * @dev Emitted on withdraw() + * @param reserve The address of the underlyng asset being withdrawn + * @param user The address initiating the withdrawal, owner of aTokens + * @param to Address that will receive the underlying + * @param amount The amount to be withdrawn + **/ + event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount); + + /** + * @dev Emitted on borrow() and flashLoan() when debt needs to be opened + * @param reserve The address of the underlying asset being borrowed + * @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just + * initiator of the transaction on flashLoan() + * @param onBehalfOf The address that will be getting the debt + * @param amount The amount borrowed out + * @param borrowRateMode The rate mode: 1 for Stable, 2 for Variable + * @param borrowRate The numeric rate at which the user has borrowed + * @param referral The referral code used + **/ + event Borrow( + address indexed reserve, + address user, + address indexed onBehalfOf, + uint256 amount, + uint256 borrowRateMode, + uint256 borrowRate, + uint16 indexed referral + ); + + /** + * @dev Emitted on repay() + * @param reserve The address of the underlying asset of the reserve + * @param user The beneficiary of the repayment, getting his debt reduced + * @param repayer The address of the user initiating the repay(), providing the funds + * @param amount The amount repaid + **/ + event Repay( + address indexed reserve, + address indexed user, + address indexed repayer, + uint256 amount + ); + + /** + * @dev Emitted on swapBorrowRateMode() + * @param reserve The address of the underlying asset of the reserve + * @param user The address of the user swapping his rate mode + * @param rateMode The rate mode that the user wants to swap to + **/ + event Swap(address indexed reserve, address indexed user, uint256 rateMode); + + /** + * @dev Emitted on setUserUseReserveAsCollateral() + * @param reserve The address of the underlying asset of the reserve + * @param user The address of the user enabling the usage as collateral + **/ + event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user); + + /** + * @dev Emitted on setUserUseReserveAsCollateral() + * @param reserve The address of the underlying asset of the reserve + * @param user The address of the user enabling the usage as collateral + **/ + event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user); + + /** + * @dev Emitted on rebalanceStableBorrowRate() + * @param reserve The address of the underlying asset of the reserve + * @param user The address of the user for which the rebalance has been executed + **/ + event RebalanceStableBorrowRate(address indexed reserve, address indexed user); + + /** + * @dev Emitted on flashLoan() + * @param target The address of the flash loan receiver contract + * @param initiator The address initiating the flash loan + * @param asset The address of the asset being flash borrowed + * @param amount The amount flash borrowed + * @param premium The fee flash borrowed + * @param referralCode The referral code used + **/ + event FlashLoan( + address indexed target, + address indexed initiator, + address indexed asset, + uint256 amount, + uint256 premium, + uint16 referralCode + ); + + /** + * @dev Emitted when the pause is triggered. + */ + event Paused(); + + /** + * @dev Emitted when the pause is lifted. + */ + event Unpaused(); + + /** + * @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via + * LendingPoolCollateral manager using a DELEGATECALL + * This allows to have the events in the generated ABI for LendingPool. + * @param collateralAsset The address of the underlying asset used as collateral, + * to receive as result of the liquidation. + * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation + * @param user The address of the borrower getting liquidated + * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover + * @param liquidatedCollateralAmount The amount of collateral received by the liiquidator + * @param liquidator The address of the liquidator + * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants + * to receive the underlying collateral asset directly + **/ + event LiquidationCall( + address indexed collateralAsset, + address indexed debtAsset, + address indexed user, + uint256 debtToCover, + uint256 liquidatedCollateralAmount, + address liquidator, + bool receiveAToken + ); + + /** + * @dev Emitted when the state of a reserve is updated. NOTE: This event is actually declared + * in the ReserveLogic library and emitted in the updateInterestRates() function. Since the function is internal, + * the event will actually be fired by the LendingPool contract. The event is therefore replicated here so it + * gets added to the LendingPool ABI + * @param reserve The address of the underlying asset of the reserve + * @param liquidityRate The new liquidity rate + * @param stableBorrowRate The new stable borrow rate + * @param variableBorrowRate The new variable borrow rate + * @param liquidityIndex The new liquidity index + * @param variableBorrowIndex The new variable borrow index + **/ + event ReserveDataUpdated( + address indexed reserve, + uint256 liquidityRate, + uint256 stableBorrowRate, + uint256 variableBorrowRate, + uint256 liquidityIndex, + uint256 variableBorrowIndex + ); + + /** + * @dev Deposits an `amount` of underlying asset into the reserve, receiving in return overlying aTokens. + * - E.g. User deposits 100 USDC and gets in return 100 aUSDC + * @param asset The address of the underlying asset to deposit + * @param amount The amount to be deposited + * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user + * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens + * is a different wallet + * @param referralCode Code used to register the integrator originating the operation, for potential rewards. + * 0 if the action is executed directly by the user, without any middle-man + **/ + function deposit( + address asset, + uint256 amount, + address onBehalfOf, + uint16 referralCode + ) external; + + /** + * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned + * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC + * @param asset The address of the underlying asset to withdraw + * @param amount The underlying amount to be withdrawn + * - Send the value type(uint256).max in order to withdraw the whole aToken balance + * @param to Address that will receive the underlying, same as msg.sender if the user + * wants to receive it on his own wallet, or a different address if the beneficiary is a + * different wallet + * @return The final amount withdrawn + **/ + function withdraw( + address asset, + uint256 amount, + address to + ) external returns (uint256); + + /** + * @dev Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower + * already deposited enough collateral, or he was given enough allowance by a credit delegator on the + * corresponding debt token (StableDebtToken or VariableDebtToken) + * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet + * and 100 stable/variable debt tokens, depending on the `interestRateMode` + * @param asset The address of the underlying asset to borrow + * @param amount The amount to be borrowed + * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable + * @param referralCode Code used to register the integrator originating the operation, for potential rewards. + * 0 if the action is executed directly by the user, without any middle-man + * @param onBehalfOf Address of the user who will receive the debt. Should be the address of the borrower itself + * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator + * if he has been given credit delegation allowance + **/ + function borrow( + address asset, + uint256 amount, + uint256 interestRateMode, + uint16 referralCode, + address onBehalfOf + ) external; + + /** + * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned + * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address + * @param asset The address of the borrowed underlying asset previously borrowed + * @param amount The amount to repay + * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` + * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable + * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the + * user calling the function if he wants to reduce/remove his own debt, or the address of any other + * other borrower whose debt should be removed + * @return The final amount repaid + **/ + function repay( + address asset, + uint256 amount, + uint256 rateMode, + address onBehalfOf + ) external returns (uint256); + + /** + * @dev Allows a borrower to swap his debt between stable and variable mode, or viceversa + * @param asset The address of the underlying asset borrowed + * @param rateMode The rate mode that the user wants to swap to + **/ + function swapBorrowRateMode(address asset, uint256 rateMode) external; + + /** + * @dev Rebalances the stable interest rate of a user to the current stable rate defined on the reserve. + * - Users can be rebalanced if the following conditions are satisfied: + * 1. Usage ratio is above 95% + * 2. the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, + * which means that too much has been borrowed at a stable rate and depositors are not earning enough + * @param asset The address of the underlying asset borrowed + * @param user The address of the user to be rebalanced + **/ + function rebalanceStableBorrowRate(address asset, address user) external; + + /** + * @dev Allows depositors to enable/disable a specific deposited asset as collateral + * @param asset The address of the underlying asset deposited + * @param useAsCollateral `true` if the user wants to use the deposit as collateral, `false` otherwise + **/ + function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external; + + /** + * @dev Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1 + * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives + * a proportionally amount of the `collateralAsset` plus a bonus to cover market risk + * @param collateralAsset The address of the underlying asset used as collateral, + * to receive as result of the liquidation. + * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation + * @param user The address of the borrower getting liquidated + * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover + * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants + * to receive the underlying collateral asset directly + **/ + function liquidationCall( + address collateralAsset, + address debtAsset, + address user, + uint256 debtToCover, + bool receiveAToken + ) external; + + /** + * @dev Allows smartcontracts to access the liquidity of the pool within one transaction, + * as long as the amount taken plus a fee is returned. + * IMPORTANT There are security concerns for developers of flashloan receiver + * contracts that must be kept into consideration. + * For further details please visit https://developers.aave.com + * @param receiverAddress The address of the contract receiving the funds, + * implementing the IFlashLoanReceiver interface. + * @param assets The addresses of the assets being flash-borrowed + * @param amounts The amounts amounts being flash-borrowed + * @param modes Types of the debt to open if the flash loan is not returned: + * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver + * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address + * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address + * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2 + * @param params Variadic packed params to pass to the receiver as extra information + * @param referralCode Code used to register the integrator originating the operation, for potential rewards. + * 0 if the action is executed directly by the user, without any middle-man + **/ + function flashLoan( + address receiverAddress, + address[] calldata assets, + uint256[] calldata amounts, + uint256[] calldata modes, + address onBehalfOf, + bytes calldata params, + uint16 referralCode + ) external; + + /** + * @dev Returns the user account data across all the reserves + * @param user The address of the user + * @return totalCollateralETH the total collateral in ETH of the user + * @return totalDebtETH the total debt in ETH of the user + * @return availableBorrowsETH the borrowing power left of the user + * @return currentLiquidationThreshold the liquidation threshold of the user + * @return ltv the loan to value of the user + * @return healthFactor the current health factor of the user + **/ + function getUserAccountData(address user) + external + view + returns ( + uint256 totalCollateralETH, + uint256 totalDebtETH, + uint256 availableBorrowsETH, + uint256 currentLiquidationThreshold, + uint256 ltv, + uint256 healthFactor + ); + + function initReserve( + address reserve, + address aTokenAddress, + address stableDebtAddress, + address variableDebtAddress, + address interestRateStrategyAddress + ) external; + + function setReserveInterestRateStrategyAddress(address reserve, address rateStrategyAddress) + external; + + function setConfiguration(address reserve, uint256 configuration) external; + + /** + * @dev Returns the configuration of the reserve + * @param asset The address of the underlying asset of the reserve + * @return The configuration of the reserve + **/ + function getConfiguration(address asset) + external + view + returns (DataTypes.ReserveConfigurationMap memory); + + /** + * @dev Returns the configuration of the user across all the reserves + * @param user The user address + * @return The configuration of the user + **/ + function getUserConfiguration(address user) + external + view + returns (DataTypes.UserConfigurationMap memory); + + /** + * @dev Returns the normalized income normalized income of the reserve + * @param asset The address of the underlying asset of the reserve + * @return The reserve's normalized income + */ + function getReserveNormalizedIncome(address asset) external view returns (uint256); + + /** + * @dev Returns the normalized variable debt per unit of asset + * @param asset The address of the underlying asset of the reserve + * @return The reserve normalized variable debt + */ + function getReserveNormalizedVariableDebt(address asset) external view returns (uint256); + + /** + * @dev Returns the state and configuration of the reserve + * @param asset The address of the underlying asset of the reserve + * @return The state of the reserve + **/ + function getReserveData(address asset) external view returns (DataTypes.ReserveData memory); + + function finalizeTransfer( + address asset, + address from, + address to, + uint256 amount, + uint256 balanceFromAfter, + uint256 balanceToBefore + ) external; + + function getReservesList() external view returns (address[] memory); + + function getAddressesProvider() external view returns (ILendingPoolAddressesProvider); + + function setPause(bool val) external; + + function paused() external view returns (bool); +} diff --git a/contracts/interfaces/aave/ILendingPoolAddressesProvider.sol b/contracts/interfaces/aave/ILendingPoolAddressesProvider.sol new file mode 100644 index 0000000..97cf315 --- /dev/null +++ b/contracts/interfaces/aave/ILendingPoolAddressesProvider.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.3; + +/** + * @title LendingPoolAddressesProvider contract + * @dev Main registry of addresses part of or connected to the protocol, including permissioned roles + * - Acting also as factory of proxies and admin of those, so with right to change its implementations + * - Owned by the Aave Governance + * @author Aave + **/ +interface ILendingPoolAddressesProvider { + // event MarketIdSet(string newMarketId); + // event LendingPoolUpdated(address indexed newAddress); + // event ConfigurationAdminUpdated(address indexed newAddress); + // event EmergencyAdminUpdated(address indexed newAddress); + // event LendingPoolConfiguratorUpdated(address indexed newAddress); + // event LendingPoolCollateralManagerUpdated(address indexed newAddress); + // event PriceOracleUpdated(address indexed newAddress); + // event LendingRateOracleUpdated(address indexed newAddress); + // event ProxyCreated(bytes32 id, address indexed newAddress); + // event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy); + + // function getMarketId() external view returns (string memory); + + // function setMarketId(string calldata marketId) external; + + // function setAddress(bytes32 id, address newAddress) external; + + // function setAddressAsProxy(bytes32 id, address impl) external; + + // function getAddress(bytes32 id) external view returns (address); + + function getLendingPool() external view returns (address); + + // function setLendingPoolImpl(address pool) external; + + // function getLendingPoolConfigurator() external view returns (address); + + // function setLendingPoolConfiguratorImpl(address configurator) external; + + // function getLendingPoolCollateralManager() external view returns (address); + + // function setLendingPoolCollateralManager(address manager) external; + + // function getPoolAdmin() external view returns (address); + + // function setPoolAdmin(address admin) external; + + // function getEmergencyAdmin() external view returns (address); + + // function setEmergencyAdmin(address admin) external; + + // function getPriceOracle() external view returns (address); + + // function setPriceOracle(address priceOracle) external; + + // function getLendingRateOracle() external view returns (address); + + // function setLendingRateOracle(address lendingRateOracle) external; +} diff --git a/contracts/mocks/AaveIncentivesControllerMock.sol b/contracts/mocks/AaveIncentivesControllerMock.sol new file mode 100644 index 0000000..c227b73 --- /dev/null +++ b/contracts/mocks/AaveIncentivesControllerMock.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol"; +import "../interfaces/aave/IAaveIncentivesController.sol"; + +contract AaveIncentivesControllerMock is IAaveIncentivesController { + function claimRewards( + address[] calldata assets, + uint256 amount, + address to + ) external override returns (uint256 amountToClaim) {} + + function getUserUnclaimedRewards(address user) + external + view + override + returns (uint256 usersUnclaimedRewards) + {} +} diff --git a/contracts/mocks/AggregatorV3Mock.sol b/contracts/mocks/AggregatorV3Mock.sol new file mode 100644 index 0000000..aae0502 --- /dev/null +++ b/contracts/mocks/AggregatorV3Mock.sol @@ -0,0 +1,96 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; + +/* + * AggregatorV3Mock is an implementation of a chainlink oracle that allows prices + * to be set arbitrarily for testing. + */ +contract AggregatorV3Mock is AggregatorV3Interface, Initializable { + // Admin contracts. + address public admin; + uint8 public override decimals; + uint256 public override version; + + string public override description = "This is a mock chainlink oracle"; + + struct RoundData { + uint80 answeredInRound; + int256 answer; + uint256 setAt; + } + mapping(uint80 => RoundData) public roundData; + uint80 currentRoundId; + + //////////////////////////////////// + /////////// MODIFIERS ////////////// + //////////////////////////////////// + + modifier adminOnly() { + require(msg.sender == admin, "Not admin"); + _; + } + + //////////////////////////////////// + ///// CONTRACT SET-UP ////////////// + //////////////////////////////////// + + function setup( + address _admin, + int256 _price, + uint8 _decimals + ) public initializer { + admin = _admin; + decimals = (_decimals != 0) ? _decimals : 18; + version = 1; + currentRoundId = 1; + roundData[currentRoundId] = RoundData(currentRoundId, _price, block.timestamp); + } + + //////////////////////////////////// + ///// IMPLEMENTATION /////////////// + //////////////////////////////////// + + /* + * Sets the mock rate for the oracle. + */ + function setPrice(int256 _price) public { + currentRoundId = currentRoundId + 1; + roundData[currentRoundId] = RoundData(currentRoundId, _price, block.timestamp); + } + + function getRoundData(uint80 _roundId) + external + view + override + returns ( + uint80 roundId, + int256 answer, + uint256 startedAt, + uint256 updatedAt, + uint80 answeredInRound + ) + { + RoundData storage round = roundData[_roundId]; + return (_roundId, round.answer, round.setAt, round.setAt, 1); + } + + function latestRoundData() + external + view + override + returns ( + uint80 roundId, + int256 answer, + uint256 startedAt, + uint256 updatedAt, + uint80 answeredInRound + ) + { + RoundData storage round = roundData[currentRoundId]; + return (currentRoundId, round.answer, round.setAt, round.setAt, 1); + } +} diff --git a/contracts/mocks/ERC20Mock.sol b/contracts/mocks/ERC20Mock.sol new file mode 100644 index 0000000..4a725dd --- /dev/null +++ b/contracts/mocks/ERC20Mock.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol"; + +contract ERC20Mock is ERC20PresetMinterPauser { + constructor(string memory name, string memory symbol) ERC20PresetMinterPauser(name, symbol) {} + + event TransferCalled(address sender, address recipient, uint256 amount); + + bool shouldMockTransfer = true; + + function setShouldMockTransfer(bool _value) public { + shouldMockTransfer = _value; + } + + function transfer(address recipient, uint256 amount) public override returns (bool) { + emit TransferCalled(_msgSender(), recipient, amount); + if (shouldMockTransfer) { + return true; + } else { + return super.transfer(recipient, amount); + } + } +} diff --git a/contracts/mocks/LendingPoolAaveMock.sol b/contracts/mocks/LendingPoolAaveMock.sol new file mode 100644 index 0000000..bff6733 --- /dev/null +++ b/contracts/mocks/LendingPoolAaveMock.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +contract LendingPoolAaveMock { + function deposit( + address asset, + uint256 amount, + address onBehalfOf, + uint16 referralCode + ) public pure { + return (); + } + + function withdraw( + address asset, + uint256 amount, + address to + ) public pure returns (uint256) { + return (abi.decode("", (uint256))); + } +} diff --git a/contracts/mocks/LendingPoolAddressesProvider.sol b/contracts/mocks/LendingPoolAddressesProvider.sol new file mode 100644 index 0000000..bbe289b --- /dev/null +++ b/contracts/mocks/LendingPoolAddressesProvider.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "../interfaces/aave/ILendingPoolAddressesProvider.sol"; + +contract LendingPoolAddressesProviderMock is ILendingPoolAddressesProvider { + address public lendingPool; + + function setLendingPool(address _lendingPool) external { + lendingPool = _lendingPool; + } + + function getLendingPool() external view override returns (address) { + return lendingPool; + } +} diff --git a/contracts/mocks/MockERC20.sol b/contracts/mocks/MockERC20.sol new file mode 100644 index 0000000..3c57517 --- /dev/null +++ b/contracts/mocks/MockERC20.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +contract MockERC20 { + address public steward; + + mapping(address => uint256) public _balances; + mapping(address => mapping(address => uint256)) public _allowance; + string name; + string symbol; + uint8 decimals; + address minter; + + constructor( + string memory _name, + string memory _symbol, + uint8 _decimals, + address _minter + ) { + name = _name; + symbol = _symbol; + decimals = _decimals; + minter = _minter; + } + + function mint(address user, uint256 amount) public returns (bool) { + _balances[user] = _balances[user] + amount; + return true; + } + + function burnFrom(address user, uint256 amount) public { + _balances[user] = _balances[user] - amount; + } + + function approve(address user, uint256 amount) external returns (bool) { + _allowance[msg.sender][user] = amount; + return true; + } + + function transfer(address to, uint256 amount) external returns (bool) { + _balances[msg.sender] = _balances[msg.sender] - amount; + _balances[to] = _balances[to] + amount; + return true; + } + + function allowance(address owner, address spender) external view returns (uint256) { + return _allowance[owner][spender]; + } + + function transferFrom( + address sender, + address to, + uint256 amount + ) external returns (bool) { + _balances[sender] = _balances[sender] - amount; + _balances[to] = _balances[to] + amount; + _allowance[sender][to] = _allowance[sender][to] - amount; + return true; + } + + function balanceOf(address user) external view returns (uint256) { + return _balances[user]; + } +} diff --git a/contracts/mocks/OracleManagerMock.sol b/contracts/mocks/OracleManagerMock.sol new file mode 100644 index 0000000..2e24d68 --- /dev/null +++ b/contracts/mocks/OracleManagerMock.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "../interfaces/IOracleManager.sol"; + +/* + * Mock implementation of an OracleManager with fixed, changeable prices. + */ +contract OracleManagerMock is IOracleManager { + // Admin contract. + address public admin; + + // Global state. + int256 currentPrice; // e18 + + //////////////////////////////////// + /////////// MODIFIERS ////////////// + //////////////////////////////////// + + modifier adminOnly() { + require(msg.sender == admin, "Not admin"); + _; + } + + //////////////////////////////////// + ///// CONTRACT SET-UP ////////////// + //////////////////////////////////// + + constructor(address _admin) { + admin = _admin; + + // Default to a price of 1. + currentPrice = 1e18; + } + + //////////////////////////////////// + ///// IMPLEMENTATION /////////////// + //////////////////////////////////// + + function setPrice(int256 newPrice) public adminOnly { + currentPrice = newPrice; + } + + function updatePrice() external override returns (int256) { + return currentPrice; + } + + function getLatestPrice() external view override returns (int256) { + return currentPrice; + } +} diff --git a/contracts/mocks/YieldManagerMock.sol b/contracts/mocks/YieldManagerMock.sol new file mode 100644 index 0000000..80122f6 --- /dev/null +++ b/contracts/mocks/YieldManagerMock.sol @@ -0,0 +1,160 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol"; + +import "../interfaces/IYieldManager.sol"; +import "../interfaces/aave/IAaveIncentivesController.sol"; + +/* + * YieldManagerMock is an implementation of a yield manager that supports + * configurable, deterministic token yields for testing. Note that the mock + * needs to be able to mint the underlying token to simulate yield. + */ +contract YieldManagerMock is IYieldManager { + // Admin contracts. + address public admin; + address public longShort; + address public treasury; + + bool public isInitialized = false; + + // Fixed-precision scale for interest percentages and fees. + uint256 public constant TEN_TO_THE_18 = 1e18; + + // Global state. + ERC20PresetMinterPauser public token; + ERC20PresetMinterPauser public tokenOtherRewardERC20; + + uint256 public override totalReservedForTreasury; + uint256 public totalHeld; + + uint256 public yieldRate; // pcnt per sec + uint256 public lastSettled; // secs after epoch + + //////////////////////////////////// + /////////// MODIFIERS ////////////// + //////////////////////////////////// + + modifier longShortOnly() { + require(msg.sender == longShort, "Not longShort"); + _; + } + + //////////////////////////////////// + ///// CONTRACT SET-UP ////////////// + //////////////////////////////////// + + constructor( + address _longShort, + address _treasury, + address _token + ) { + // Admin contracts. + longShort = _longShort; + treasury = _treasury; + + // Global state. + token = ERC20PresetMinterPauser(_token); + lastSettled = block.timestamp; + } + + //////////////////////////////////// + ///// IMPLEMENTATION /////////////// + //////////////////////////////////// + + /** + * Adds the token's accrued yield to the token holdings. + */ + function settle() public { + uint256 totalYieldRate = yieldRate * (block.timestamp - lastSettled); + uint256 totalYield = (totalHeld * totalYieldRate) / TEN_TO_THE_18; + + lastSettled = block.timestamp; + totalHeld = totalHeld + totalYield; + if (totalYield > 0) { + token.mint(address(this), totalYield); + } + } + + /** + * Adds the given yield percent to the token holdings. + */ + function settleWithYieldPercent(uint256 yieldPercent) external { + uint256 totalYield = (totalHeld * yieldPercent) / TEN_TO_THE_18; + + lastSettled = block.timestamp; + totalHeld = totalHeld + totalYield; + token.mint(address(this), totalYield); + } + + /** + * Adds the given absolute yield to the token holdings. + */ + function settleWithYieldAbsolute(uint256 totalYield) external { + lastSettled = block.timestamp; + totalHeld = totalHeld + totalYield; + token.mint(address(this), totalYield); + } + + /** + * Sets the yield percentage per second for the given token. + */ + function setYieldRate(uint256 _yieldRate) external { + yieldRate = _yieldRate; + } + + function depositPaymentToken(uint256 amount) external override longShortOnly { + // Ensure token state is current. + settle(); + + // Transfer tokens to manager contract. + totalHeld = totalHeld + amount; + } + + /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave + /// @param user User to recieve the payout + /// @param amount Amount of payment token to pay to user + function transferPaymentTokensToUser(address user, uint256 amount) + external + override + longShortOnly + { + // Transfer tokens back to LongShort contract. + token.transfer(user, amount); + } + + function removePaymentTokenFromMarket(uint256 amount) external override longShortOnly { + // Ensure token state is current. + settle(); + require(amount <= totalHeld); + + totalHeld = totalHeld - amount; + } + + function distributeYieldForTreasuryAndReturnMarketAllocation( + uint256 totalValueRealizedForMarket, + uint256 treasuryYieldPercent_e18 + ) external override longShortOnly returns (uint256) { + uint256 unrealizedYield = totalHeld - totalValueRealizedForMarket - totalReservedForTreasury; + + if (unrealizedYield == 0) { + return 0; + } + + uint256 amountForTreasury = (unrealizedYield * treasuryYieldPercent_e18) / TEN_TO_THE_18; + uint256 amountForMarketIncentives = unrealizedYield - amountForTreasury; + + totalReservedForTreasury += amountForTreasury; + + return amountForMarketIncentives; + } + + function withdrawTreasuryFunds() external override longShortOnly {} + + function initializeForMarket() external override longShortOnly { + require(!isInitialized, "Yield Manager is already in use"); + isInitialized = true; + } +} diff --git a/contracts/oracles/OracleManagerChainlink.sol b/contracts/oracles/OracleManagerChainlink.sol new file mode 100644 index 0000000..af59158 --- /dev/null +++ b/contracts/oracles/OracleManagerChainlink.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "../interfaces/IOracleManager.sol"; +import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; + +/* + * Implementation of an OracleManager that fetches prices from a Chainlink aggregate price feed. + */ +contract OracleManagerChainlink is IOracleManager { + // Admin addresses. + address public admin; + // Global state. + AggregatorV3Interface public chainlinkOracle; + uint8 public oracleDecimals; + + //////////////////////////////////// + /////////// MODIFIERS ////////////// + //////////////////////////////////// + + modifier adminOnly() { + require(msg.sender == admin, "Not admin"); + _; + } + + //////////////////////////////////// + ///// CONTRACT SET-UP ////////////// + //////////////////////////////////// + constructor(address _admin, address _chainlinkOracle) { + admin = _admin; + chainlinkOracle = AggregatorV3Interface(_chainlinkOracle); + oracleDecimals = chainlinkOracle.decimals(); + } + + //////////////////////////////////// + /// MULTISIG ADMIN FUNCTIONS /////// + //////////////////////////////////// + + function changeAdmin(address _admin) external adminOnly { + admin = _admin; + } + + //////////////////////////////////// + ///// IMPLEMENTATION /////////////// + //////////////////////////////////// + function _getLatestPrice() internal view returns (int256) { + (, int256 price, , , ) = chainlinkOracle.latestRoundData(); + return price; + } + + function getLatestPrice() external view override returns (int256) { + return _getLatestPrice(); + } + + function updatePrice() external virtual override returns (int256) { + return _getLatestPrice(); + } +} diff --git a/contracts/oracles/OracleManagerChainlinkTestnet.sol b/contracts/oracles/OracleManagerChainlinkTestnet.sol new file mode 100644 index 0000000..b4a0a68 --- /dev/null +++ b/contracts/oracles/OracleManagerChainlinkTestnet.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "./OracleManagerChainlink.sol"; + +contract OracleManagerChainlinkTestnet is OracleManagerChainlink { + uint256 lastUpdate; + uint256 maxUpdateIntervalSeconds; + int256 forcedPriceAdjustment; + + constructor( + address _admin, + address _chainlinkOracle, + uint256 _maxUpdateIntervalSeconds + ) OracleManagerChainlink(_admin, _chainlinkOracle) { + maxUpdateIntervalSeconds = _maxUpdateIntervalSeconds; + } + + function setMaxUpdateInterval(uint256 newMaxUpdateIntervalSeconds) external adminOnly { + maxUpdateIntervalSeconds = newMaxUpdateIntervalSeconds; + } + + function updatePrice() external override returns (int256) { + int256 latestPrice = super._getLatestPrice(); + + int256 priceAdjustment = forcedPriceAdjustment; + if (lastUpdate + maxUpdateIntervalSeconds < block.timestamp) { + priceAdjustment = (priceAdjustment + 1) % 2; + forcedPriceAdjustment = priceAdjustment; + lastUpdate = block.timestamp; + } + + return latestPrice + priceAdjustment; + } +} diff --git a/contracts/oracles/OracleManagerEthKillerChainlink.sol b/contracts/oracles/OracleManagerEthKillerChainlink.sol new file mode 100644 index 0000000..8d24533 --- /dev/null +++ b/contracts/oracles/OracleManagerEthKillerChainlink.sol @@ -0,0 +1,114 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; + +import "../interfaces/IOracleManager.sol"; + +contract OracleManagerEthKillerChainlink is IOracleManager { + address public admin; // This will likely be the Gnosis safe + + // Oracle price, changes by average of the underlying asset changes. + int256 public indexPrice; + + // Underlying asset prices. + int256 public tronPrice; + int256 public eosPrice; + int256 public xrpPrice; + + // Oracle addresses + AggregatorV3Interface public tronOracle; + AggregatorV3Interface public eosOracle; + AggregatorV3Interface public xrpOracle; + + //////////////////////////////////// + /////////// MODIFIERS ////////////// + //////////////////////////////////// + + modifier adminOnly() { + require(msg.sender == admin); + _; + } + + //////////////////////////////////// + ///// CONTRACT SET-UP ////////////// + //////////////////////////////////// + + constructor( + address _admin, + address _tronOracle, + address _eosOracle, + address _xrpOracle + ) { + admin = _admin; + tronOracle = AggregatorV3Interface(_tronOracle); + eosOracle = AggregatorV3Interface(_eosOracle); + xrpOracle = AggregatorV3Interface(_xrpOracle); + // Initial asset prices. + (tronPrice, eosPrice, xrpPrice) = _getAssetPrices(); + + // Initial base index price. + indexPrice = 1e18; + } + + //////////////////////////////////// + /// MULTISIG ADMIN FUNCTIONS /////// + //////////////////////////////////// + + function changeAdmin(address _admin) external adminOnly { + admin = _admin; + } + + //////////////////////////////////// + ///// IMPLEMENTATION /////////////// + //////////////////////////////////// + + function _getAssetPrices() + internal + view + returns ( + int256, + int256, + int256 + ) + { + (, int256 _tronPrice, , , ) = tronOracle.latestRoundData(); + (, int256 _eosPrice, , , ) = eosOracle.latestRoundData(); + (, int256 _xrpPrice, , , ) = xrpOracle.latestRoundData(); + return (_tronPrice, _eosPrice, _xrpPrice); + } + + function _updatePrice() internal virtual returns (int256) { + (int256 newTronPrice, int256 newEosPrice, int256 newXrpPrice) = _getAssetPrices(); + + int256 valueOfChangeInIndex = (int256(indexPrice) * + (_calcAbsolutePercentageChange(newTronPrice, tronPrice) + + _calcAbsolutePercentageChange(newEosPrice, eosPrice) + + _calcAbsolutePercentageChange(newXrpPrice, xrpPrice))) / (3 * 1e18); + + tronPrice = newTronPrice; + eosPrice = newEosPrice; + xrpPrice = newXrpPrice; + + indexPrice = indexPrice + valueOfChangeInIndex; + + return indexPrice; + } + + function updatePrice() external override returns (int256) { + return _updatePrice(); + } + + function _calcAbsolutePercentageChange(int256 newPrice, int256 basePrice) + internal + pure + returns (int256) + { + return ((newPrice - basePrice) * (1e18)) / (basePrice); + } + + function getLatestPrice() external view override returns (int256) { + return indexPrice; + } +} diff --git a/contracts/oracles/OracleManagerEthKillerChainlinkTestnet.sol b/contracts/oracles/OracleManagerEthKillerChainlinkTestnet.sol new file mode 100644 index 0000000..f35ab68 --- /dev/null +++ b/contracts/oracles/OracleManagerEthKillerChainlinkTestnet.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "./OracleManagerEthKillerChainlink.sol"; + +contract OracleManagerEthKillerChainlinkTestnet is OracleManagerEthKillerChainlink { + uint256 lastUpdate; + uint256 maxUpdateIntervalSeconds; + int256 forcedPriceAdjustment; + + constructor( + address _admin, + address _tronOracle, + address _eosOracle, + address _xrpOracle, + uint256 _maxUpdateIntervalSeconds + ) OracleManagerEthKillerChainlink(_admin, _tronOracle, _eosOracle, _xrpOracle) { + maxUpdateIntervalSeconds = _maxUpdateIntervalSeconds; + } + + function setMaxUpdateInterval(uint256 newMaxUpdateIntervalSeconds) external adminOnly { + maxUpdateIntervalSeconds = newMaxUpdateIntervalSeconds; + } + + function _updatePrice() internal override returns (int256) { + int256 previousPrice = indexPrice; + int256 latestPrice = super._updatePrice(); + + if (previousPrice != latestPrice || lastUpdate + maxUpdateIntervalSeconds < block.timestamp) { + forcedPriceAdjustment = (forcedPriceAdjustment + 1) % 2; + lastUpdate = block.timestamp; + } + + return latestPrice + forcedPriceAdjustment; + } +} diff --git a/contracts/oracles/OracleManagerEthVsBtc.sol b/contracts/oracles/OracleManagerEthVsBtc.sol new file mode 100644 index 0000000..acd91e5 --- /dev/null +++ b/contracts/oracles/OracleManagerEthVsBtc.sol @@ -0,0 +1,76 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; + +import "../interfaces/IOracleManager.sol"; + +/** + Contract that gives price ration of ETH/BTC +*/ +contract OracleManagerEthVsBtc is IOracleManager { + address public admin; // This will likely be the Gnosis safe + + int256 public ethDominance; + + // Oracle addresses + AggregatorV3Interface public btcOracle; + AggregatorV3Interface public ethOracle; + + //////////////////////////////////// + /////////// MODIFIERS ////////////// + //////////////////////////////////// + + modifier adminOnly() { + require(msg.sender == admin); + _; + } + + //////////////////////////////////// + ///// CONTRACT SET-UP ////////////// + //////////////////////////////////// + + constructor( + address _admin, + address _btcOracle, + address _ethOracle + ) { + admin = _admin; + + btcOracle = AggregatorV3Interface(_btcOracle); + ethOracle = AggregatorV3Interface(_ethOracle); + + _updatePrice(); + } + + //////////////////////////////////// + /// MULTISIG ADMIN FUNCTIONS /////// + //////////////////////////////////// + + function changeAdmin(address _admin) external adminOnly { + admin = _admin; + } + + //////////////////////////////////// + ///// IMPLEMENTATION /////////////// + //////////////////////////////////// + + function _updatePrice() private returns (int256) { + (, int256 _ethPrice, , , ) = ethOracle.latestRoundData(); + (, int256 _btcPrice, , , ) = btcOracle.latestRoundData(); + + // 1e20 as 18 decimals but as % + ethDominance = int256((uint256(_ethPrice) * 1e20) / (uint256(_btcPrice))); + + return ethDominance; + } + + function updatePrice() external override returns (int256) { + return _updatePrice(); + } + + function getLatestPrice() external view override returns (int256) { + return ethDominance; + } +} diff --git a/contracts/oracles/OracleManagerFlipp3ning.sol b/contracts/oracles/OracleManagerFlipp3ning.sol new file mode 100644 index 0000000..ecc51bd --- /dev/null +++ b/contracts/oracles/OracleManagerFlipp3ning.sol @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; +import "../interfaces/IOracleManager.sol"; + +contract OracleManagerFlipp3ning is IOracleManager { + address public ethMarketCapFeed; + address public btcMarketCapFeed; + + struct PriceData { + uint80 lastRoundEth; + uint80 lastRoundBtc; + uint128 price; + } + + PriceData public priceData; + + constructor(address _ethMarketCapFeed, address _btcMarketCapFeed) { + ethMarketCapFeed = _ethMarketCapFeed; + btcMarketCapFeed = _btcMarketCapFeed; + + require( + AggregatorV3Interface(ethMarketCapFeed).decimals() == + AggregatorV3Interface(btcMarketCapFeed).decimals(), + "Decimals for feeds are different!" + ); + + (uint80 _ethRound, uint80 _btcRound, int256 _ethMarketCap, int256 _btcMarketCap) = _feedData(); + + priceData.price = _dominance(_ethMarketCap, _btcMarketCap); + priceData.lastRoundEth = _ethRound; + priceData.lastRoundBtc = _btcRound; + } + + function _feedData() + internal + view + returns ( + uint80 ethRound, + uint80 btcRound, + int256 ethPrice, + int256 btcPrice + ) + { + (ethRound, ethPrice, , , ) = AggregatorV3Interface(ethMarketCapFeed).latestRoundData(); + (btcRound, btcPrice, , , ) = AggregatorV3Interface(btcMarketCapFeed).latestRoundData(); + } + + function _dominance(int256 _ethMarketCap, int256 _btcMarketCap) internal view returns (uint128) { + // reverts if btc market cap == 0 + return uint128(uint256((_ethMarketCap * 1e20) / _btcMarketCap)); + } + + function getLatestPrice() external view override returns (int256) { + return int256(uint256(priceData.price)); + } + + function updatePrice() external override returns (int256) { + (uint80 _ethRound, uint80 _btcRound, int256 _ethMarketCap, int256 _btcMarketCap) = _feedData(); + + if (_ethRound == priceData.lastRoundEth || _btcRound == priceData.lastRoundBtc) { + return int256(uint256(priceData.price)); + } + + uint128 price = _dominance(_ethMarketCap, _btcMarketCap); + priceData.price = price; + priceData.lastRoundEth = _ethRound; + priceData.lastRoundBtc = _btcRound; + + return int256(uint256(price)); + } +} diff --git a/contracts/oracles/OracleManagerFlippening_V0.sol b/contracts/oracles/OracleManagerFlippening_V0.sol new file mode 100644 index 0000000..cc06203 --- /dev/null +++ b/contracts/oracles/OracleManagerFlippening_V0.sol @@ -0,0 +1,186 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; + +import "../interfaces/IOracleManager.sol"; + +/** + Contract that estimates ETH / BTC dominance, + expressed as (eth market cap) / (btc market cap) + Estimates BTC & ETH supply. In the future + look towards using oracles for it. +*/ +contract OracleManagerFlippening_V0 is IOracleManager { + address public admin; // This will likely be the Gnosis safe + + int256 public ethDominance; + + uint256 public ethSupply; // 18 decimals + uint256 public btcSupply; // 8 decimals + + uint256 public btcBlocksPerDay; + uint256 public ethBlocksPerDay; + + uint256 public btcBlockReward; // 8 decimals + uint256 public ethBlockReward; // 18 decimals + + uint256 public ethUnclesPerDay; + + // Eth has a variable uncle reward: + // - https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1234.md, + // Source here says it's roughly 75%: + // - https://docs.ethhub.io/ethereum-basics/monetary-policy/ + // Might be worth also looking into just taking it as the mean of the possibilities + // = sum from 1 to 7 of (8 - sumIndex) * blockReward / 8 / 7 + + uint256 public ethUncleReward; // 18 decimals + + uint256 public ethNephewReward; // 18 decimals. currently = blockReward / 32 + + uint256 lastUpdated; + + // Oracle addresses + AggregatorV3Interface public btcOracle; + AggregatorV3Interface public ethOracle; + + //////////////////////////////////// + /////////// MODIFIERS ////////////// + //////////////////////////////////// + + modifier adminOnly() { + require(msg.sender == admin); + _; + } + + //////////////////////////////////// + ///// CONTRACT SET-UP ////////////// + //////////////////////////////////// + + constructor( + address _admin, + address _btcOracle, + address _ethOracle, + uint256 _ethSupply, + uint256 _btcSupply, + uint256 _btcBlocksPerDay, + uint256 _ethBlocksPerDay, + uint256 _ethUnclesPerDay, + uint256 _btcBlockReward, + uint256 _ethBlockReward, + uint256 _ethUncleReward, + uint256 _ethNephewReward + ) { + admin = _admin; + + btcOracle = AggregatorV3Interface(_btcOracle); + ethOracle = AggregatorV3Interface(_ethOracle); + + ethSupply = _ethSupply; + btcSupply = _btcSupply; + + btcBlocksPerDay = _btcBlocksPerDay; + + ethBlocksPerDay = _ethBlocksPerDay; + ethUnclesPerDay = _ethUnclesPerDay; + + btcBlockReward = _btcBlockReward; + + ethBlockReward = _ethBlockReward; + ethUncleReward = _ethUncleReward; + ethNephewReward = _ethNephewReward; + + lastUpdated = block.timestamp; + + _updatePrice(); + } + + //////////////////////////////////// + /// MULTISIG ADMIN FUNCTIONS /////// + //////////////////////////////////// + + function changeAdmin(address _admin) external adminOnly { + admin = _admin; + } + + function changeEthSupply(uint256 supply) external adminOnly { + ethSupply = supply; + } + + function changeBtcSupply(uint256 supply) external adminOnly { + btcSupply = supply; + } + + function changeBtcBlocksPerDay(uint256 blocks) external adminOnly { + btcBlocksPerDay = blocks; + } + + function changeEthBlocksPerDay(uint256 blocks) external adminOnly { + ethBlocksPerDay = blocks; + } + + function changeEthUnclesPerDay(uint256 uncles) external adminOnly { + ethUnclesPerDay = uncles; + } + + function changeBtcBlockReward(uint256 reward) external adminOnly { + btcBlockReward = reward; + } + + function changeEthBlockReward(uint256 reward) external adminOnly { + ethBlockReward = reward; + } + + function changeEthUncleReward(uint256 reward) external adminOnly { + ethUncleReward = reward; + } + + function changeEthNephewReward(uint256 reward) external adminOnly { + ethNephewReward = reward; + } + + //////////////////////////////////// + ///// IMPLEMENTATION /////////////// + //////////////////////////////////// + + function _getBtcSupply() internal view returns (uint256) { + return + btcSupply + (((block.timestamp - lastUpdated) * btcBlocksPerDay * btcBlockReward) / (1 days)); + } + + function _getEthSupply() internal view returns (uint256) { + return + ethSupply + + (((block.timestamp - lastUpdated) * + (ethBlocksPerDay * ethBlockReward + ethUnclesPerDay * (ethNephewReward + ethUncleReward))) / + 1 days); + } + + function _updatePrice() private returns (int256) { + (, int256 _ethPrice, , , ) = ethOracle.latestRoundData(); + (, int256 _btcPrice, , , ) = btcOracle.latestRoundData(); + ethSupply = _getEthSupply(); + btcSupply = _getBtcSupply(); + + lastUpdated = block.timestamp; + + // ethSupply * ethPrice = 26 decimals + // btcSupply * btcPrice = 16 decimals + + // 1e20 as 18 decimals but as % + ethDominance = int256( + (uint256(_ethPrice) * ethSupply * 1e20) / (uint256(_btcPrice) * btcSupply * 1e10) + ); + + return ethDominance; + } + + function updatePrice() external override returns (int256) { + return _updatePrice(); + } + + function getLatestPrice() external view override returns (int256) { + return ethDominance; + } +} diff --git a/contracts/testing/LongShortInternalStateSetters.sol b/contracts/testing/LongShortInternalStateSetters.sol new file mode 100644 index 0000000..7f56dab --- /dev/null +++ b/contracts/testing/LongShortInternalStateSetters.sol @@ -0,0 +1,254 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "../LongShort.sol"; + +/* +NOTE: This contract is for testing purposes only! +*/ + +contract LongShortInternalStateSetters is LongShort { + function setInitializeMarketParams( + uint32 marketIndex, + bool marketIndexValue, + uint32 _latestMarket, + address _staker, + address longAddress, + address shortAddress + ) public { + latestMarket = _latestMarket; + marketExists[marketIndex] = marketIndexValue; + staker = (_staker); + syntheticTokens[marketIndex][ + true /*short*/ + ] = (longAddress); + syntheticTokens[marketIndex][ + false /*short*/ + ] = (shortAddress); + } + + function setMarketExistsMulti(uint32[] calldata marketIndexes) external { + uint256 length = marketIndexes.length; + for (uint256 i = 0; i < length; i++) { + marketExists[marketIndexes[i]] = true; + } + } + + function set_updateSystemStateInternalGlobals( + uint32 marketIndex, + uint256 _latestUpdateIndexForMarket, + uint256 syntheticTokenPrice_inPaymentTokens_long, + uint256 syntheticTokenPrice_inPaymentTokens_short, + int256 _assetPrice, + uint256 longValue, + uint256 shortValue, + address oracleManager, + address _staker, + address synthLong, + address synthShort, + uint256 stakerNextPrice_currentUpdateIndex + ) public { + marketExists[marketIndex] = true; + marketUpdateIndex[marketIndex] = _latestUpdateIndexForMarket; + syntheticToken_priceSnapshot[marketIndex][true][ + _latestUpdateIndexForMarket + ] = syntheticTokenPrice_inPaymentTokens_long; + syntheticToken_priceSnapshot[marketIndex][false][ + _latestUpdateIndexForMarket + ] = syntheticTokenPrice_inPaymentTokens_short; + + marketSideValueInPaymentToken[marketIndex][true] = longValue; + marketSideValueInPaymentToken[marketIndex][false] = shortValue; + + assetPrice[marketIndex] = _assetPrice; + oracleManagers[marketIndex] = oracleManager; + + syntheticTokens[marketIndex][true] = synthLong; + syntheticTokens[marketIndex][false] = synthShort; + + staker = _staker; + + userNextPrice_currentUpdateIndex[marketIndex][_staker] = stakerNextPrice_currentUpdateIndex; + } + + function setGetUsersConfirmedButNotSettledBalanceGlobals( + uint32 marketIndex, + address user, + bool isLong, + uint256 _userNextPrice_currentUpdateIndex, + uint256 _marketUpdateIndex, + uint256 _userNextPrice_paymentToken_depositAmount_isLong, + uint256 _syntheticToken_priceSnapshot_isLong, + uint256 _syntheticToken_priceSnapshot_notIsLong, + uint256 _userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong + ) external { + marketExists[marketIndex] = true; + userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex; + marketUpdateIndex[marketIndex] = _marketUpdateIndex; + + userNextPrice_paymentToken_depositAmount[marketIndex][isLong][ + user + ] = _userNextPrice_paymentToken_depositAmount_isLong; + userNextPrice_paymentToken_depositAmount[marketIndex][!isLong][user] = 0; // reset other side for good measure + + syntheticToken_priceSnapshot[marketIndex][isLong][ + _userNextPrice_currentUpdateIndex + ] = _syntheticToken_priceSnapshot_isLong; + syntheticToken_priceSnapshot[marketIndex][!isLong][ + _userNextPrice_currentUpdateIndex + ] = _syntheticToken_priceSnapshot_notIsLong; + + userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][!isLong][ + user + ] = _userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong; + userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isLong][user] = 0; // reset other side for good measure + } + + function setPerformOutstandingBatchedSettlementsGlobals( + uint32 marketIndex, + uint256 batched_amountPaymentToken_depositLong, + uint256 batched_amountPaymentToken_depositShort, + uint256 batched_amountSyntheticToken_redeemLong, + uint256 batched_amountSyntheticToken_redeemShort, + uint256 batchedAmountSyntheticTokenToShiftFromLong, + uint256 batchedAmountSyntheticTokenToShiftFromShort + ) external { + batched_amountPaymentToken_deposit[marketIndex][true] = batched_amountPaymentToken_depositLong; + batched_amountPaymentToken_deposit[marketIndex][ + false + ] = batched_amountPaymentToken_depositShort; + batched_amountSyntheticToken_redeem[marketIndex][ + true + ] = batched_amountSyntheticToken_redeemLong; + batched_amountSyntheticToken_redeem[marketIndex][ + false + ] = batched_amountSyntheticToken_redeemShort; + batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][ + true + ] = batchedAmountSyntheticTokenToShiftFromLong; + batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][ + false + ] = batchedAmountSyntheticTokenToShiftFromShort; + } + + function setHandleChangeInSyntheticTokensTotalSupplyGlobals( + uint32 marketIndex, + address longSyntheticToken, + address shortSyntheticToken + ) external { + syntheticTokens[marketIndex][true] = longSyntheticToken; + syntheticTokens[marketIndex][false] = shortSyntheticToken; + } + + function setRedeemNextPriceGlobals( + uint32 marketIndex, + uint256 _marketUpdateIndex, + address syntheticToken, + bool isLong + ) external { + marketUpdateIndex[marketIndex] = _marketUpdateIndex; + syntheticTokens[marketIndex][isLong] = syntheticToken; + } + + function setShiftNextPriceGlobals( + uint32 marketIndex, + uint256 _marketUpdateIndex, + address syntheticTokenShiftedFrom, + bool isShiftFromLong + ) external { + marketUpdateIndex[marketIndex] = _marketUpdateIndex; + syntheticTokens[marketIndex][isShiftFromLong] = syntheticTokenShiftedFrom; + } + + function setExecuteOutstandingNextPriceMintsGlobals( + uint32 marketIndex, + address user, + bool isLong, + address syntheticToken, + uint256 _userNextPrice_syntheticToken_redeemAmount, + uint256 _userNextPrice_currentUpdateIndex, + uint256 _syntheticToken_priceSnapshot + ) external { + userNextPrice_paymentToken_depositAmount[marketIndex][isLong][ + user + ] = _userNextPrice_syntheticToken_redeemAmount; + userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex; + syntheticToken_priceSnapshot[marketIndex][isLong][ + _userNextPrice_currentUpdateIndex + ] = _syntheticToken_priceSnapshot; + syntheticTokens[marketIndex][isLong] = syntheticToken; + } + + function setExecuteOutstandingNextPriceRedeemsGlobals( + uint32 marketIndex, + address user, + bool isLong, + address yieldManager, + uint256 _userNextPrice_syntheticToken_redeemAmount, + uint256 _userNextPrice_currentUpdateIndex, + uint256 _syntheticToken_priceSnapshot + ) external { + userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][ + user + ] = _userNextPrice_syntheticToken_redeemAmount; + userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex; + syntheticToken_priceSnapshot[marketIndex][isLong][ + _userNextPrice_currentUpdateIndex + ] = _syntheticToken_priceSnapshot; + yieldManagers[marketIndex] = yieldManager; + } + + function setExecuteOutstandingNextPriceTokenShiftsGlobals( + uint32 marketIndex, + address user, + bool isShiftFromLong, + address syntheticTokenShiftedTo, + uint256 _userNextPrice_syntheticToken_toShiftAwayFrom_marketSide, + uint256 _userNextPrice_currentUpdateIndex, + uint256 _syntheticToken_priceSnapshotShiftedFrom, + uint256 _syntheticToken_priceSnapshotShiftedTo + ) external { + userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][ + user + ] = _userNextPrice_syntheticToken_toShiftAwayFrom_marketSide; + userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex; + syntheticToken_priceSnapshot[marketIndex][isShiftFromLong][ + _userNextPrice_currentUpdateIndex + ] = _syntheticToken_priceSnapshotShiftedFrom; + syntheticToken_priceSnapshot[marketIndex][!isShiftFromLong][ + _userNextPrice_currentUpdateIndex + ] = _syntheticToken_priceSnapshotShiftedTo; + syntheticTokens[marketIndex][!isShiftFromLong] = syntheticTokenShiftedTo; + } + + function setExecuteOutstandingNextPriceSettlementsGlobals( + uint32 marketIndex, + address user, + uint256 _userNextPrice_currentUpdateIndex, + uint256 _marketUpdateIndex + ) external { + userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex; + marketUpdateIndex[marketIndex] = _marketUpdateIndex; + } + + function setClaimAndDistributeYieldThenRebalanceMarketGlobals( + uint32 marketIndex, + uint256 _marketSideValueInPaymentTokenLong, + uint256 _marketSideValueInPaymentTokenShort, + address yieldManager + ) external { + marketSideValueInPaymentToken[marketIndex][true] = _marketSideValueInPaymentTokenLong; + marketSideValueInPaymentToken[marketIndex][false] = _marketSideValueInPaymentTokenShort; + yieldManagers[marketIndex] = yieldManager; + } + + function setDepositFundsGlobals( + uint32 marketIndex, + address paymentToken, + address yieldManager + ) external { + paymentTokens[marketIndex] = paymentToken; + yieldManagers[marketIndex] = yieldManager; + } +} diff --git a/contracts/testing/StakerInternalStateSetters.sol b/contracts/testing/StakerInternalStateSetters.sol new file mode 100644 index 0000000..7bb0408 --- /dev/null +++ b/contracts/testing/StakerInternalStateSetters.sol @@ -0,0 +1,275 @@ +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity 0.8.3; + +import "../Staker.sol"; + +/* +NOTE: This contract is for testing purposes only! +*/ + +contract StakerInternalStateSetters is Staker { + /////////////////////////////////////////////// + //////////// Test Helper Functions //////////// + /////////////////////////////////////////////// + // TODO: remove parts of this function that aren't necessary for the updated `_calculateAccumulatedFloat` funciton + function setFloatRewardCalcParams( + uint32 marketIndex, + address longToken, + address shortToken, + uint256 newLatestRewardIndex, + address user, + uint256 usersLatestClaimedReward, + uint256 accumulativeFloatPerTokenLatestLong, + uint256 accumulativeFloatPerTokenLatestShort, + uint256 accumulativeFloatPerTokenUserLong, + uint256 accumulativeFloatPerTokenUserShort, + uint256 newUserAmountStakedLong, + uint256 newUserAmountStakedShort + ) public { + latestRewardIndex[marketIndex] = newLatestRewardIndex; + userIndexOfLastClaimedReward[marketIndex][user] = usersLatestClaimedReward; + syntheticTokens[marketIndex][true] = longToken; + syntheticTokens[marketIndex][false] = shortToken; + + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][newLatestRewardIndex] + .accumulativeFloatPerSyntheticToken_long = accumulativeFloatPerTokenLatestLong; + + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][usersLatestClaimedReward] + .accumulativeFloatPerSyntheticToken_long = accumulativeFloatPerTokenUserLong; + + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][newLatestRewardIndex] + .accumulativeFloatPerSyntheticToken_short = accumulativeFloatPerTokenLatestShort; + + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][usersLatestClaimedReward] + .accumulativeFloatPerSyntheticToken_short = accumulativeFloatPerTokenUserShort; + + userAmountStaked[longToken][user] = newUserAmountStakedLong; + userAmountStaked[shortToken][user] = newUserAmountStakedShort; + } + + function setCalculateAccumulatedFloatInRangeGlobals( + uint32 marketIndex, + uint256 rewardIndexTo, + uint256 rewardIndexFrom, + uint256 syntheticRewardToLongToken, + uint256 syntheticRewardFromLongToken, + uint256 syntheticRewardToShortToken, + uint256 syntheticRewardFromShortToken + ) public { + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexTo] + .accumulativeFloatPerSyntheticToken_long = syntheticRewardToLongToken; + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexTo] + .accumulativeFloatPerSyntheticToken_short = syntheticRewardToShortToken; + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom] + .accumulativeFloatPerSyntheticToken_long = syntheticRewardFromLongToken; + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom] + .accumulativeFloatPerSyntheticToken_short = syntheticRewardFromShortToken; + } + + function setShiftParams( + uint32 marketIndex, + address user, + uint256 shiftAmountLong, + uint256 shiftAmountShort, + uint256 _userNextPrice_stakedActionIndex, + uint256 _latestRewardIndex + ) public { + userNextPrice_stakedActionIndex[marketIndex][user] = _userNextPrice_stakedActionIndex; + userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][ + user + ] = shiftAmountLong; + userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][ + user + ] = shiftAmountShort; + + latestRewardIndex[marketIndex] = _latestRewardIndex; + } + + function setShiftTokensParams( + uint32 marketIndex, + bool isShiftFromLong, + address user, + uint256 amountSyntheticTokensToShift, + uint256 _userAmountStaked, + uint256 _userNextPrice_stakedActionIndex, + uint256 _latestRewardIndex, + address syntheticToken + ) public { + userNextPrice_stakedActionIndex[marketIndex][user] = _userNextPrice_stakedActionIndex; + latestRewardIndex[marketIndex] = _latestRewardIndex; + + if (isShiftFromLong) { + userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][ + user + ] = amountSyntheticTokensToShift; + } else { + userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][ + user + ] = amountSyntheticTokensToShift; + } + + syntheticTokens[marketIndex][isShiftFromLong] = syntheticToken; + userAmountStaked[syntheticToken][user] = _userAmountStaked; + } + + function setLongShort(address _longShort) public { + longShort = _longShort; + } + + function setLatestRewardIndexGlobals(uint32 marketIndex, uint256 _latestRewardIndex) external { + latestRewardIndex[marketIndex] = _latestRewardIndex; + } + + function setGetMarketLaunchIncentiveParametersParams( + uint32 marketIndex, + uint256 period, + uint256 multiplier + ) external { + marketLaunchIncentive_period[marketIndex] = period; + marketLaunchIncentive_multipliers[marketIndex] = multiplier; + } + + function setGetKValueParams(uint32 marketIndex, uint256 timestamp) external { + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0].timestamp = timestamp; + } + + function setStakeFromUserParams( + address longshort, + address token, + uint32 marketIndexForToken, + address user, + uint256 _latestRewardIndex, + uint256 _userAmountStaked, + uint256 userLastRewardIndex + ) external { + latestRewardIndex[marketIndexForToken] = _latestRewardIndex; + userAmountStaked[token][user] = _userAmountStaked; + userIndexOfLastClaimedReward[marketIndexForToken][user] = userLastRewardIndex; + + longShort = address(longshort); + marketIndexOfToken[token] = marketIndexForToken; + } + + function setCalculateTimeDeltaParams( + uint32 marketIndex, + uint256 latestRewardIndexForMarket, + uint256 timestamp + ) external { + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][latestRewardIndexForMarket] + .timestamp = timestamp; + } + + function setCalculateNewCumulativeRateParams( + uint32 marketIndex, + uint256 latestRewardIndexForMarket, + uint256 accumFloatLong, + uint256 accumFloatShort + ) external { + latestRewardIndex[marketIndex] = latestRewardIndexForMarket; + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][latestRewardIndex[marketIndex]] + .accumulativeFloatPerSyntheticToken_long = accumFloatLong; + + accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][latestRewardIndex[marketIndex]] + .accumulativeFloatPerSyntheticToken_short = accumFloatShort; + } + + function setSetRewardObjectsParams(uint32 marketIndex, uint256 latestRewardIndexForMarket) + external + { + latestRewardIndex[marketIndex] = latestRewardIndexForMarket; + } + + function set_updateStateParams( + address _longShort, + address token, + uint32 tokenMarketIndex + ) public { + longShort = _longShort; + marketIndexOfToken[token] = tokenMarketIndex; + } + + function set_mintFloatParams(address _floatToken, uint16 _floatPercentage) public { + floatToken = _floatToken; + floatPercentage = _floatPercentage; + } + + function setMintAccumulatedFloatAndClaimFloatParams( + uint32 marketIndex, + uint256 latestRewardIndexForMarket + ) public { + latestRewardIndex[marketIndex] = latestRewardIndexForMarket; + } + + function set_withdrawGlobals( + uint32 marketIndex, + address syntheticToken, + address user, + uint256 amountStaked, + uint256 fees, + address treasury + ) external { + marketIndexOfToken[syntheticToken] = marketIndex; + marketUnstakeFee_e18[marketIndex] = fees; + userAmountStaked[syntheticToken][user] = amountStaked; + floatTreasury = treasury; + } + + function setWithdrawGlobals( + uint32 marketIndex, + address _longShort, + address token + ) external { + marketIndexOfToken[token] = marketIndex; + longShort = _longShort; + } + + function setWithdrawAllGlobals( + uint32 marketIndex, + address _longShort, + address user, + uint256 amountStaked, + address token, + uint256 _userNextPrice_stakedActionIndex, + address _syntheticTokens, + uint256 _userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_long, + uint256 _userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_short + ) external { + marketIndexOfToken[token] = marketIndex; + longShort = _longShort; + userAmountStaked[token][user] = amountStaked; + userNextPrice_stakedActionIndex[marketIndex][user] = _userNextPrice_stakedActionIndex; + syntheticTokens[marketIndex][true] = _syntheticTokens; + userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][ + user + ] = _userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_long; + userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][ + user + ] = _userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_short; + } + + function setEquilibriumOffset(uint32 marketIndex, int256 _balanceIncentiveCurve_equilibriumOffset) + external + { + balanceIncentiveCurve_equilibriumOffset[marketIndex] = _balanceIncentiveCurve_equilibriumOffset; + } + + /////////////////////////////////////////////////////// + //////////// Functions for Experimentation //////////// + /////////////////////////////////////////////////////// + + function getRequiredAmountOfBitShiftForSafeExponentiationPerfect(uint256 number, uint256 exponent) + external + pure + returns (uint256 amountOfBitShiftRequired) + { + uint256 targetMaxNumberSizeBinaryDigits = 257 / exponent; + + // Note this can be optimised, this gets a quick easy to compute safe upper bound, not the actuall upper bound. + uint256 targetMaxNumber = 2**targetMaxNumberSizeBinaryDigits; + + while (number >> amountOfBitShiftRequired > targetMaxNumber) { + ++amountOfBitShiftRequired; + } + } +} diff --git a/deploy/01_DeployContracts.js b/deploy/01_DeployContracts.js new file mode 100644 index 0000000..e69dbf5 --- /dev/null +++ b/deploy/01_DeployContracts.js @@ -0,0 +1,130 @@ +const { network } = require("hardhat"); +const { + STAKER, + COLLATERAL_TOKEN, + TREASURY, + TREASURY_ALPHA, + LONGSHORT, + FLOAT_TOKEN, + FLOAT_TOKEN_ALPHA, + TOKEN_FACTORY, + FLOAT_CAPITAL, + GEMS, + isAlphaLaunch, +} = require("../helper-hardhat-config"); +const mumbaiDaiAddress = "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F"; +const polygonDaiAddress = "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063"; + +let networkToUse = network.name; + +if (!!process.env.HARDHAT_FORK) { + networkToUse = process.env.HARDHAT_FORK; +} + +module.exports = async ({ getNamedAccounts, deployments }) => { + const { deploy } = deployments; + // const { deployer, admin } = await getNamedAccounts(); + const accounts = await ethers.getSigners(); + + const deployer = accounts[0].address; + const admin = accounts[1].address; + + let paymentTokenAddress; + + if (networkToUse != "mumbai" && networkToUse != "polygon") { + console.log(networkToUse); + let paymentToken = await deploy(COLLATERAL_TOKEN, { + from: deployer, + log: true, + args: ["dai token", "DAI"], + }); + console.log("dai address", paymentToken.address); + paymentTokenAddress = paymentToken.address; + } else if (networkToUse === "polygon") { + paymentTokenAddress = polygonDaiAddress; + } else if (networkToUse === "mumbai") { + paymentTokenAddress = mumbaiDaiAddress; + } else { + throw new Error(`network ${networkToUse} un-accounted for`); + } + + console.log("Deploying contracts with the account:", deployer); + console.log("Admin Account:", admin); + + const floatTokenToUse = isAlphaLaunch ? FLOAT_TOKEN_ALPHA : FLOAT_TOKEN; + let floatToken = await deploy(floatTokenToUse, { + from: deployer, + log: true, + proxy: { + proxyContract: "UUPSProxy", + initializer: false, + }, + }); + + await deploy(FLOAT_CAPITAL, { + from: deployer, + proxy: { + proxyContract: "UUPSProxy", + execute: { + methodName: "initialize", + args: [admin], + }, + }, + log: true, + }); + + const gems = await deploy(GEMS, { + from: deployer, + log: true, + proxy: { + proxyContract: "UUPSProxy", + initializer: false, + }, + }); + console.log("Gems", gems.address); + + const staker = await deploy(STAKER, { + from: deployer, + log: true, + proxy: { + proxyContract: "UUPSProxy", + initializer: false, + }, + }); + + const longShort = await deploy(LONGSHORT, { + from: deployer, + log: true, + proxy: { + proxyContract: "UUPSProxy", + initializer: false, + }, + }); + console.log("StakerDeployed", staker.address); + console.log("LongShortDeployed", longShort.address); + + await deploy(TOKEN_FACTORY, { + from: admin, + log: true, + args: [longShort.address], + }); + + let treasuryToUse = isAlphaLaunch ? TREASURY_ALPHA : TREASURY; + await deploy(treasuryToUse, { + from: deployer, + proxy: { + proxyContract: "UUPSProxy", + execute: { + methodName: "initialize", + args: [ + admin, + paymentTokenAddress, + floatToken.address, + longShort.address, + ], + }, + }, + log: true, + }); +}; +module.exports.tags = ["all", "contracts"]; diff --git a/deploy/02_SetupContracts.js b/deploy/02_SetupContracts.js new file mode 100644 index 0000000..bd7eebc --- /dev/null +++ b/deploy/02_SetupContracts.js @@ -0,0 +1,153 @@ +const { runTestTransactions } = require("../deployTests/RunTestTransactions"); +const { + runMumbaiTransactions, +} = require("../deployTests/RunMumbaiTransactions"); +const { + launchPolygonMarkets, +} = require("../deployTests/PolygonTransactions"); +const { ethers } = require("hardhat"); + +const { + STAKER, + COLLATERAL_TOKEN, + TREASURY, + LONGSHORT, + FLOAT_TOKEN, + TOKEN_FACTORY, + FLOAT_CAPITAL, + isAlphaLaunch, + FLOAT_TOKEN_ALPHA, + TREASURY_ALPHA, + GEMS, +} = require("../helper-hardhat-config"); + +let networkToUse = network.name; + +if (!!process.env.HARDHAT_FORK) { + networkToUse = process.env.HARDHAT_FORK; +} + +module.exports = async (hardhatDeployArguments) => { + console.log("setup contracts"); + const { getNamedAccounts, deployments } = hardhatDeployArguments; + const { deployer, admin, discountSigner } = await getNamedAccounts(); + + //////////////////////// + //Retrieve Deployments// + //////////////////////// + console.log("1"); + let paymentTokenAddress; + if (networkToUse == "polygon") { + paymentTokenAddress = "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063"; + } else if (networkToUse == "mumbai") { + paymentTokenAddress = "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F"; + } else if (networkToUse == "hardhat" || networkToUse == "ganache") { + paymentTokenAddress = (await deployments.get(COLLATERAL_TOKEN)).address; + } + const paymentToken = await ethers.getContractAt( + COLLATERAL_TOKEN, + paymentTokenAddress + ); + + const Gems = await deployments.get(GEMS); + const gems = await ethers.getContractAt(GEMS, Gems.address); + + const LongShort = await deployments.get(LONGSHORT); + const longShort = await ethers.getContractAt(LONGSHORT, LongShort.address); + + let treasuryToUse = isAlphaLaunch ? TREASURY_ALPHA : TREASURY; + const Treasury = await deployments.get(treasuryToUse); + const treasury = await ethers.getContractAt(treasuryToUse, Treasury.address); + + const TokenFactory = await deployments.get(TOKEN_FACTORY); + const tokenFactory = await ethers.getContractAt( + TOKEN_FACTORY, + TokenFactory.address + ); + + const Staker = await deployments.get(STAKER); + const staker = await ethers.getContractAt(STAKER, Staker.address); + console.log("3", longShort.address, staker.address); + + const floatTokenToUse = isAlphaLaunch ? FLOAT_TOKEN_ALPHA : FLOAT_TOKEN; + const FloatToken = await deployments.get(floatTokenToUse); + const floatToken = await ethers.getContractAt( + floatTokenToUse, + FloatToken.address + ); + console.log("4"); + + const FloatCapital = await deployments.get(FLOAT_CAPITAL); + const floatCapital = await ethers.getContractAt( + FLOAT_CAPITAL, + FloatCapital.address + ); + /////////////////////////// + //Initialize the contracts/ + /////////////////////////// + await longShort.initialize( + admin, + tokenFactory.address, + staker.address, + gems.address + ); + if (isAlphaLaunch) { + await floatToken.initialize( + "Alpha Float", + "alphaFLT", + staker.address, + treasury.address + ); + } else { + await floatToken.initialize("Float", "FLT", staker.address); + } + await staker.initialize( + admin, + longShort.address, + floatToken.address, + treasury.address, + floatCapital.address, + discountSigner, + "333333333333333333", // 25% for flt (33.333/133.333 ~= 0.25) + gems.address + ); + + await gems.initialize(admin, longShort.address, staker.address); + + if (networkToUse == "polygon") { + console.log("polygon test transactions"); + await launchPolygonMarkets( + { + staker, + longShort: longShort.connect(admin), + paymentToken, + treasury, + }, + hardhatDeployArguments + ); + } else if (networkToUse == "mumbai") { + console.log("mumbai test transactions"); + await runMumbaiTransactions( + { + staker, + longShort: longShort.connect(admin), + paymentToken, + treasury, + }, + hardhatDeployArguments + ); + } else if (networkToUse == "hardhat" || networkToUse == "ganache") { + console.log("local test transactions"); + await runTestTransactions( + { + staker, + longShort: longShort.connect(admin), + paymentToken, + treasury, + }, + hardhatDeployArguments + ); + } + console.log("after test txs"); +}; +module.exports.tags = ["all", "setup"]; diff --git a/deployTests/DeployHelpers.js b/deployTests/DeployHelpers.js new file mode 100644 index 0000000..d6d7450 --- /dev/null +++ b/deployTests/DeployHelpers.js @@ -0,0 +1,406 @@ +// Generated by ReScript, PLEASE EDIT WITH CARE +'use strict'; + +var Curry = require("rescript/lib/js/curry.js"); +var Js_exn = require("rescript/lib/js/js_exn.js"); +var LetOps = require("../test/library/LetOps.js"); +var Globals = require("../test/library/Globals.js"); +var CONSTANTS = require("../test/CONSTANTS.js"); +var Belt_Array = require("rescript/lib/js/belt_Array.js"); +var SyntheticToken = require("../test/library/contracts/SyntheticToken.js"); +var YieldManagerMock = require("../test/library/contracts/YieldManagerMock.js"); +var OracleManagerMock = require("../test/library/contracts/OracleManagerMock.js"); +var OracleManagerChainlink = require("../test/library/contracts/OracleManagerChainlink.js"); + +var minSenderBalance = Globals.bnFromString("50000000000000000"); + +var minRecieverBalance = Globals.bnFromString("20000000000000000"); + +function topupBalanceIfLow(from, to_) { + return LetOps.AwaitThen.let_(from.getBalance(), (function (senderBalance) { + if (Globals.bnLt(senderBalance, minSenderBalance)) { + Js_exn.raiseError("WARNING - Sender doesn't have enough eth - need at least 0.05 ETH! (top up to over 1 ETH to be safe)"); + } + return LetOps.Await.let_(to_.getBalance(), (function (recieverBalance) { + if (Globals.bnLt(recieverBalance, minRecieverBalance)) { + from.sendTransaction({ + to_: to_.address, + value: minRecieverBalance + }); + return ; + } + + })); + })); +} + +function updateSystemState(longShort, admin, marketIndex) { + return longShort.connect(admin).updateSystemState(marketIndex); +} + +function mintAndApprove(paymentToken, amount, user, approvedAddress) { + return LetOps.AwaitThen.let_(paymentToken.mint(user.address, amount), (function (param) { + return paymentToken.connect(user).approve(approvedAddress, amount); + })); +} + +function stakeSynthLong(amount, longShort, marketIndex, user) { + return LetOps.AwaitThen.let_(longShort.syntheticTokens(marketIndex, true), (function (longAddress) { + return LetOps.AwaitThen.let_(SyntheticToken.at(longAddress), (function (synth) { + return LetOps.Await.let_(synth.balanceOf(user.address), (function (usersSyntheticTokenBalance) { + if (Globals.bnGt(usersSyntheticTokenBalance, Globals.bnFromString("0"))) { + synth.connect(user).stake(amount); + return ; + } + + })); + })); + })); +} + +function executeOnMarkets(marketIndexes, functionToExecute) { + return Belt_Array.reduce(marketIndexes, Promise.resolve(undefined), (function (previousPromise, marketIndex) { + return LetOps.AwaitThen.let_(previousPromise, (function (param) { + return Curry._1(functionToExecute, marketIndex); + })); + })); +} + +function setOracleManagerPrice(longShort, marketIndex, admin) { + return LetOps.AwaitThen.let_(longShort.oracleManagers(marketIndex), (function (oracleManagerAddr) { + return LetOps.AwaitThen.let_(OracleManagerMock.at(oracleManagerAddr), (function (oracleManager) { + return LetOps.AwaitThen.let_(oracleManager.getLatestPrice(), (function (currentPrice) { + var nextPrice = Globals.div(Globals.mul(currentPrice, Globals.bnFromInt(101)), Globals.bnFromInt(100)); + return oracleManager.connect(admin).setPrice(nextPrice); + })); + })); + })); +} + +function redeemShortNextPriceWithSystemUpdate(amount, marketIndex, longShort, user, admin) { + return LetOps.AwaitThen.let_(longShort.connect(user).redeemShortNextPrice(marketIndex, amount), (function (param) { + return LetOps.AwaitThen.let_(setOracleManagerPrice(longShort, marketIndex, admin), (function (param) { + return updateSystemState(longShort, admin, marketIndex); + })); + })); +} + +function redeemNextPrice(amount, marketIndex, longShort, user, isLong) { + var redeemFunction = isLong ? (function (prim0, prim1, prim2) { + return prim0.redeemLongNextPrice(prim1, prim2); + }) : (function (prim0, prim1, prim2) { + return prim0.redeemShortNextPrice(prim1, prim2); + }); + return Curry._3(redeemFunction, longShort.connect(user), marketIndex, amount); +} + +function shiftFromShortNextPriceWithSystemUpdate(amount, marketIndex, longShort, user, admin) { + return LetOps.AwaitThen.let_(longShort.connect(user).shiftPositionFromShortNextPrice(marketIndex, amount), (function (param) { + return LetOps.AwaitThen.let_(setOracleManagerPrice(longShort, marketIndex, admin), (function (param) { + return longShort.connect(admin).updateSystemState(marketIndex); + })); + })); +} + +function shiftFromLongNextPriceWithSystemUpdate(amount, marketIndex, longShort, user, admin) { + return LetOps.AwaitThen.let_(longShort.connect(user).shiftPositionFromLongNextPrice(marketIndex, amount), (function (param) { + return LetOps.AwaitThen.let_(setOracleManagerPrice(longShort, marketIndex, admin), (function (param) { + return longShort.updateSystemState(marketIndex); + })); + })); +} + +function mintLongNextPriceWithSystemUpdate(amount, marketIndex, paymentToken, longShort, user, admin) { + return LetOps.AwaitThen.let_(mintAndApprove(paymentToken, amount, user, longShort.address), (function (param) { + return LetOps.AwaitThen.let_(longShort.connect(user).mintLongNextPrice(marketIndex, amount), (function (param) { + return LetOps.AwaitThen.let_(setOracleManagerPrice(longShort, marketIndex, admin), (function (param) { + return updateSystemState(longShort, admin, marketIndex); + })); + })); + })); +} + +function mintNextPrice(amount, marketIndex, paymentToken, longShort, user, isLong) { + return LetOps.AwaitThen.let_(paymentToken.connect(user).approve(longShort.address, amount), (function (param) { + var mintFunction = isLong ? (function (prim0, prim1, prim2) { + return prim0.mintLongNextPrice(prim1, prim2); + }) : (function (prim0, prim1, prim2) { + return prim0.mintShortNextPrice(prim1, prim2); + }); + return Curry._3(mintFunction, longShort.connect(user), marketIndex, amount); + })); +} + +function mintShortNextPriceWithSystemUpdate(amount, marketIndex, paymentToken, longShort, user, admin) { + return LetOps.AwaitThen.let_(mintAndApprove(paymentToken, amount, user, longShort.address), (function (param) { + return LetOps.AwaitThen.let_(longShort.connect(user).mintShortNextPrice(marketIndex, amount), (function (param) { + return LetOps.AwaitThen.let_(setOracleManagerPrice(longShort, marketIndex, admin), (function (param) { + return updateSystemState(longShort, admin, marketIndex); + })); + })); + })); +} + +function deployTestMarket(syntheticName, syntheticSymbol, longShortInstance, treasuryInstance, admin, paymentToken) { + return LetOps.AwaitThen.let_(OracleManagerMock.make(admin.address), (function (oracleManager) { + return LetOps.AwaitThen.let_(YieldManagerMock.make(longShortInstance.address, treasuryInstance.address, paymentToken.address), (function (yieldManager) { + return LetOps.AwaitThen.let_(paymentToken.MINTER_ROLE(), (function (mintRole) { + return LetOps.AwaitThen.let_(paymentToken.grantRole(mintRole, yieldManager.address), (function (param) { + return LetOps.AwaitThen.let_(longShortInstance.connect(admin).createNewSyntheticMarket(syntheticName, syntheticSymbol, paymentToken.address, oracleManager.address, yieldManager.address), (function (param) { + return LetOps.AwaitThen.let_(longShortInstance.latestMarket(), (function (latestMarket) { + var kInitialMultiplier = Globals.bnFromString("1000000000000000000"); + var kPeriod = Globals.bnFromInt(0); + return LetOps.AwaitThen.let_(mintAndApprove(paymentToken, Globals.bnFromString("2000000000000000000"), admin, longShortInstance.address), (function (param) { + var unstakeFee_e18 = Globals.bnFromString("5000000000000000"); + var initialMarketSeedForEachMarketSide = Globals.bnFromString("1000000000000000000"); + return longShortInstance.connect(admin).initializeMarket(latestMarket, kInitialMultiplier, kPeriod, unstakeFee_e18, initialMarketSeedForEachMarketSide, Globals.bnFromInt(5), Globals.bnFromInt(0), Globals.bnFromInt(1), CONSTANTS.tenToThe18); + })); + })); + })); + })); + })); + })); + })); +} + +function deployMumbaiMarket(syntheticName, syntheticSymbol, longShortInstance, treasuryInstance, admin, paymentToken, oraclePriceFeedAddress) { + return LetOps.AwaitThen.let_(OracleManagerChainlink.make(admin.address, oraclePriceFeedAddress), (function (oracleManager) { + return LetOps.AwaitThen.let_(YieldManagerMock.make(longShortInstance.address, treasuryInstance.address, paymentToken.address), (function (yieldManager) { + return LetOps.AwaitThen.let_(paymentToken.MINTER_ROLE(), (function (mintRole) { + return LetOps.AwaitThen.let_(paymentToken.grantRole(mintRole, yieldManager.address), (function (param) { + return LetOps.AwaitThen.let_(longShortInstance.connect(admin).createNewSyntheticMarket(syntheticName, syntheticSymbol, paymentToken.address, oracleManager.address, yieldManager.address), (function (param) { + return LetOps.AwaitThen.let_(longShortInstance.latestMarket(), (function (latestMarket) { + var kInitialMultiplier = Globals.bnFromString("5000000000000000000"); + var kPeriod = Globals.bnFromInt(864000); + return LetOps.AwaitThen.let_(mintAndApprove(paymentToken, Globals.bnFromString("2000000000000000000"), admin, longShortInstance.address), (function (param) { + var unstakeFee_e18 = Globals.bnFromString("5000000000000000"); + var initialMarketSeedForEachMarketSide = Globals.bnFromString("1000000000000000000"); + return longShortInstance.connect(admin).initializeMarket(latestMarket, kInitialMultiplier, kPeriod, unstakeFee_e18, initialMarketSeedForEachMarketSide, Globals.bnFromInt(5), Globals.bnFromInt(0), Globals.bnFromInt(1), CONSTANTS.tenToThe18); + })); + })); + })); + })); + })); + })); + })); +} + +function deployMumbaiMarketUpgradeable(syntheticName, syntheticSymbol, longShortInstance, stakerInstance, treasuryInstance, admin, paymentToken, oraclePriceFeedAddress, deployments, namedAccounts) { + return LetOps.AwaitThen.let_(longShortInstance.latestMarket(), (function (latestMarket) { + var newMarketIndex = latestMarket + 1 | 0; + return LetOps.AwaitThen.let_(deployments.deploy("SS" + syntheticSymbol, { + contract: "SyntheticTokenUpgradeable", + from: namedAccounts.deployer, + log: true, + proxy: { + proxyContract: "UUPSProxy", + execute: { + methodName: "initialize", + args: [ + "Float Short " + syntheticName, + "f\xe2\x86\x97\xef\xb8\x8f" + syntheticSymbol, + longShortInstance.address, + stakerInstance.address, + newMarketIndex, + false + ] + } + } + }), (function (syntheticTokenShort) { + return LetOps.AwaitThen.let_(deployments.deploy("SL" + syntheticSymbol, { + from: namedAccounts.deployer, + log: true, + contract: "SyntheticTokenUpgradeable", + proxy: { + proxyContract: "UUPSProxy", + execute: { + args: [ + "Float Long " + syntheticName, + "f\xe2\x86\x98\xef\xb8\x8f" + syntheticSymbol, + longShortInstance.address, + stakerInstance.address, + newMarketIndex, + true + ], + methodName: "initialize" + } + } + }), (function (syntheticTokenLong) { + return LetOps.AwaitThen.let_(deployments.deploy("OracleManager" + syntheticSymbol, { + from: namedAccounts.deployer, + log: true, + contract: "OracleManagerChainlinkTestnet", + args: [ + admin.address, + oraclePriceFeedAddress, + Globals.bnFromInt(27) + ] + }), (function (oracleManager) { + console.log("a.1"); + console.log("a.3"); + return LetOps.AwaitThen.let_(deployments.deploy("YieldManager" + syntheticSymbol, { + from: namedAccounts.deployer, + contract: "YieldManagerAave", + log: true, + proxy: { + proxyContract: "UUPSProxy", + execute: { + methodName: "initialize", + args: [ + longShortInstance.address, + treasuryInstance.address, + paymentToken.address, + "0x639cB7b21ee2161DF9c882483C9D55c90c20Ca3e", + "0x178113104fEcbcD7fF8669a0150721e231F0FD4B", + "0xd41aE58e803Edf4304334acCE4DC4Ec34a63C644", + 0, + admin.address + ] + } + } + }), (function (yieldManager) { + console.log("a.4"); + console.log([ + yieldManager.address, + syntheticTokenLong.address, + syntheticTokenShort.address + ]); + return LetOps.AwaitThen.let_(longShortInstance.connect(admin).createNewSyntheticMarketExternalSyntheticTokens(syntheticName, syntheticSymbol, syntheticTokenLong.address, syntheticTokenShort.address, paymentToken.address, oracleManager.address, yieldManager.address), (function (param) { + console.log("a.5"); + var kInitialMultiplier = Globals.bnFromString("5000000000000000000"); + var kPeriod = Globals.bnFromInt(864000); + console.log("a.6"); + var unstakeFee_e18 = Globals.bnFromString("5000000000000000"); + var initialMarketSeedForEachMarketSide = Globals.bnFromString("1000000000000000000"); + return LetOps.AwaitThen.let_(paymentToken.connect(admin).approve(longShortInstance.address, Globals.mul(initialMarketSeedForEachMarketSide, Globals.bnFromInt(3))), (function (param) { + console.log("a.7"); + return longShortInstance.connect(admin).initializeMarket(newMarketIndex, kInitialMultiplier, kPeriod, unstakeFee_e18, initialMarketSeedForEachMarketSide, Globals.bnFromInt(5), Globals.bnFromInt(0), Globals.bnFromInt(1), CONSTANTS.tenToThe18); + })); + })); + })); + })); + })); + })); + })); +} + +function deployFlipp3ningPolygon(longShortInstance, stakerInstance, treasuryInstance, admin, paymentToken, ethMarketCapOraclePriceFeedAddress, btcMarketCapOraclePriceFeedAddress, deployments, namedAccounts) { + var syntheticName = "Flipp3ning"; + var syntheticSymbol = "F3"; + return LetOps.AwaitThen.let_(longShortInstance.latestMarket(), (function (latestMarket) { + var newMarketIndex = latestMarket + 1 | 0; + return LetOps.AwaitThen.let_(deployments.deploy("SSF3", { + contract: "SyntheticTokenUpgradeable", + from: namedAccounts.deployer, + log: true, + proxy: { + proxyContract: "UUPSProxy", + execute: { + methodName: "initialize", + args: [ + "Float Short Flipp3ning", + "fsF3", + longShortInstance.address, + stakerInstance.address, + newMarketIndex, + false + ] + } + } + }), (function (syntheticTokenShort) { + return LetOps.AwaitThen.let_(deployments.deploy("SLF3", { + from: namedAccounts.deployer, + log: true, + contract: "SyntheticTokenUpgradeable", + proxy: { + proxyContract: "UUPSProxy", + execute: { + args: [ + "Float Long Flipp3ning", + "flF3", + longShortInstance.address, + stakerInstance.address, + newMarketIndex, + true + ], + methodName: "initialize" + } + } + }), (function (syntheticTokenLong) { + return LetOps.AwaitThen.let_(deployments.deploy("OracleManagerF3", { + from: namedAccounts.deployer, + log: true, + contract: "OracleManagerFlipp3ning", + args: [ + ethMarketCapOraclePriceFeedAddress, + btcMarketCapOraclePriceFeedAddress + ] + }), (function (oracleManager) { + console.log("a.1"); + console.log("a.3"); + return LetOps.AwaitThen.let_(deployments.deploy("YieldManagerF3", { + from: namedAccounts.deployer, + contract: "YieldManagerAave", + log: true, + proxy: { + proxyContract: "UUPSProxy", + execute: { + methodName: "initialize", + args: [ + longShortInstance.address, + treasuryInstance.address, + paymentToken.address, + "0x27F8D03b3a2196956ED754baDc28D73be8830A6e", + "0xd05e3E715d945B59290df0ae8eF85c1BdB684744", + "0x357D51124f59836DeD84c8a1730D72B749d8BC23", + 0, + admin.address + ] + } + } + }), (function (yieldManager) { + console.log("a.4"); + console.log([ + yieldManager.address, + syntheticTokenLong.address, + syntheticTokenShort.address + ]); + return LetOps.AwaitThen.let_(longShortInstance.connect(admin).createNewSyntheticMarketExternalSyntheticTokens(syntheticName, syntheticSymbol, syntheticTokenLong.address, syntheticTokenShort.address, paymentToken.address, oracleManager.address, yieldManager.address), (function (param) { + console.log("a.5"); + var kInitialMultiplier = Globals.bnFromString("2000000000000000000"); + var kPeriod = Globals.bnFromInt(5184000); + console.log("a.6"); + var unstakeFee_e18 = Globals.bnFromString("5000000000000000"); + var initialMarketSeedForEachMarketSide = Globals.bnFromString("1000000000000000000"); + return LetOps.AwaitThen.let_(paymentToken.connect(admin).approve(longShortInstance.address, Globals.mul(initialMarketSeedForEachMarketSide, Globals.bnFromInt(3))), (function (param) { + console.log("a.7"); + return longShortInstance.connect(admin).initializeMarket(newMarketIndex, kInitialMultiplier, kPeriod, unstakeFee_e18, initialMarketSeedForEachMarketSide, Globals.bnFromInt(5), Globals.bnFromInt(0), Globals.bnFromInt(1), Globals.mul(Globals.bnFromInt(3), CONSTANTS.tenToThe18)); + })); + })); + })); + })); + })); + })); + })); +} + +exports.minSenderBalance = minSenderBalance; +exports.minRecieverBalance = minRecieverBalance; +exports.topupBalanceIfLow = topupBalanceIfLow; +exports.updateSystemState = updateSystemState; +exports.mintAndApprove = mintAndApprove; +exports.stakeSynthLong = stakeSynthLong; +exports.executeOnMarkets = executeOnMarkets; +exports.setOracleManagerPrice = setOracleManagerPrice; +exports.redeemShortNextPriceWithSystemUpdate = redeemShortNextPriceWithSystemUpdate; +exports.redeemNextPrice = redeemNextPrice; +exports.shiftFromShortNextPriceWithSystemUpdate = shiftFromShortNextPriceWithSystemUpdate; +exports.shiftFromLongNextPriceWithSystemUpdate = shiftFromLongNextPriceWithSystemUpdate; +exports.mintLongNextPriceWithSystemUpdate = mintLongNextPriceWithSystemUpdate; +exports.mintNextPrice = mintNextPrice; +exports.mintShortNextPriceWithSystemUpdate = mintShortNextPriceWithSystemUpdate; +exports.deployTestMarket = deployTestMarket; +exports.deployMumbaiMarket = deployMumbaiMarket; +exports.deployMumbaiMarketUpgradeable = deployMumbaiMarketUpgradeable; +exports.deployFlipp3ningPolygon = deployFlipp3ningPolygon; +/* minSenderBalance Not a pure module */ diff --git a/deployTests/DeployHelpers.re b/deployTests/DeployHelpers.re new file mode 100644 index 0000000..e7e03ab --- /dev/null +++ b/deployTests/DeployHelpers.re @@ -0,0 +1,663 @@ +open Ethers; +open LetOps; +open Globals; + +let minSenderBalance = bnFromString("50000000000000000"); +let minRecieverBalance = bnFromString("20000000000000000"); + +let topupBalanceIfLow = (~from: Wallet.t, ~to_: Wallet.t) => { + let%AwaitThen senderBalance = from->Wallet.getBalance; + + if (senderBalance->bnLt(minSenderBalance)) { + Js.Exn.raiseError( + "WARNING - Sender doesn't have enough eth - need at least 0.05 ETH! (top up to over 1 ETH to be safe)", + ); + }; + let%Await recieverBalance = to_->Wallet.getBalance; + if (recieverBalance->bnLt(minRecieverBalance)) { + let _ = + from->Wallet.sendTransaction({ + to_: to_.address, + value: minRecieverBalance, + }); + (); + }; +}; + +let updateSystemState = (~longShort, ~admin, ~marketIndex) => { + longShort + ->ContractHelpers.connect(~address=admin) + ->LongShort.updateSystemState(~marketIndex); +}; + +let mintAndApprove = (~paymentToken, ~amount, ~user, ~approvedAddress) => { + let%AwaitThen _ = paymentToken->ERC20Mock.mint(~_to=user.address, ~amount); + + paymentToken + ->ContractHelpers.connect(~address=user) + ->ERC20Mock.approve(~spender=approvedAddress, ~amount); +}; + +let stakeSynthLong = (~amount, ~longShort, ~marketIndex, ~user) => { + let%AwaitThen longAddress = + longShort->LongShort.syntheticTokens(marketIndex, true); + let%AwaitThen synth = SyntheticToken.at(longAddress); + let%Await usersSyntheticTokenBalance = + synth->SyntheticToken.balanceOf(~account=user.address); + if (usersSyntheticTokenBalance->bnGt(bnFromString("0"))) { + let _ = + synth + ->ContractHelpers.connect(~address=user) + ->SyntheticToken.stake(~amount); + (); + }; +}; + +let executeOnMarkets = + (marketIndexes: array(int), functionToExecute: int => Js.Promise.t('a)) => { + marketIndexes->Array.reduce( + JsPromise.resolve(), + (previousPromise, marketIndex) => { + let%AwaitThen _ = previousPromise; + functionToExecute(marketIndex); + }, + ); +}; + +let setOracleManagerPrice = (~longShort, ~marketIndex, ~admin) => { + let%AwaitThen oracleManagerAddr = + longShort->LongShort.oracleManagers(marketIndex); + let%AwaitThen oracleManager = OracleManagerMock.at(oracleManagerAddr); + + let%AwaitThen currentPrice = oracleManager->OracleManagerMock.getLatestPrice; + let nextPrice = currentPrice->mul(bnFromInt(101))->div(bnFromInt(100)); + + oracleManager + ->ContractHelpers.connect(~address=admin) + ->OracleManagerMock.setPrice(~newPrice=nextPrice); +}; + +let redeemShortNextPriceWithSystemUpdate = + (~amount, ~marketIndex, ~longShort, ~user, ~admin) => { + let%AwaitThen _ = + longShort + ->ContractHelpers.connect(~address=user) + ->LongShort.redeemShortNextPrice(~marketIndex, ~tokens_redeem=amount); + let%AwaitThen _ = setOracleManagerPrice(~longShort, ~marketIndex, ~admin); + updateSystemState(~longShort, ~admin, ~marketIndex); +}; + +let redeemNextPrice = (~amount, ~marketIndex, ~longShort, ~user, ~isLong) => { + let redeemFunction = + isLong ? LongShort.redeemLongNextPrice : LongShort.redeemShortNextPrice; + longShort + ->ContractHelpers.connect(~address=user) + ->redeemFunction(~marketIndex, ~tokens_redeem=amount); +}; + +let shiftFromShortNextPriceWithSystemUpdate = + (~amount, ~marketIndex, ~longShort, ~user, ~admin) => { + let%AwaitThen _ = + longShort + ->ContractHelpers.connect(~address=user) + ->LongShort.shiftPositionFromShortNextPrice( + ~marketIndex, + ~amountSyntheticTokensToShift=amount, + ); + let%AwaitThen _ = setOracleManagerPrice(~longShort, ~marketIndex, ~admin); + longShort + ->ContractHelpers.connect(~address=admin) + ->LongShort.updateSystemState(~marketIndex); +}; +let shiftFromLongNextPriceWithSystemUpdate = + (~amount, ~marketIndex, ~longShort, ~user, ~admin) => { + let%AwaitThen _ = + longShort + ->ContractHelpers.connect(~address=user) + ->LongShort.shiftPositionFromLongNextPrice( + ~marketIndex, + ~amountSyntheticTokensToShift=amount, + ); + let%AwaitThen _ = setOracleManagerPrice(~longShort, ~marketIndex, ~admin); + longShort->LongShort.updateSystemState(~marketIndex); +}; + +let mintLongNextPriceWithSystemUpdate = + ( + ~amount, + ~marketIndex, + ~paymentToken, + ~longShort: LongShort.t, + ~user, + ~admin, + ) => { + let%AwaitThen _ = + mintAndApprove( + ~paymentToken, + ~amount, + ~user, + ~approvedAddress=longShort.address, + ); + let%AwaitThen _ = + longShort + ->ContractHelpers.connect(~address=user) + ->LongShort.mintLongNextPrice(~marketIndex, ~amount); + let%AwaitThen _ = setOracleManagerPrice(~longShort, ~marketIndex, ~admin); + updateSystemState(~longShort, ~admin, ~marketIndex); +}; + +let mintNextPrice = + ( + ~amount, + ~marketIndex, + ~paymentToken, + ~longShort: LongShort.t, + ~user, + ~isLong, + ) => { + let%AwaitThen _ = + paymentToken + ->ContractHelpers.connect(~address=user) + ->ERC20Mock.approve(~spender=longShort.address, ~amount); + + let mintFunction = + isLong ? LongShort.mintLongNextPrice : LongShort.mintShortNextPrice; + + longShort + ->ContractHelpers.connect(~address=user) + ->mintFunction(~marketIndex, ~amount); +}; + +let mintShortNextPriceWithSystemUpdate = + ( + ~amount, + ~marketIndex, + ~paymentToken, + ~longShort: LongShort.t, + ~user, + ~admin, + ) => { + let%AwaitThen _ = + mintAndApprove( + ~paymentToken, + ~amount, + ~user, + ~approvedAddress=longShort.address, + ); + let%AwaitThen _ = + longShort + ->ContractHelpers.connect(~address=user) + ->LongShort.mintShortNextPrice(~marketIndex, ~amount); + + let%AwaitThen _ = setOracleManagerPrice(~longShort, ~marketIndex, ~admin); + + updateSystemState(~longShort, ~admin, ~marketIndex); +}; + +let deployTestMarket = + ( + ~syntheticName, + ~syntheticSymbol, + ~longShortInstance: LongShort.t, + ~treasuryInstance: TreasuryAlpha.t, + ~admin, + ~paymentToken: ERC20Mock.t, + ) => { + let%AwaitThen oracleManager = OracleManagerMock.make(~admin=admin.address); + + let%AwaitThen yieldManager = + YieldManagerMock.make( + ~longShort=longShortInstance.address, + ~treasury=treasuryInstance.address, + ~token=paymentToken.address, + ); + + let%AwaitThen mintRole = paymentToken->ERC20Mock.mINTER_ROLE; + + let%AwaitThen _ = + paymentToken->ERC20Mock.grantRole( + ~role=mintRole, + ~account=yieldManager.address, + ); + + let%AwaitThen _ = + longShortInstance + ->ContractHelpers.connect(~address=admin) + ->LongShort.createNewSyntheticMarket( + ~syntheticName, + ~syntheticSymbol, + ~paymentToken=paymentToken.address, + ~oracleManager=oracleManager.address, + ~yieldManager=yieldManager.address, + ); + + let%AwaitThen latestMarket = longShortInstance->LongShort.latestMarket; + let kInitialMultiplier = bnFromString("1000000000000000000"); // 5x + let kPeriod = bnFromInt(0); // 10 days + + let%AwaitThen _ = + mintAndApprove( + ~paymentToken, + ~amount=bnFromString("2000000000000000000"), + ~user=admin, + ~approvedAddress=longShortInstance.address, + ); + + let unstakeFee_e18 = bnFromString("5000000000000000"); // 50 basis point unstake fee + let initialMarketSeedForEachMarketSide = + bnFromString("1000000000000000000"); + + longShortInstance + ->ContractHelpers.connect(~address=admin) + ->LongShort.initializeMarket( + ~marketIndex=latestMarket, + ~kInitialMultiplier, + ~kPeriod, + ~unstakeFee_e18, // 50 basis point unstake fee + ~initialMarketSeedForEachMarketSide, + ~balanceIncentiveCurve_exponent=bnFromInt(5), + ~balanceIncentiveCurve_equilibriumOffset=bnFromInt(0), + ~marketTreasurySplitGradient_e18=bnFromInt(1), + ~marketLeverage=CONSTANTS.tenToThe18, + ); +}; + +let deployMumbaiMarket = + ( + ~syntheticName, + ~syntheticSymbol, + ~longShortInstance: LongShort.t, + ~treasuryInstance: Treasury_v0.t, + ~admin, + ~paymentToken: ERC20Mock.t, + ~oraclePriceFeedAddress: Ethers.ethAddress, + ) => { + let%AwaitThen oracleManager = + OracleManagerChainlink.make( + ~admin=admin.address, + ~chainlinkOracle=oraclePriceFeedAddress, + ); + + let%AwaitThen yieldManager = + YieldManagerMock.make( + ~longShort=longShortInstance.address, + ~treasury=treasuryInstance.address, + ~token=paymentToken.address, + ); + + let%AwaitThen mintRole = paymentToken->ERC20Mock.mINTER_ROLE; + + let%AwaitThen _ = + paymentToken->ERC20Mock.grantRole( + ~role=mintRole, + ~account=yieldManager.address, + ); + + let%AwaitThen _ = + longShortInstance + ->ContractHelpers.connect(~address=admin) + ->LongShort.createNewSyntheticMarket( + ~syntheticName, + ~syntheticSymbol, + ~paymentToken=paymentToken.address, + ~oracleManager=oracleManager.address, + ~yieldManager=yieldManager.address, + ); + + let%AwaitThen latestMarket = longShortInstance->LongShort.latestMarket; + let kInitialMultiplier = bnFromString("5000000000000000000"); // 5x + let kPeriod = bnFromInt(864000); // 10 days + + let%AwaitThen _ = + mintAndApprove( + ~paymentToken, + ~amount=bnFromString("2000000000000000000"), + ~user=admin, + ~approvedAddress=longShortInstance.address, + ); + + let unstakeFee_e18 = bnFromString("5000000000000000"); // 50 basis point unstake fee + let initialMarketSeedForEachMarketSide = + bnFromString("1000000000000000000"); + + longShortInstance + ->ContractHelpers.connect(~address=admin) + ->LongShort.initializeMarket( + ~marketIndex=latestMarket, + ~kInitialMultiplier, + ~kPeriod, + ~unstakeFee_e18, // 50 basis point unstake fee + ~initialMarketSeedForEachMarketSide, + ~balanceIncentiveCurve_exponent=bnFromInt(5), + ~balanceIncentiveCurve_equilibriumOffset=bnFromInt(0), + ~marketTreasurySplitGradient_e18=bnFromInt(1), + ~marketLeverage=CONSTANTS.tenToThe18, + ); +}; + +let deployMumbaiMarketUpgradeable = + ( + ~syntheticName, + ~syntheticSymbol, + ~longShortInstance: LongShort.t, + ~stakerInstance: Staker.t, + ~treasuryInstance: Treasury_v0.t, + ~admin, + ~paymentToken: ERC20Mock.t, + ~oraclePriceFeedAddress: Ethers.ethAddress, + ~deployments: Hardhat.deployments_t, + ~namedAccounts: Hardhat.namedAccounts, + ) => { + let%AwaitThen latestMarket = longShortInstance->LongShort.latestMarket; + let newMarketIndex = latestMarket + 1; + + let%AwaitThen syntheticTokenShort = + deployments->Hardhat.deploy( + ~name="SS" ++ syntheticSymbol, + ~arguments={ + "contract": "SyntheticTokenUpgradeable", + "from": namedAccounts.deployer, + "log": true, + "proxy": { + "proxyContract": "UUPSProxy", + "execute": { + "methodName": "initialize", + "args": ( + "Float Short " ++ syntheticName, + "f↗️" ++ syntheticSymbol, + longShortInstance.address, + stakerInstance.address, + newMarketIndex, + false, + ), + }, + }, + }, + ); + let%AwaitThen syntheticTokenLong = + deployments->Hardhat.deploy( + ~name="SL" ++ syntheticSymbol, + ~arguments={ + "from": namedAccounts.deployer, + "log": true, + "contract": "SyntheticTokenUpgradeable", + "proxy": { + "proxyContract": "UUPSProxy", + "execute": { + "args": ( + "Float Long " ++ syntheticName, + "f↘️" ++ syntheticSymbol, + longShortInstance.address, + stakerInstance.address, + newMarketIndex, + true, + ), + "methodName": "initialize", + }, + }, + }, + ); + + let%AwaitThen oracleManager = + deployments->Hardhat.deploy( + ~name="OracleManager" ++ syntheticSymbol, + ~arguments={ + "from": namedAccounts.deployer, + "log": true, + "contract": "OracleManagerChainlinkTestnet", + "args": (admin.address, oraclePriceFeedAddress, bnFromInt(27)), + }, + ); + + Js.log("a.1"); + + let aavePoolAddressProviderMumbai = "0x178113104fEcbcD7fF8669a0150721e231F0FD4B"; + let mumbaiADai = "0x639cB7b21ee2161DF9c882483C9D55c90c20Ca3e"; + let mumbaiAaveIncentivesController = "0xd41aE58e803Edf4304334acCE4DC4Ec34a63C644"; + + Js.log("a.3"); + let%AwaitThen yieldManager = + deployments->Hardhat.deploy( + ~name="YieldManager" ++ syntheticSymbol, + ~arguments={ + "from": namedAccounts.deployer, + "contract": "YieldManagerAave", + "log": true, + "proxy": { + "proxyContract": "UUPSProxy", + "execute": { + "methodName": "initialize", + "args": ( + longShortInstance.address, + treasuryInstance.address, + paymentToken.address, + mumbaiADai, + aavePoolAddressProviderMumbai, + mumbaiAaveIncentivesController, + 0, + admin.address, + ), + }, + }, + }, + ); + Js.log("a.4"); + Js.log(( + yieldManager.address, + syntheticTokenLong.address, + syntheticTokenShort.address, + )); + + let%AwaitThen _ = + longShortInstance + ->ContractHelpers.connect(~address=admin) + ->LongShort.createNewSyntheticMarketExternalSyntheticTokens( + ~syntheticName, + ~syntheticSymbol, + ~longToken=syntheticTokenLong.address, + ~shortToken=syntheticTokenShort.address, + ~paymentToken=paymentToken.address, + ~oracleManager=oracleManager.address, + ~yieldManager=yieldManager.address, + ); + + Js.log("a.5"); + + let kInitialMultiplier = bnFromString("5000000000000000000"); // 5x + let kPeriod = bnFromInt(864000); // 10 days + + Js.log("a.6"); + let unstakeFee_e18 = bnFromString("5000000000000000"); // 50 basis point unstake fee + let initialMarketSeedForEachMarketSide = + bnFromString("1000000000000000000"); + + let%AwaitThen _ = + paymentToken + ->ContractHelpers.connect(~address=admin) + ->ERC20Mock.approve( + ~spender=longShortInstance.address, + ~amount=initialMarketSeedForEachMarketSide->mul(bnFromInt(3)), + ); + + Js.log("a.7"); + longShortInstance + ->ContractHelpers.connect(~address=admin) + ->LongShort.initializeMarket( + ~marketIndex=newMarketIndex, + ~kInitialMultiplier, + ~kPeriod, + ~unstakeFee_e18, // 50 basis point unstake fee + ~initialMarketSeedForEachMarketSide, + ~balanceIncentiveCurve_exponent=bnFromInt(5), + ~balanceIncentiveCurve_equilibriumOffset=bnFromInt(0), + ~marketTreasurySplitGradient_e18=bnFromInt(1), + ~marketLeverage=CONSTANTS.tenToThe18, + ); +}; +let deployFlipp3ningPolygon = + ( + ~longShortInstance: LongShort.t, + ~stakerInstance: Staker.t, + ~treasuryInstance: Treasury_v0.t, + ~admin, + ~paymentToken: ERC20Mock.t, + ~ethMarketCapOraclePriceFeedAddress: Ethers.ethAddress, + ~btcMarketCapOraclePriceFeedAddress: Ethers.ethAddress, + ~deployments: Hardhat.deployments_t, + ~namedAccounts: Hardhat.namedAccounts, + ) => { + let syntheticName = "Flipp3ning"; + let syntheticSymbol = "F3"; + + let%AwaitThen latestMarket = longShortInstance->LongShort.latestMarket; + let newMarketIndex = latestMarket + 1; + + let%AwaitThen syntheticTokenShort = + deployments->Hardhat.deploy( + ~name="SS" ++ syntheticSymbol, + ~arguments={ + "contract": "SyntheticTokenUpgradeable", + "from": namedAccounts.deployer, + "log": true, + "proxy": { + "proxyContract": "UUPSProxy", + "execute": { + "methodName": "initialize", + "args": ( + "Float Short " ++ syntheticName, + "fs" ++ syntheticSymbol, + longShortInstance.address, + stakerInstance.address, + newMarketIndex, + false, + ), + }, + }, + }, + ); + let%AwaitThen syntheticTokenLong = + deployments->Hardhat.deploy( + ~name="SL" ++ syntheticSymbol, + ~arguments={ + "from": namedAccounts.deployer, + "log": true, + "contract": "SyntheticTokenUpgradeable", + "proxy": { + "proxyContract": "UUPSProxy", + "execute": { + "args": ( + "Float Long " ++ syntheticName, + "fl" ++ syntheticSymbol, + longShortInstance.address, + stakerInstance.address, + newMarketIndex, + true, + ), + "methodName": "initialize", + }, + }, + }, + ); + + let%AwaitThen oracleManager = + deployments->Hardhat.deploy( + ~name="OracleManager" ++ syntheticSymbol, + ~arguments={ + "from": namedAccounts.deployer, + "log": true, + "contract": "OracleManagerFlipp3ning", + "args": ( + ethMarketCapOraclePriceFeedAddress, + btcMarketCapOraclePriceFeedAddress, + ), + }, + ); + + Js.log("a.1"); + + // https://polygonscan.com/address/0xd05e3E715d945B59290df0ae8eF85c1BdB684744#code + let aavePoolAddressProviderPolygon = "0xd05e3E715d945B59290df0ae8eF85c1BdB684744"; + // https://polygonscan.com/address/0x27F8D03b3a2196956ED754baDc28D73be8830A6e#code + let aDaiPolygon = "0x27F8D03b3a2196956ED754baDc28D73be8830A6e"; + // https://polygonscan.com/address/0x357D51124f59836DeD84c8a1730D72B749d8BC23#code + let aaveIncentivesControllerPolygon = "0x357D51124f59836DeD84c8a1730D72B749d8BC23"; + + Js.log("a.3"); + let%AwaitThen yieldManager = + deployments->Hardhat.deploy( + ~name="YieldManager" ++ syntheticSymbol, + ~arguments={ + "from": namedAccounts.deployer, + "contract": "YieldManagerAave", + "log": true, + "proxy": { + "proxyContract": "UUPSProxy", + "execute": { + "methodName": "initialize", + "args": ( + longShortInstance.address, + treasuryInstance.address, + paymentToken.address, + aDaiPolygon, + aavePoolAddressProviderPolygon, + aaveIncentivesControllerPolygon, + 0, + admin.address, + ), + }, + }, + }, + ); + Js.log("a.4"); + Js.log(( + yieldManager.address, + syntheticTokenLong.address, + syntheticTokenShort.address, + )); + + let%AwaitThen _ = + longShortInstance + ->ContractHelpers.connect(~address=admin) + ->LongShort.createNewSyntheticMarketExternalSyntheticTokens( + ~syntheticName, + ~syntheticSymbol, + ~longToken=syntheticTokenLong.address, + ~shortToken=syntheticTokenShort.address, + ~paymentToken=paymentToken.address, + ~oracleManager=oracleManager.address, + ~yieldManager=yieldManager.address, + ); + + Js.log("a.5"); + + let kInitialMultiplier = bnFromString("2000000000000000000"); // 5x + let kPeriod = bnFromInt(5184000); // 60 days + + Js.log("a.6"); + let unstakeFee_e18 = bnFromString("5000000000000000"); // 50 basis point unstake fee + let initialMarketSeedForEachMarketSide = + bnFromString("1000000000000000000"); + + let%AwaitThen _ = + paymentToken + ->ContractHelpers.connect(~address=admin) + ->ERC20Mock.approve( + ~spender=longShortInstance.address, + ~amount=initialMarketSeedForEachMarketSide->mul(bnFromInt(3)), + ); + + Js.log("a.7"); + longShortInstance + ->ContractHelpers.connect(~address=admin) + ->LongShort.initializeMarket( + ~marketIndex=newMarketIndex, + ~kInitialMultiplier, + ~kPeriod, + ~unstakeFee_e18, // 50 basis point unstake fee + ~initialMarketSeedForEachMarketSide, + ~balanceIncentiveCurve_exponent=bnFromInt(5), + ~balanceIncentiveCurve_equilibriumOffset=bnFromInt(0), + ~marketTreasurySplitGradient_e18=bnFromInt(1), + ~marketLeverage=bnFromInt(3)->mul(CONSTANTS.tenToThe18), + ); +}; diff --git a/deployTests/PolygonTransactions.js b/deployTests/PolygonTransactions.js new file mode 100644 index 0000000..9642cfc --- /dev/null +++ b/deployTests/PolygonTransactions.js @@ -0,0 +1,29 @@ +// Generated by ReScript, PLEASE EDIT WITH CARE +'use strict'; + +var Curry = require("rescript/lib/js/curry.js"); +var LetOps = require("../test/library/LetOps.js"); +var DeployHelpers = require("./DeployHelpers.js"); + +var ethMarketCapOraclePriceFeedAddress = ethers.utils.getAddress("0x67935f65D1577ced9f4929D3679A157E95C1c02c"); + +var btcMarketCapOraclePriceFeedAddress = ethers.utils.getAddress("0x18E4058491C3F58bC2f747A9E64cA256Ed6B318d"); + +function launchPolygonMarkets(param, deploymentArgs) { + var treasury = param.treasury; + var paymentToken = param.paymentToken; + var longShort = param.longShort; + var staker = param.staker; + return LetOps.AwaitThen.let_(Curry._1(deploymentArgs.getNamedAccounts, undefined), (function (namedAccounts) { + return LetOps.AwaitThen.let_(ethers.getSigners(), (function (loadedAccounts) { + var admin = loadedAccounts[1]; + console.log("deploying markets"); + return DeployHelpers.deployFlipp3ningPolygon(longShort, staker, treasury, admin, paymentToken, ethMarketCapOraclePriceFeedAddress, btcMarketCapOraclePriceFeedAddress, deploymentArgs.deployments, namedAccounts); + })); + })); +} + +exports.ethMarketCapOraclePriceFeedAddress = ethMarketCapOraclePriceFeedAddress; +exports.btcMarketCapOraclePriceFeedAddress = btcMarketCapOraclePriceFeedAddress; +exports.launchPolygonMarkets = launchPolygonMarkets; +/* ethMarketCapOraclePriceFeedAddress Not a pure module */ diff --git a/deployTests/PolygonTransactions.re b/deployTests/PolygonTransactions.re new file mode 100644 index 0000000..c396c44 --- /dev/null +++ b/deployTests/PolygonTransactions.re @@ -0,0 +1,41 @@ +open LetOps; +open DeployHelpers; +open Globals; + +let ethMarketCapOraclePriceFeedAddress = + "0x67935f65D1577ced9f4929D3679A157E95C1c02c"->Ethers.Utils.getAddressUnsafe; +let btcMarketCapOraclePriceFeedAddress = + "0x18E4058491C3F58bC2f747A9E64cA256Ed6B318d"->Ethers.Utils.getAddressUnsafe; + +type allContracts = { + staker: Staker.t, + longShort: LongShort.t, + paymentToken: ERC20Mock.t, + treasury: Treasury_v0.t, + syntheticToken: SyntheticToken.t, +}; + +let launchPolygonMarkets = + ( + {longShort, staker, treasury, paymentToken}, + deploymentArgs: Hardhat.hardhatDeployArgument, + ) => { + let%AwaitThen namedAccounts = deploymentArgs.getNamedAccounts(); + let%AwaitThen loadedAccounts = Ethers.getSigners(); + + let admin = loadedAccounts->Array.getUnsafe(1); + + Js.log("deploying markets"); + + deployFlipp3ningPolygon( + ~longShortInstance=longShort, + ~treasuryInstance=treasury, + ~stakerInstance=staker, + ~deployments=deploymentArgs.deployments, + ~namedAccounts, + ~admin, + ~paymentToken: ERC20Mock.t, + ~ethMarketCapOraclePriceFeedAddress, + ~btcMarketCapOraclePriceFeedAddress, + ); +}; diff --git a/deployTests/RunMumbaiTransactions.js b/deployTests/RunMumbaiTransactions.js new file mode 100644 index 0000000..d244af4 --- /dev/null +++ b/deployTests/RunMumbaiTransactions.js @@ -0,0 +1,63 @@ +// Generated by ReScript, PLEASE EDIT WITH CARE +'use strict'; + +var Curry = require("rescript/lib/js/curry.js"); +var LetOps = require("../test/library/LetOps.js"); +var Globals = require("../test/library/Globals.js"); +var DeployHelpers = require("./DeployHelpers.js"); +var ChainlinkOracleAddresses = require("./addresses/ChainlinkOracleAddresses.js"); + +function runMumbaiTransactions(param, deploymentArgs) { + var treasury = param.treasury; + var paymentToken = param.paymentToken; + var longShort = param.longShort; + var staker = param.staker; + return LetOps.AwaitThen.let_(Curry._1(deploymentArgs.getNamedAccounts, undefined), (function (namedAccounts) { + return LetOps.AwaitThen.let_(ethers.getSigners(), (function (loadedAccounts) { + var admin = loadedAccounts[1]; + var user1 = loadedAccounts[2]; + console.log("deploying markets"); + return LetOps.AwaitThen.let_(DeployHelpers.deployMumbaiMarketUpgradeable("ETH Market", "ETH", longShort, staker, treasury, admin, paymentToken, ChainlinkOracleAddresses.Mumbai.ethOracleChainlink, deploymentArgs.deployments, namedAccounts), (function (param) { + return LetOps.AwaitThen.let_(DeployHelpers.deployMumbaiMarketUpgradeable("MATIC Market", "MATIC", longShort, staker, treasury, admin, paymentToken, ChainlinkOracleAddresses.Mumbai.maticOracleChainlink, deploymentArgs.deployments, namedAccounts), (function (param) { + return LetOps.AwaitThen.let_(DeployHelpers.deployMumbaiMarketUpgradeable("BTC Market", "BTC", longShort, staker, treasury, admin, paymentToken, ChainlinkOracleAddresses.Mumbai.btcOracleChainlink, deploymentArgs.deployments, namedAccounts), (function (param) { + var initialMarkets = [ + 1, + 2, + 3 + ]; + var longMintAmount = Globals.bnFromString("10000000000000000000"); + var shortMintAmount = Globals.div(longMintAmount, Globals.bnFromInt(2)); + var redeemShortAmount = Globals.div(shortMintAmount, Globals.bnFromInt(2)); + var longStakeAmount = Globals.div(longMintAmount, Globals.twoBn); + console.log("Executing Long Mints"); + return LetOps.AwaitThen.let_(DeployHelpers.executeOnMarkets(initialMarkets, (function (__x) { + return DeployHelpers.mintNextPrice(longMintAmount, __x, paymentToken, longShort, user1, true); + })), (function (param) { + console.log("Executing Short Mints"); + return LetOps.AwaitThen.let_(DeployHelpers.executeOnMarkets(initialMarkets, (function (__x) { + return DeployHelpers.mintNextPrice(longMintAmount, __x, paymentToken, longShort, user1, false); + })), (function (param) { + return LetOps.AwaitThen.let_(Globals.sleep(27000), (function (param) { + console.log("Executing Short Position Redeem"); + return LetOps.AwaitThen.let_(DeployHelpers.executeOnMarkets(initialMarkets, (function (__x) { + return DeployHelpers.redeemNextPrice(redeemShortAmount, __x, longShort, user1, false); + })), (function (param) { + return LetOps.AwaitThen.let_(Globals.sleep(27000), (function (param) { + console.log("Staking long position"); + return DeployHelpers.executeOnMarkets(initialMarkets, (function (__x) { + return DeployHelpers.stakeSynthLong(longStakeAmount, longShort, __x, user1); + })); + })); + })); + })); + })); + })); + })); + })); + })); + })); + })); +} + +exports.runMumbaiTransactions = runMumbaiTransactions; +/* Globals Not a pure module */ diff --git a/deployTests/RunMumbaiTransactions.re b/deployTests/RunMumbaiTransactions.re new file mode 100644 index 0000000..1dc0935 --- /dev/null +++ b/deployTests/RunMumbaiTransactions.re @@ -0,0 +1,132 @@ +open LetOps; +open DeployHelpers; +open Globals; + +type allContracts = { + staker: Staker.t, + longShort: LongShort.t, + paymentToken: ERC20Mock.t, + treasury: Treasury_v0.t, + syntheticToken: SyntheticToken.t, +}; + +let runMumbaiTransactions = + ( + {longShort, staker, treasury, paymentToken}, + deploymentArgs: Hardhat.hardhatDeployArgument, + ) => { + let%AwaitThen namedAccounts = deploymentArgs.getNamedAccounts(); + let%AwaitThen loadedAccounts = Ethers.getSigners(); + + // let deployer = loadedAccounts->Array.getUnsafe(0); + let admin = loadedAccounts->Array.getUnsafe(1); + let user1 = loadedAccounts->Array.getUnsafe(2); + // let user2 = loadedAccounts->Array.getUnsafe(3); + // let user3 = loadedAccounts->Array.getUnsafe(4); + + // let%AwaitThen _ = + // DeployHelpers.topupBalanceIfLow(~from=deployer, ~to_=admin); + // let%AwaitThen _ = + // DeployHelpers.topupBalanceIfLow(~from=deployer, ~to_=user1); + // let%AwaitThen _ = + // DeployHelpers.topupBalanceIfLow(~from=deployer, ~to_=user2); + // let%AwaitThen _ = + // DeployHelpers.topupBalanceIfLow(~from=deployer, ~to_=user3); + + Js.log("deploying markets"); + + let%AwaitThen _ = + deployMumbaiMarketUpgradeable( + ~syntheticName="ETH Market", + ~syntheticSymbol="ETH", + ~longShortInstance=longShort, + ~treasuryInstance=treasury, + ~stakerInstance=staker, + ~deployments=deploymentArgs.deployments, + ~namedAccounts, + ~admin, + ~paymentToken: ERC20Mock.t, + ~oraclePriceFeedAddress=ChainlinkOracleAddresses.Mumbai.ethOracleChainlink, + ); + let%AwaitThen _ = + deployMumbaiMarketUpgradeable( + ~syntheticName="MATIC Market", + ~syntheticSymbol="MATIC", + ~longShortInstance=longShort, + ~treasuryInstance=treasury, + ~stakerInstance=staker, + ~deployments=deploymentArgs.deployments, + ~namedAccounts, + ~admin, + ~paymentToken: ERC20Mock.t, + ~oraclePriceFeedAddress=ChainlinkOracleAddresses.Mumbai.maticOracleChainlink, + ); + let%AwaitThen _ = + deployMumbaiMarketUpgradeable( + ~syntheticName="BTC Market", + ~syntheticSymbol="BTC", + ~longShortInstance=longShort, + ~treasuryInstance=treasury, + ~stakerInstance=staker, + ~deployments=deploymentArgs.deployments, + ~namedAccounts, + ~admin, + ~paymentToken: ERC20Mock.t, + ~oraclePriceFeedAddress=ChainlinkOracleAddresses.Mumbai.btcOracleChainlink, + ); + let initialMarkets = [|1, 2, 3|]; + let longMintAmount = bnFromString("10000000000000000000"); + let shortMintAmount = longMintAmount->div(bnFromInt(2)); + let redeemShortAmount = shortMintAmount->div(bnFromInt(2)); + let longStakeAmount = longMintAmount->div(twoBn); + Js.log("Executing Long Mints"); + let%AwaitThen _ = + executeOnMarkets( + initialMarkets, + mintNextPrice( + ~amount=longMintAmount, + ~marketIndex=_, + ~paymentToken, + ~longShort, + ~user=user1, + ~isLong=true, + ), + ); + Js.log("Executing Short Mints"); + let%AwaitThen _ = + executeOnMarkets( + initialMarkets, + mintNextPrice( + ~amount=longMintAmount, + ~marketIndex=_, + ~paymentToken, + ~longShort, + ~user=user1, + ~isLong=false, + ), + ); + let%AwaitThen _ = sleep(~timeMs=27000); + Js.log("Executing Short Position Redeem"); + let%AwaitThen _ = + executeOnMarkets( + initialMarkets, + redeemNextPrice( + ~amount=redeemShortAmount, + ~marketIndex=_, + ~longShort, + ~user=user1, + ~isLong=false, + ), + ); + let%AwaitThen _ = sleep(~timeMs=27000); + Js.log("Staking long position"); + executeOnMarkets( + initialMarkets, + stakeSynthLong( + ~amount=longStakeAmount, + ~longShort, + ~marketIndex=_, + ~user=user1, + ), + ); +}; diff --git a/deployTests/RunTestTransactions.js b/deployTests/RunTestTransactions.js new file mode 100644 index 0000000..41cdd6c --- /dev/null +++ b/deployTests/RunTestTransactions.js @@ -0,0 +1,91 @@ +// Generated by ReScript, PLEASE EDIT WITH CARE +'use strict'; + +var LetOps = require("../test/library/LetOps.js"); +var Globals = require("../test/library/Globals.js"); +var DeployHelpers = require("./DeployHelpers.js"); + +function runTestTransactions(param, _deploymentArgs) { + var treasury = param.treasury; + var paymentToken = param.paymentToken; + var longShort = param.longShort; + return LetOps.Await.let_(ethers.getSigners(), (function (loadedAccounts) { + var admin = loadedAccounts[1]; + var user1 = loadedAccounts[2]; + var user2 = loadedAccounts[3]; + var user3 = loadedAccounts[4]; + return LetOps.AwaitThen.let_(DeployHelpers.topupBalanceIfLow(admin, user1), (function (param) { + return LetOps.AwaitThen.let_(DeployHelpers.topupBalanceIfLow(admin, user2), (function (param) { + return LetOps.AwaitThen.let_(DeployHelpers.topupBalanceIfLow(admin, user3), (function (param) { + console.log("deploying markets"); + return LetOps.AwaitThen.let_(DeployHelpers.deployTestMarket("Eth Market", "FL_ETH", longShort, treasury, admin, paymentToken), (function (param) { + return LetOps.AwaitThen.let_(DeployHelpers.deployTestMarket("The Flippening", "FL_FLIP", longShort, treasury, admin, paymentToken), (function (param) { + return LetOps.AwaitThen.let_(DeployHelpers.deployTestMarket("Doge Market", "FL_DOGE", longShort, treasury, admin, paymentToken), (function (param) { + var initialMarkets = [ + 1, + 2, + 3 + ]; + var longMintAmount = Globals.bnFromString("10000000000000000000"); + var shortMintAmount = Globals.div(longMintAmount, Globals.bnFromInt(2)); + var redeemShortAmount = Globals.div(shortMintAmount, Globals.bnFromInt(2)); + var longStakeAmount = Globals.bnFromInt(1); + var priceAndStateUpdate = function (param) { + return LetOps.AwaitThen.let_(DeployHelpers.executeOnMarkets(initialMarkets, (function (__x) { + return DeployHelpers.setOracleManagerPrice(longShort, __x, admin); + })), (function (param) { + console.log("Executing update system state"); + return DeployHelpers.executeOnMarkets(initialMarkets, (function (__x) { + return DeployHelpers.updateSystemState(longShort, admin, __x); + })); + })); + }; + console.log("Executing Long Mints"); + return LetOps.AwaitThen.let_(DeployHelpers.executeOnMarkets(initialMarkets, (function (__x) { + return DeployHelpers.mintLongNextPriceWithSystemUpdate(longMintAmount, __x, paymentToken, longShort, user1, admin); + })), (function (param) { + console.log("Executing Short Mints"); + return LetOps.AwaitThen.let_(DeployHelpers.executeOnMarkets(initialMarkets, (function (__x) { + return DeployHelpers.mintShortNextPriceWithSystemUpdate(shortMintAmount, __x, paymentToken, longShort, user1, admin); + })), (function (param) { + console.log("Executing Short Position Redeem"); + return LetOps.AwaitThen.let_(DeployHelpers.executeOnMarkets(initialMarkets, (function (__x) { + return DeployHelpers.redeemShortNextPriceWithSystemUpdate(redeemShortAmount, __x, longShort, user1, admin); + })), (function (param) { + return LetOps.AwaitThen.let_(priceAndStateUpdate(undefined), (function (param) { + return LetOps.AwaitThen.let_(DeployHelpers.executeOnMarkets(initialMarkets, (function (__x) { + return DeployHelpers.mintLongNextPriceWithSystemUpdate(longMintAmount, __x, paymentToken, longShort, user1, admin); + })), (function (param) { + return LetOps.AwaitThen.let_(DeployHelpers.executeOnMarkets(initialMarkets, (function (__x) { + return DeployHelpers.shiftFromShortNextPriceWithSystemUpdate(redeemShortAmount, __x, longShort, user1, admin); + })), (function (param) { + return LetOps.AwaitThen.let_(priceAndStateUpdate(undefined), (function (param) { + console.log("Staking long position"); + return LetOps.AwaitThen.let_(DeployHelpers.executeOnMarkets(initialMarkets, (function (__x) { + return DeployHelpers.stakeSynthLong(longStakeAmount, longShort, __x, user1); + })), (function (param) { + return LetOps.AwaitThen.let_(priceAndStateUpdate(undefined), (function (param) { + console.log("Update treasury base price"); + return LetOps.AwaitThen.let_(treasury.connect(admin).updateBasePrice(Globals.bnFromString("300000000000000000")), (function (param) { + return Promise.resolve(undefined); + })); + })); + })); + })); + })); + })); + })); + })); + })); + })); + })); + })); + })); + })); + })); + })); + })); +} + +exports.runTestTransactions = runTestTransactions; +/* Globals Not a pure module */ diff --git a/deployTests/RunTestTransactions.re b/deployTests/RunTestTransactions.re new file mode 100644 index 0000000..8194541 --- /dev/null +++ b/deployTests/RunTestTransactions.re @@ -0,0 +1,175 @@ +open LetOps; +open DeployHelpers; +open Globals; + +type allContracts = { + staker: Staker.t, + longShort: LongShort.t, + paymentToken: ERC20Mock.t, + treasury: TreasuryAlpha.t, + syntheticToken: SyntheticToken.t, +}; + +let runTestTransactions = + ( + {longShort, treasury, paymentToken}, + _deploymentArgs: Hardhat.hardhatDeployArgument, + ) => { + let%Await loadedAccounts = Ethers.getSigners(); + + let admin = loadedAccounts->Array.getUnsafe(1); + let user1 = loadedAccounts->Array.getUnsafe(2); + let user2 = loadedAccounts->Array.getUnsafe(3); + let user3 = loadedAccounts->Array.getUnsafe(4); + + let%AwaitThen _ = DeployHelpers.topupBalanceIfLow(~from=admin, ~to_=user1); + let%AwaitThen _ = DeployHelpers.topupBalanceIfLow(~from=admin, ~to_=user2); + let%AwaitThen _ = DeployHelpers.topupBalanceIfLow(~from=admin, ~to_=user3); + + Js.log("deploying markets"); + + let%AwaitThen _ = + deployTestMarket( + ~syntheticName="Eth Market", + ~syntheticSymbol="FL_ETH", + ~longShortInstance=longShort, + ~treasuryInstance=treasury, + ~admin, + ~paymentToken: ERC20Mock.t, + ); + + let%AwaitThen _ = + deployTestMarket( + ~syntheticName="The Flippening", + ~syntheticSymbol="FL_FLIP", + ~longShortInstance=longShort, + ~treasuryInstance=treasury, + ~admin, + ~paymentToken: ERC20Mock.t, + ); + + let%AwaitThen _ = + deployTestMarket( + ~syntheticName="Doge Market", + ~syntheticSymbol="FL_DOGE", + ~longShortInstance=longShort, + ~treasuryInstance=treasury, + ~admin, + ~paymentToken: ERC20Mock.t, + ); + let initialMarkets = [|1, 2, 3|]; + + let longMintAmount = bnFromString("10000000000000000000"); + let shortMintAmount = longMintAmount->div(bnFromInt(2)); + let redeemShortAmount = shortMintAmount->div(bnFromInt(2)); + let longStakeAmount = bnFromInt(1); + + let priceAndStateUpdate = () => { + let%AwaitThen _ = + executeOnMarkets( + initialMarkets, + setOracleManagerPrice(~longShort, ~marketIndex=_, ~admin), + ); + + Js.log("Executing update system state"); + + executeOnMarkets( + initialMarkets, + updateSystemState(~longShort, ~admin, ~marketIndex=_), + ); + }; + + Js.log("Executing Long Mints"); + let%AwaitThen _ = + executeOnMarkets( + initialMarkets, + mintLongNextPriceWithSystemUpdate( + ~amount=longMintAmount, + ~marketIndex=_, + ~paymentToken, + ~longShort, + ~user=user1, + ~admin, + ), + ); + + Js.log("Executing Short Mints"); + let%AwaitThen _ = + executeOnMarkets( + initialMarkets, + mintShortNextPriceWithSystemUpdate( + ~amount=shortMintAmount, + ~marketIndex=_, + ~paymentToken, + ~longShort, + ~user=user1, + ~admin, + ), + ); + + Js.log("Executing Short Position Redeem"); + let%AwaitThen _ = + executeOnMarkets( + initialMarkets, + redeemShortNextPriceWithSystemUpdate( + ~amount=redeemShortAmount, + ~marketIndex=_, + ~longShort, + ~user=user1, + ~admin, + ), + ); + + let%AwaitThen _ = priceAndStateUpdate(); + + let%AwaitThen _ = + executeOnMarkets( + initialMarkets, + mintLongNextPriceWithSystemUpdate( + ~amount=longMintAmount, + ~marketIndex=_, + ~paymentToken, + ~longShort, + ~user=user1, + ~admin, + ), + ); + + let%AwaitThen _ = + executeOnMarkets( + initialMarkets, + shiftFromShortNextPriceWithSystemUpdate( + ~amount=redeemShortAmount, + ~marketIndex=_, + ~longShort, + ~user=user1, + ~admin, + ), + ); + + let%AwaitThen _ = priceAndStateUpdate(); + + Js.log("Staking long position"); + let%AwaitThen _ = + executeOnMarkets( + initialMarkets, + stakeSynthLong( + ~amount=longStakeAmount, + ~longShort, + ~marketIndex=_, + ~user=user1, + ), + ); + + let%AwaitThen _ = priceAndStateUpdate(); + + Js.log("Update treasury base price"); + let%AwaitThen _ = + treasury + ->ContractHelpers.connect(~address=admin) + ->TreasuryAlpha.updateBasePrice( + ~newBasePrice=bnFromString("300000000000000000"), + ); + + JsPromise.resolve(); +}; diff --git a/deployTests/addresses/ChainlinkOracleAddresses.js b/deployTests/addresses/ChainlinkOracleAddresses.js new file mode 100644 index 0000000..aca0a49 --- /dev/null +++ b/deployTests/addresses/ChainlinkOracleAddresses.js @@ -0,0 +1,18 @@ +// Generated by ReScript, PLEASE EDIT WITH CARE +'use strict'; + + +var ethOracleChainlink = ethers.utils.getAddress("0x0715A7794a1dc8e42615F059dD6e406A6594651A"); + +var maticOracleChainlink = ethers.utils.getAddress("0xd0D5e3DB44DE05E9F294BB0a3bEEaF030DE24Ada"); + +var btcOracleChainlink = ethers.utils.getAddress("0x007A22900a3B98143368Bd5906f8E17e9867581b"); + +var Mumbai = { + ethOracleChainlink: ethOracleChainlink, + maticOracleChainlink: maticOracleChainlink, + btcOracleChainlink: btcOracleChainlink +}; + +exports.Mumbai = Mumbai; +/* ethOracleChainlink Not a pure module */ diff --git a/deployTests/addresses/ChainlinkOracleAddresses.res b/deployTests/addresses/ChainlinkOracleAddresses.res new file mode 100644 index 0000000..545b63a --- /dev/null +++ b/deployTests/addresses/ChainlinkOracleAddresses.res @@ -0,0 +1,8 @@ +module Mumbai = { + let ethOracleChainlink = + "0x0715A7794a1dc8e42615F059dD6e406A6594651A"->Ethers.Utils.getAddressUnsafe + let maticOracleChainlink = + "0xd0D5e3DB44DE05E9F294BB0a3bEEaF030DE24Ada"->Ethers.Utils.getAddressUnsafe + let btcOracleChainlink = + "0x007A22900a3B98143368Bd5906f8E17e9867581b"->Ethers.Utils.getAddressUnsafe +} diff --git a/deployTests/library/Hardhat.js b/deployTests/library/Hardhat.js new file mode 100644 index 0000000..d856702 --- /dev/null +++ b/deployTests/library/Hardhat.js @@ -0,0 +1,2 @@ +// Generated by ReScript, PLEASE EDIT WITH CARE +/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ diff --git a/deployTests/library/Hardhat.res b/deployTests/library/Hardhat.res new file mode 100644 index 0000000..5b1d97f --- /dev/null +++ b/deployTests/library/Hardhat.res @@ -0,0 +1,41 @@ +type namedAccounts = { + admin: Ethers.ethAddress, + deployer: Ethers.ethAddress, + user1: Ethers.ethAddress, + user2: Ethers.ethAddress, + user3: Ethers.ethAddress, +} + +type createdDeployment = { + address: Ethers.ethAddress, + // abi, + // transactionHash, + // receipt, + // args, + // solcInputHash, + // metadata, + // bytecode, + // deployedBytecode, + // implementation, + // devdoc, + // userdoc, + // storageLayout, + // newlyDeployed +} +type deployments_t + +@send +external deploy: (deployments_t, ~name: string, ~arguments: 'a) => JsPromise.t = + "deploy" + +type contractInstance +@send +external get: (deployments_t, ~name: string) => JsPromise.t = "get" + +type hardhatDeployArgument = { + getNamedAccounts: unit => JsPromise.t, + deployments: deployments_t, +} + +@module("hardhat") @scope("ethers") +external getContractAt: (contractInstance, Ethers.ethAddress) => JsPromise.t<'a> = "getContractAt" diff --git a/deployments/mumbai/.chainId b/deployments/mumbai/.chainId new file mode 100644 index 0000000..d7e2f72 --- /dev/null +++ b/deployments/mumbai/.chainId @@ -0,0 +1 @@ +80001 \ No newline at end of file diff --git a/deployments/mumbai/AlphaTestFLT.json b/deployments/mumbai/AlphaTestFLT.json new file mode 100644 index 0000000..611f60a --- /dev/null +++ b/deployments/mumbai/AlphaTestFLT.json @@ -0,0 +1,1147 @@ +{ + "address": "0x2827c87a2FC35b0D20E414DF5358B95264aC726E", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32", + "name": "pos", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint224", + "name": "votes", + "type": "uint224" + } + ], + "internalType": "struct ERC20VotesUpgradeable.Checkpoint", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "stakerAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "treasuryAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xf29df5419472af66e7fc225c9ca079dc021fa776f939df943dc1d90287d82c20", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x2827c87a2FC35b0D20E414DF5358B95264aC726E", + "transactionIndex": 0, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000410000000000000000000000000000000000000000000000000000000020000000008000002000000000000000000000000000000000000000000000000002800000000000000000040100000000000000000000000000000000000000000000000000080000000080000000000000000000000000008000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000000004000000020000000000001000000000000000000000000008000500000000000000000000000000000080000000000000000000000000000000000000800300000", + "blockHash": "0xdf85cb2a07e0154622c4cf88ca5b5e21813d50437c162e615b9731ed94979626", + "transactionHash": "0xf29df5419472af66e7fc225c9ca079dc021fa776f939df943dc1d90287d82c20", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18868809, + "transactionHash": "0xf29df5419472af66e7fc225c9ca079dc021fa776f939df943dc1d90287d82c20", + "address": "0x2827c87a2FC35b0D20E414DF5358B95264aC726E", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000008ca4c66ca03b72fa0374fc8b32e558d6fa162411" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xdf85cb2a07e0154622c4cf88ca5b5e21813d50437c162e615b9731ed94979626" + }, + { + "transactionIndex": 0, + "blockNumber": 18868809, + "transactionHash": "0xf29df5419472af66e7fc225c9ca079dc021fa776f939df943dc1d90287d82c20", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000002a41c347bf60000000000000000000000000000000000000000000000000008d226b0e3fd42cd000000000000000000000000000000000000000000000168e4abd02f360733a300000000000000000000000000000000000000000000000008cf8294af814ccd000000000000000000000000000000000000000000000168e4ae744b6a8329a3", + "logIndex": 1, + "blockHash": "0xdf85cb2a07e0154622c4cf88ca5b5e21813d50437c162e615b9731ed94979626" + } + ], + "blockNumber": 18868809, + "cumulativeGasUsed": "247797", + "status": 1, + "byzantium": true + }, + "args": [ + "0x8cA4C66Ca03b72fA0374FC8B32E558d6fa162411", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "implementation": "0x8cA4C66Ca03b72fA0374FC8B32E558d6fa162411", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/AlphaTestFLT_Implementation.json b/deployments/mumbai/AlphaTestFLT_Implementation.json new file mode 100644 index 0000000..8fbe992 --- /dev/null +++ b/deployments/mumbai/AlphaTestFLT_Implementation.json @@ -0,0 +1,1616 @@ +{ + "address": "0x8cA4C66Ca03b72fA0374FC8B32E558d6fa162411", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32", + "name": "pos", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint224", + "name": "votes", + "type": "uint224" + } + ], + "internalType": "struct ERC20VotesUpgradeable.Checkpoint", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "stakerAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "treasuryAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x45a480beafb43b64896816cabf00ed495db5330238c915ae6b98dd4652184f30", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x8cA4C66Ca03b72fA0374FC8B32E558d6fa162411", + "transactionIndex": 2, + "gasUsed": "3151654", + "logsBloom": "0x00000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0xbbe5a5e479bf0c5ba344de158ade11def5e5635eeedb76b3d932879b7360bbd6", + "transactionHash": "0x45a480beafb43b64896816cabf00ed495db5330238c915ae6b98dd4652184f30", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 18868804, + "transactionHash": "0x45a480beafb43b64896816cabf00ed495db5330238c915ae6b98dd4652184f30", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000021973ce35ff40000000000000000000000000000000000000000000000000008f3bdedc75d36cd000000000000000000000000000000000000000000000168e47de14eb26cc7a300000000000000000000000000000000000000000000000008d226b0e3fd42cd000000000000000000000000000000000000000000000168e49f788b95ccbba3", + "logIndex": 7, + "blockHash": "0xbbe5a5e479bf0c5ba344de158ade11def5e5635eeedb76b3d932879b7360bbd6" + } + ], + "blockNumber": 18868804, + "cumulativeGasUsed": "3289648", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"pos\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint224\",\"name\":\"votes\",\"type\":\"uint224\"}],\"internalType\":\"struct ERC20VotesUpgradeable.Checkpoint\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"stakerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasuryAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"Destroys `amount` tokens from the caller. See {ERC20-_burn}.\"},\"checkpoints(address,uint32)\":{\"details\":\"Get the `pos`-th checkpoint for `account`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"delegate(address)\":{\"details\":\"Delegate votes from the sender to `delegatee`.\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Delegates votes from signer to `delegatee`\"},\"delegates(address)\":{\"details\":\"Get the address `account` is currently delegating to.\"},\"getPastTotalSupply(uint256)\":{\"details\":\"Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances. It is but NOT the sum of all the delegated votes! Requirements: - `blockNumber` must have been already mined\"},\"getPastVotes(address,uint256)\":{\"details\":\"Retrieve the number of votes for `account` at the end of `blockNumber`. Requirements: - `blockNumber` must have been already mined\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getVotes(address)\":{\"details\":\"Gets the current votes balance for `account`\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initialize(string,string,address,address)\":{\"details\":\"This function is called `initialize` to differentiate it from `initialize(string,string)` in the parent contract which should NOT be called to initialize this contract. \",\"params\":{\"name\":\"The name of the Float governance token\",\"stakerAddress\":\"The staker contract that controls minting of the token\",\"symbol\":\"The ticker representing the token\"}},\"mint(address,uint256)\":{\"details\":\"Can only be called by addresses with a MINTER_ROLE. This should correspond to the Staker contract.\",\"params\":{\"amount\":\"Amount of synthetic tokens to mint in wei.\",\"to\":\"The address for which to mint the tokens for.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"numCheckpoints(address)\":{\"details\":\"Get number of checkpoints for `account`.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"FloatToken\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize(string,string,address,address)\":{\"notice\":\"Initialize the Float Token with relevant\"},\"mint(address,uint256)\":{\"notice\":\"Mints an amount of Float tokens for an address.\"}},\"notice\":\"The Float Token is the governance token for the Float Capital protocol\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/AlphaTestFLT.sol\":\"AlphaTestFLT\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n __AccessControlEnumerable_init_unchained();\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {grantRole} to track enumerable memberships\\n */\\n function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\\n super.grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {revokeRole} to track enumerable memberships\\n */\\n function revokeRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\\n super.revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev Overload {renounceRole} to track enumerable memberships\\n */\\n function renounceRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\\n super.renounceRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev Overload {_setupRole} to track enumerable memberships\\n */\\n function _setupRole(bytes32 role, address account) internal virtual override {\\n super._setupRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2d8b1825d587f3384d6d87655f3cb66f0d71fe8dda7d98f2f9267a4bb842927d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf87bd7a150c81aad67bb354413fe55cb005e922c6e48d3580a63e32efa913c74\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x742c0fbab73bf595ca40025f6e81cb48dbd5e133950717f7befd062a925c0148\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\\n function __ERC20Burnable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC20Burnable_init_unchained();\\n }\\n\\n function __ERC20Burnable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5321bbe08dd6e82e85222024dc300d4959ff8615742ad63135759883a19e02a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../security/PausableUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev ERC20 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n */\\nabstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable {\\n function __ERC20Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n __ERC20Pausable_init_unchained();\\n }\\n\\n function __ERC20Pausable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev See {ERC20-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n require(!paused(), \\\"ERC20Pausable: token transfer while paused\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x84f8ee06b780f3294755a13a74e7d4f11599b2c42a09d920f0a191a5f3c6f2dc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"../../../utils/math/MathUpgradeable.sol\\\";\\nimport \\\"../../../utils/math/SafeCastUpgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,\\n * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.\\n *\\n * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.\\n *\\n * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either\\n * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting\\n * power can be queried through the public accessors {getVotes} and {getPastVotes}.\\n *\\n * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it\\n * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.\\n * Enabling self-delegation can easily be done by overriding the {delegates} function. Keep in mind however that this\\n * will significantly increase the base gas cost of transfers.\\n *\\n * _Available since v4.2._\\n */\\nabstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable {\\n function __ERC20Votes_init_unchained() internal initializer {\\n }\\n struct Checkpoint {\\n uint32 fromBlock;\\n uint224 votes;\\n }\\n\\n bytes32 private constant _DELEGATION_TYPEHASH =\\n keccak256(\\\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\\\");\\n\\n mapping(address => address) private _delegates;\\n mapping(address => Checkpoint[]) private _checkpoints;\\n Checkpoint[] private _totalSupplyCheckpoints;\\n\\n /**\\n * @dev Emitted when an account changes their delegate.\\n */\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n\\n /**\\n * @dev Emitted when a token transfer or delegate change results in changes to an account's voting power.\\n */\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /**\\n * @dev Get the `pos`-th checkpoint for `account`.\\n */\\n function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) {\\n return _checkpoints[account][pos];\\n }\\n\\n /**\\n * @dev Get number of checkpoints for `account`.\\n */\\n function numCheckpoints(address account) public view virtual returns (uint32) {\\n return SafeCastUpgradeable.toUint32(_checkpoints[account].length);\\n }\\n\\n /**\\n * @dev Get the address `account` is currently delegating to.\\n */\\n function delegates(address account) public view virtual returns (address) {\\n return _delegates[account];\\n }\\n\\n /**\\n * @dev Gets the current votes balance for `account`\\n */\\n function getVotes(address account) public view returns (uint256) {\\n uint256 pos = _checkpoints[account].length;\\n return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\\n }\\n\\n /**\\n * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastVotes(address account, uint256 blockNumber) public view returns (uint256) {\\n require(blockNumber < block.number, \\\"ERC20Votes: block not yet mined\\\");\\n return _checkpointsLookup(_checkpoints[account], blockNumber);\\n }\\n\\n /**\\n * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.\\n * It is but NOT the sum of all the delegated votes!\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastTotalSupply(uint256 blockNumber) public view returns (uint256) {\\n require(blockNumber < block.number, \\\"ERC20Votes: block not yet mined\\\");\\n return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);\\n }\\n\\n /**\\n * @dev Lookup a value in a list of (sorted) checkpoints.\\n */\\n function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {\\n // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.\\n //\\n // During the loop, the index of the wanted checkpoint remains in the range [low-1, high).\\n // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant.\\n // - If the middle checkpoint is after `blockNumber`, we look in [low, mid)\\n // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high)\\n // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not\\n // out of bounds (in which case we're looking too far in the past and the result is 0).\\n // Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is\\n // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out\\n // the same.\\n uint256 high = ckpts.length;\\n uint256 low = 0;\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (ckpts[mid].fromBlock > blockNumber) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n return high == 0 ? 0 : ckpts[high - 1].votes;\\n }\\n\\n /**\\n * @dev Delegate votes from the sender to `delegatee`.\\n */\\n function delegate(address delegatee) public virtual {\\n return _delegate(_msgSender(), delegatee);\\n }\\n\\n /**\\n * @dev Delegates votes from signer to `delegatee`\\n */\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual {\\n require(block.timestamp <= expiry, \\\"ERC20Votes: signature expired\\\");\\n address signer = ECDSAUpgradeable.recover(\\n _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),\\n v,\\n r,\\n s\\n );\\n require(nonce == _useNonce(signer), \\\"ERC20Votes: invalid nonce\\\");\\n return _delegate(signer, delegatee);\\n }\\n\\n /**\\n * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1).\\n */\\n function _maxSupply() internal view virtual returns (uint224) {\\n return type(uint224).max;\\n }\\n\\n /**\\n * @dev Snapshots the totalSupply after it has been increased.\\n */\\n function _mint(address account, uint256 amount) internal virtual override {\\n super._mint(account, amount);\\n require(totalSupply() <= _maxSupply(), \\\"ERC20Votes: total supply risks overflowing votes\\\");\\n\\n _writeCheckpoint(_totalSupplyCheckpoints, _add, amount);\\n }\\n\\n /**\\n * @dev Snapshots the totalSupply after it has been decreased.\\n */\\n function _burn(address account, uint256 amount) internal virtual override {\\n super._burn(account, amount);\\n\\n _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount);\\n }\\n\\n /**\\n * @dev Move voting power when tokens are transferred.\\n *\\n * Emits a {DelegateVotesChanged} event.\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._afterTokenTransfer(from, to, amount);\\n\\n _moveVotingPower(delegates(from), delegates(to), amount);\\n }\\n\\n /**\\n * @dev Change delegation for `delegator` to `delegatee`.\\n *\\n * Emits events {DelegateChanged} and {DelegateVotesChanged}.\\n */\\n function _delegate(address delegator, address delegatee) internal virtual {\\n address currentDelegate = delegates(delegator);\\n uint256 delegatorBalance = balanceOf(delegator);\\n _delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveVotingPower(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _moveVotingPower(\\n address src,\\n address dst,\\n uint256 amount\\n ) private {\\n if (src != dst && amount > 0) {\\n if (src != address(0)) {\\n (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount);\\n emit DelegateVotesChanged(src, oldWeight, newWeight);\\n }\\n\\n if (dst != address(0)) {\\n (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount);\\n emit DelegateVotesChanged(dst, oldWeight, newWeight);\\n }\\n }\\n }\\n\\n function _writeCheckpoint(\\n Checkpoint[] storage ckpts,\\n function(uint256, uint256) view returns (uint256) op,\\n uint256 delta\\n ) private returns (uint256 oldWeight, uint256 newWeight) {\\n uint256 pos = ckpts.length;\\n oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;\\n newWeight = op(oldWeight, delta);\\n\\n if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {\\n ckpts[pos - 1].votes = SafeCastUpgradeable.toUint224(newWeight);\\n } else {\\n ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(block.number), votes: SafeCastUpgradeable.toUint224(newWeight)}));\\n }\\n }\\n\\n function _add(uint256 a, uint256 b) private pure returns (uint256) {\\n return a + b;\\n }\\n\\n function _subtract(uint256 a, uint256 b) private pure returns (uint256) {\\n return a - b;\\n }\\n uint256[47] private __gap;\\n}\\n\",\"keccak256\":\"0xb0a5a6f23ddf9a8583e86a0831e3f8b28df6d24a316ea1c9b37a3bded254a950\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation 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 *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal initializer {\\n __Context_init_unchained();\\n __EIP712_init_unchained(name, \\\"1\\\");\\n __ERC20Permit_init_unchained(name);\\n }\\n\\n function __ERC20Permit_init_unchained(string memory name) internal initializer {\\n _PERMIT_TYPEHASH = keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\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 ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xf07c1013d0ecf7a80ff5bf8f59105fc0acc5bf83aa4196b409d9ac3666d37cc6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e321ee7110594e92c1c834d7de2fbdfd01fbed6c06127fe75c5836fe80a24a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"../extensions/ERC20PausableUpgradeable.sol\\\";\\nimport \\\"../../../access/AccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev {ERC20} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n */\\ncontract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlEnumerableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable {\\n function initialize(string memory name, string memory symbol) public virtual initializer {\\n __ERC20PresetMinterPauser_init(name, symbol);\\n }\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\n * account that deploys the contract.\\n *\\n * See {ERC20-constructor}.\\n */\\n function __ERC20PresetMinterPauser_init(string memory name, string memory symbol) internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n __AccessControlEnumerable_init_unchained();\\n __ERC20_init_unchained(name, symbol);\\n __ERC20Burnable_init_unchained();\\n __Pausable_init_unchained();\\n __ERC20Pausable_init_unchained();\\n __ERC20PresetMinterPauser_init_unchained(name, symbol);\\n }\\n\\n function __ERC20PresetMinterPauser_init_unchained(string memory name, string memory symbol) internal initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n }\\n\\n /**\\n * @dev Creates `amount` new tokens for `to`.\\n *\\n * See {ERC20-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(address to, uint256 amount) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC20PresetMinterPauser: must have minter role to mint\\\");\\n _mint(to, amount);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC20Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC20PresetMinterPauser: must have pauser role to pause\\\");\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC20Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC20PresetMinterPauser: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override(ERC20Upgradeable, ERC20PausableUpgradeable) {\\n super._beforeTokenTransfer(from, to, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xdf3ba47b3559c6760157d0ec93be6d3aec6b5eb785b85acb20ac2bb0cb003b74\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x00c96e792d367a436015f12ce2665aa8e2a0d61d2c6045a82cbb37da20e5a042\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x07411372282794f7ecde69a1065e5d20441abe7c9f8861437b4d45c9a4712fa6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal initializer {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal initializer {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x30f3940c119b4d93578bac394f43ee9b0b8465ea1e60b316244183be2983a5ed\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\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 / b + (a % b == 0 ? 0 : 1);\\n }\\n}\\n\",\"keccak256\":\"0xd10ce93bb60b3d8ad10fffca3d35594eba4a58e6c76a7ad96d184c326f88d9ac\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCastUpgradeable {\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= type(int128).min && value <= type(int128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= type(int64).min && value <= type(int64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= type(int32).min && value <= type(int32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= type(int16).min && value <= type(int16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= type(int8).min && value <= type(int8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0xb92541cd02568981bc3dac94060d542ab3231d8f30ade82aeba0588761c1b649\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9dc1ad66ada6a503bef1ffde62ac688c58eac660fe50c054f6e49e3b27ae295d\",\"license\":\"MIT\"},\"contracts/AlphaTestFLT.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\\\";\\n\\nimport \\\"./interfaces/IFloatToken.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\n/**\\n @title FloatToken\\n @notice The Float Token is the governance token for the Float Capital protocol\\n */\\ncontract AlphaTestFLT is\\n IFloatToken,\\n Initializable,\\n ERC20Upgradeable,\\n ERC20BurnableUpgradeable,\\n PausableUpgradeable,\\n AccessControlUpgradeable,\\n ERC20PermitUpgradeable,\\n ERC20VotesUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n\\n address public treasury;\\n\\n /**\\n @notice Initialize the Float Token with relevant\\n @dev This function is called `initialize` to differentiate it from `initialize(string,string)` in the parent contract which should NOT be called to initialize this contract. \\n @param name The name of the Float governance token\\n @param symbol The ticker representing the token\\n @param stakerAddress The staker contract that controls minting of the token\\n */\\n function initialize(\\n string calldata name,\\n string calldata symbol,\\n address stakerAddress,\\n address treasuryAddress\\n ) external initializer {\\n __ERC20_init(name, symbol);\\n __ERC20Burnable_init();\\n __Pausable_init();\\n __AccessControl_init();\\n __ERC20Permit_init(name);\\n __UUPSUpgradeable_init();\\n\\n treasury = treasuryAddress;\\n\\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n renounceRole(MINTER_ROLE, msg.sender);\\n renounceRole(PAUSER_ROLE, msg.sender);\\n\\n _setupRole(DEFAULT_ADMIN_ROLE, stakerAddress);\\n _setupRole(MINTER_ROLE, stakerAddress);\\n _setupRole(PAUSER_ROLE, stakerAddress);\\n\\n _setupRole(UPGRADER_ROLE, msg.sender);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 FUNCTIONS INHERITED BY ERC20PresetMinterPauserUpgradeable \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /** \\n @notice Mints an amount of Float tokens for an address.\\n @dev Can only be called by addresses with a MINTER_ROLE. \\n This should correspond to the Staker contract.\\n @param to The address for which to mint the tokens for.\\n @param amount Amount of synthetic tokens to mint in wei.\\n */\\n function mint(address to, uint256 amount) external override(IFloatToken) onlyRole(MINTER_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /**\\n @notice modify token functionality so that a pausing this token doesn't affect minting\\n @dev Pause functionality in the open zeppelin ERC20PresetMinterPauserUpgradeable comes from the below function.\\n We override it to exclude anyone with the minter role (ie the Staker contract)\\n @param from address tokens are being sent from\\n @param to address tokens are being sent to\\n @param amount amount of tokens being sent\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n require(!paused() || hasRole(MINTER_ROLE, _msgSender()), \\\"Paused and not minter\\\");\\n\\n super._beforeTokenTransfer(from, to, amount);\\n }\\n\\n function pause() external onlyRole(PAUSER_ROLE) {\\n _pause();\\n }\\n\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\\n\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) {\\n super._afterTokenTransfer(from, to, amount);\\n }\\n\\n function _mint(address to, uint256 amount)\\n internal\\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\\n {\\n super._mint(to, amount);\\n }\\n\\n function _burn(address account, uint256 amount)\\n internal\\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\\n {\\n super._burn(account, amount);\\n }\\n\\n function totalSupply()\\n public\\n view\\n virtual\\n override(ERC20Upgradeable, IFloatToken)\\n returns (uint256)\\n {\\n return ERC20Upgradeable.totalSupply();\\n }\\n\\n function transfer(address recipient, uint256 amount)\\n public\\n virtual\\n override(ERC20Upgradeable, IFloatToken)\\n returns (bool)\\n {\\n return ERC20Upgradeable.transfer(recipient, amount);\\n }\\n\\n function burnFrom(address account, uint256 amount)\\n public\\n virtual\\n override(ERC20BurnableUpgradeable, IFloatToken)\\n {\\n // If the burn comes from the treasury, let it happen automatically.\\n // This is only for the alpha launch, no need to add these permissions to the main FLT deployment.\\n if (msg.sender == treasury) {\\n _burn(account, amount);\\n } else {\\n ERC20BurnableUpgradeable.burnFrom(account, amount);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x26b698bc02f6ba8927e62c29b1249fa607471ef7d88036ab36823099436dfb6a\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IFloatToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IFloatToken {\\n function mint(address to, uint256 amount) external;\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function burnFrom(address account, uint256 amount) external virtual;\\n}\\n\",\"keccak256\":\"0xdec0736a73d0855ee353797430e196f9be074ccd728209e28e881ffa24d76e5d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061380f806100206000396000f3fe6080604052600436106102515760003560e01c80636fcfff4511610139578063a217fddf116100b6578063d53913931161007a578063d539139314610710578063d547741f14610732578063dd62ed3e14610752578063e63ab1e914610798578063f1127ed8146107ba578063f72c0d8b1461080457610251565b8063a217fddf1461067b578063a457c2d714610690578063a9059cbb146106b0578063c3cda520146106d0578063d505accf146106f057610251565b80638e539e8c116100fd5780638e539e8c146105e65780638f15b4141461060657806391d148541461062657806395d89b41146106465780639ab24eb01461065b57610251565b80636fcfff451461052657806370a082311461055b57806379cc6790146105915780637ecebe00146105b15780638456cb59146105d157610251565b80633659cfe6116101d257806342966c681161019657806342966c68146104485780634f1ef28614610468578063587cde1e1461047b5780635c19a95c146104cd5780635c975abb146104ed57806361d027b31461050557610251565b80633659cfe6146103b357806339509351146103d35780633a46b1a8146103f35780633f4ba83a1461041357806340c10f191461042857610251565b8063248a9ca311610219578063248a9ca3146103105780632f2ff15d14610340578063313ce567146103625780633644e5151461037e57806336568abe1461039357610251565b806301ffc9a71461025657806306fdde031461028b578063095ea7b3146102ad57806318160ddd146102cd57806323b872dd146102f0575b600080fd5b34801561026257600080fd5b50610276610271366004613499565b610838565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a0610871565b60405161028291906135df565b3480156102b957600080fd5b506102766102c83660046133a1565b610903565b3480156102d957600080fd5b506102e2610919565b604051908152602001610282565b3480156102fc57600080fd5b5061027661030b366004613240565b610929565b34801561031c57600080fd5b506102e261032b36600461345f565b600090815260fb602052604090206001015490565b34801561034c57600080fd5b5061036061035b366004613477565b6109da565b005b34801561036e57600080fd5b5060405160128152602001610282565b34801561038a57600080fd5b506102e2610a06565b34801561039f57600080fd5b506103606103ae366004613477565b610a10565b3480156103bf57600080fd5b506103606103ce3660046131f4565b610a8e565b3480156103df57600080fd5b506102766103ee3660046133a1565b610ab5565b3480156103ff57600080fd5b506102e261040e3660046133a1565b610af1565b34801561041f57600080fd5b50610360610b65565b34801561043457600080fd5b506103606104433660046133a1565b610b86565b34801561045457600080fd5b5061036061046336600461345f565b610ba9565b6103606104763660046132e4565b610bb3565b34801561048757600080fd5b506104b56104963660046131f4565b6001600160a01b03908116600090815261019460205260409020541690565b6040516001600160a01b039091168152602001610282565b3480156104d957600080fd5b506103606104e83660046131f4565b610bc8565b3480156104f957600080fd5b5060975460ff16610276565b34801561051157600080fd5b5061022a546104b5906001600160a01b031681565b34801561053257600080fd5b506105466105413660046131f4565b610bd2565b60405163ffffffff9091168152602001610282565b34801561056757600080fd5b506102e26105763660046131f4565b6001600160a01b031660009081526033602052604090205490565b34801561059d57600080fd5b506103606105ac3660046133a1565b610bf5565b3480156105bd57600080fd5b506102e26105cc3660046131f4565b610c22565b3480156105dd57600080fd5b50610360610c41565b3480156105f257600080fd5b506102e261060136600461345f565b610c62565b34801561061257600080fd5b506103606106213660046134c1565b610cbf565b34801561063257600080fd5b50610276610641366004613477565b610ebf565b34801561065257600080fd5b506102a0610eea565b34801561066757600080fd5b506102e26106763660046131f4565b610ef9565b34801561068757600080fd5b506102e2600081565b34801561069c57600080fd5b506102766106ab3660046133a1565b610f90565b3480156106bc57600080fd5b506102766106cb3660046133a1565b611029565b3480156106dc57600080fd5b506103606106eb3660046133ca565b611035565b3480156106fc57600080fd5b5061036061070b36600461327b565b611162565b34801561071c57600080fd5b506102e26000805160206137ba83398151915281565b34801561073e57600080fd5b5061036061074d366004613477565b6112a9565b34801561075e57600080fd5b506102e261076d36600461320e565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b3480156107a457600080fd5b506102e260008051602061377383398151915281565b3480156107c657600080fd5b506107da6107d5366004613421565b6112cf565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610282565b34801561081057600080fd5b506102e27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b148061086957506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60606036805461088090613711565b80601f01602080910402602001604051908101604052809291908181526020018280546108ac90613711565b80156108f95780601f106108ce576101008083540402835291602001916108f9565b820191906000526020600020905b8154815290600101906020018083116108dc57829003601f168201915b5050505050905090565b6000610910338484611362565b50600192915050565b600061092460355490565b905090565b6000610936848484611486565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156109c05760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6109cd8533858403611362565b60019150505b9392505050565b600082815260fb60205260409020600101546109f781335b61166b565b610a0183836116cf565b505050565b6000610924611755565b6001600160a01b0381163314610a805760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016109b7565b610a8a82826117d2565b5050565b610a9781611839565b610ab281604051806020016040528060008152506000611864565b50565b3360008181526034602090815260408083206001600160a01b03871684529091528120549091610910918590610aec908690613660565b611362565b6000438210610b425760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064016109b7565b6001600160a01b0383166000908152610195602052604090206109d390836119ec565b600080516020613773833981519152610b7e81336109f2565b610ab2611ac5565b6000805160206137ba833981519152610b9f81336109f2565b610a018383611b58565b610ab23382611b62565b610bbc82611839565b610a8a82826001611864565b610ab23382611b6c565b6001600160a01b0381166000908152610195602052604081205461086990611be7565b61022a546001600160a01b0316331415610c1857610c138282611b62565b610a8a565b610a8a8282611c50565b6001600160a01b03811660009081526101616020526040812054610869565b600080516020613773833981519152610c5a81336109f2565b610ab2611cd1565b6000438210610cb35760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064016109b7565b610869610196836119ec565b600054610100900460ff1680610cd8575060005460ff16155b610cf45760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015610d16576000805461ffff19166101011790555b610d8987878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250611d4c92505050565b610d91611dcb565b610d99611e46565b610da1611ead565b610de087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611f0c92505050565b610de8611dcb565b61022a80546001600160a01b0319166001600160a01b038416179055610e0f600033610a10565b610e276000805160206137ba83398151915233610a10565b610e3f60008051602061377383398151915233610a10565b610e4a600084611fac565b610e626000805160206137ba83398151915284611fac565b610e7a60008051602061377383398151915284611fac565b610ea47f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611fac565b8015610eb6576000805461ff00191690555b50505050505050565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606037805461088090613711565b6001600160a01b038116600090815261019560205260408120548015610f7d576001600160a01b038316600090815261019560205260409020610f3d6001836136b7565b81548110610f5b57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316610f80565b60005b6001600160e01b03169392505050565b3360009081526034602090815260408083206001600160a01b0386168452909152812054828110156110125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016109b7565b61101f3385858403611362565b5060019392505050565b60006109d38383611fb6565b834211156110855760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e6174757265206578706972656400000060448201526064016109b7565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906110ff906110f79060a00160405160208183030381529060405280519060200120611fc3565b858585612011565b905061110a81612039565b86146111585760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e63650000000000000060448201526064016109b7565b610eb68188611b6c565b834211156111b25760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016109b7565b6000610162548888886111c48c612039565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061121f82611fc3565b9050600061122f82878787612011565b9050896001600160a01b0316816001600160a01b0316146112925760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016109b7565b61129d8a8a8a611362565b50505050505050505050565b600082815260fb60205260409020600101546112c581336109f2565b610a0183836117d2565b60408051808201909152600080825260208201526001600160a01b038316600090815261019560205260409020805463ffffffff841690811061132257634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b6001600160a01b0383166113c45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016109b7565b6001600160a01b0382166114255760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016109b7565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166114ea5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016109b7565b6001600160a01b03821661154c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016109b7565b611557838383612062565b6001600160a01b038316600090815260336020526040902054818110156115cf5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016109b7565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290611606908490613660565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161165291815260200190565b60405180910390a36116658484846120d0565b50505050565b6116758282610ebf565b610a8a5761168d816001600160a01b031660146120db565b6116988360206120db565b6040516020016116a992919061356a565b60408051601f198184030181529082905262461bcd60e51b82526109b7916004016135df565b6116d98282610ebf565b610a8a57600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff191660011790556117113390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006109247f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61178561012d5490565b61012e546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6117dc8282610ebf565b15610a8a57600082815260fb602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610a8a81336109f2565b60006118977f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506118a2846122bd565b6000835111806118af5750815b156118c0576118be8484612362565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff166119e557805460ff191660011781556040516001600160a01b038316602482015261193f90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052612362565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146119dc5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016109b7565b6119e58561244d565b5050505050565b8154600090815b81811015611a5e576000611a07828461248d565b905084868281548110611a2a57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff161115611a4a57809250611a58565b611a55816001613660565b91505b506119f3565b8115611ab05784611a706001846136b7565b81548110611a8e57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316611ab3565b60005b6001600160e01b031695945050505050565b60975460ff16611b0e5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109b7565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610a8a82826124a8565b610a8a8282612538565b6001600160a01b0382811660008181526101946020818152604080842080546033845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611665828483612551565b600063ffffffff821115611c4c5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b60648201526084016109b7565b5090565b6000611c5c833361076d565b905081811015611cba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b60648201526084016109b7565b611cc78333848403611362565b610a018383611b62565b60975460ff1615611d175760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109b7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b3b3390565b600054610100900460ff1680611d65575060005460ff16155b611d815760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015611da3576000805461ffff19166101011790555b611dab612690565b611db583836126fa565b8015610a01576000805461ff0019169055505050565b600054610100900460ff1680611de4575060005460ff16155b611e005760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015611e22576000805461ffff19166101011790555b611e2a612690565b611e32612690565b8015610ab2576000805461ff001916905550565b600054610100900460ff1680611e5f575060005460ff16155b611e7b5760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015611e9d576000805461ffff19166101011790555b611ea5612690565b611e3261278f565b600054610100900460ff1680611ec6575060005460ff16155b611ee25760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015611f04576000805461ffff19166101011790555b611e22612690565b600054610100900460ff1680611f25575060005460ff16155b611f415760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015611f63576000805461ffff19166101011790555b611f6b612690565b611f8e82604051806040016040528060018152602001603160f81b815250612804565b611f9782612890565b8015610a8a576000805461ff00191690555050565b610a8a82826116cf565b6000610910338484611486565b6000610869611fd0611755565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061202287878787612921565b9150915061202f81612a0e565b5095945050505050565b6001600160a01b0381166000908152610161602052604090208054600181018255905b50919050565b60975460ff16158061208757506120876000805160206137ba83398151915233610641565b6120cb5760405162461bcd60e51b81526020600482015260156024820152742830bab9b2b21030b732103737ba1036b4b73a32b960591b60448201526064016109b7565b610a01565b610a01838383612c11565b606060006120ea836002613698565b6120f5906002613660565b67ffffffffffffffff81111561211b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612145576020820181803683370190505b509050600360fc1b8160008151811061216e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106121ab57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006121cf846002613698565b6121da906001613660565b90505b600181111561226e576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061221c57634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061224057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93612267816136fa565b90506121dd565b5083156109d35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109b7565b803b6123215760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016109b7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6123c15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016109b7565b600080846001600160a01b0316846040516123dc919061354e565b600060405180830381855af49150503d8060008114612417576040519150601f19603f3d011682016040523d82523d6000602084013e61241c565b606091505b5091509150612444828260405180606001604052806027815260200161379360279139612c44565b95945050505050565b612456816122bd565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600061249c6002848418613678565b6109d390848416613660565b6124b28282612c7d565b6001600160e01b036124c2610919565b11156125295760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b60648201526084016109b7565b611665610196612d7083612d7c565b6125428282612f1f565b61166561019661308083612d7c565b816001600160a01b0316836001600160a01b0316141580156125735750600081115b15610a01576001600160a01b03831615612602576001600160a01b03831660009081526101956020526040812081906125af9061308085612d7c565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516125f7929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615610a01576001600160a01b038216600090815261019560205260408120819061263990612d7085612d7c565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612681929190918252602082015260400190565b60405180910390a25050505050565b600054610100900460ff16806126a9575060005460ff16155b6126c55760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015611e32576000805461ffff19166101011790558015610ab2576000805461ff001916905550565b600054610100900460ff1680612713575060005460ff16155b61272f5760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015612751576000805461ffff19166101011790555b82516127649060369060208601906130f5565b5081516127789060379060208501906130f5565b508015610a01576000805461ff0019169055505050565b600054610100900460ff16806127a8575060005460ff16155b6127c45760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff161580156127e6576000805461ffff19166101011790555b6097805460ff191690558015610ab2576000805461ff001916905550565b600054610100900460ff168061281d575060005460ff16155b6128395760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff1615801561285b576000805461ffff19166101011790555b825160208085019190912083519184019190912061012d9190915561012e558015610a01576000805461ff0019169055505050565b600054610100900460ff16806128a9575060005460ff16155b6128c55760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff161580156128e7576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610162558015610a8a576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156129585750600090506003612a05565b8460ff16601b1415801561297057508460ff16601c14155b156129815750600090506004612a05565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156129d5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129fe57600060019250925050612a05565b9150600090505b94509492505050565b6000816004811115612a3057634e487b7160e01b600052602160045260246000fd5b1415612a3b57610ab2565b6001816004811115612a5d57634e487b7160e01b600052602160045260246000fd5b1415612aab5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109b7565b6002816004811115612acd57634e487b7160e01b600052602160045260246000fd5b1415612b1b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109b7565b6003816004811115612b3d57634e487b7160e01b600052602160045260246000fd5b1415612b965760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109b7565b6004816004811115612bb857634e487b7160e01b600052602160045260246000fd5b1415610ab25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109b7565b6001600160a01b0383811660009081526101946020526040808220548584168352912054610a0192918216911683612551565b60608315612c535750816109d3565b825115612c635782518084602001fd5b8160405162461bcd60e51b81526004016109b791906135df565b6001600160a01b038216612cd35760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016109b7565b612cdf60008383612062565b8060356000828254612cf19190613660565b90915550506001600160a01b03821660009081526033602052604081208054839290612d1e908490613660565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610a8a600083836120d0565b60006109d38284613660565b825460009081908015612dd55785612d956001836136b7565b81548110612db357634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316612dd8565b60005b6001600160e01b03169250612df183858763ffffffff16565b9150600081118015612e3d57504386612e0b6001846136b7565b81548110612e2957634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff16145b15612eab57612e4b8261308c565b86612e576001846136b7565b81548110612e7557634e487b7160e01b600052603260045260246000fd5b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b03160217905550612f16565b856040518060400160405280612ec043611be7565b63ffffffff168152602001612ed48561308c565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b50935093915050565b6001600160a01b038216612f7f5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016109b7565b612f8b82600083612062565b6001600160a01b03821660009081526033602052604090205481811015612fff5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016109b7565b6001600160a01b038316600090815260336020526040812083830390556035805484929061302e9084906136b7565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610a01836000846120d0565b60006109d382846136b7565b60006001600160e01b03821115611c4c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b60648201526084016109b7565b82805461310190613711565b90600052602060002090601f0160209004810192826131235760008555613169565b82601f1061313c57805160ff1916838001178555613169565b82800160010185558215613169579182015b8281111561316957825182559160200191906001019061314e565b50611c4c9291505b80821115611c4c5760008155600101613171565b80356001600160a01b038116811461086c57600080fd5b60008083601f8401126131ad578182fd5b50813567ffffffffffffffff8111156131c4578182fd5b6020830191508360208285010111156131dc57600080fd5b9250929050565b803560ff8116811461086c57600080fd5b600060208284031215613205578081fd5b6109d382613185565b60008060408385031215613220578081fd5b61322983613185565b915061323760208401613185565b90509250929050565b600080600060608486031215613254578081fd5b61325d84613185565b925061326b60208501613185565b9150604084013590509250925092565b600080600080600080600060e0888a031215613295578283fd5b61329e88613185565b96506132ac60208901613185565b955060408801359450606088013593506132c8608089016131e3565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156132f6578182fd5b6132ff83613185565b9150602083013567ffffffffffffffff8082111561331b578283fd5b818501915085601f83011261332e578283fd5b8135818111156133405761334061375c565b604051601f8201601f19908116603f011681019083821181831017156133685761336861375c565b81604052828152886020848701011115613380578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600080604083850312156133b3578182fd5b6133bc83613185565b946020939093013593505050565b60008060008060008060c087890312156133e2578182fd5b6133eb87613185565b95506020870135945060408701359350613407606088016131e3565b92506080870135915060a087013590509295509295509295565b60008060408385031215613433578182fd5b61343c83613185565b9150602083013563ffffffff81168114613454578182fd5b809150509250929050565b600060208284031215613470578081fd5b5035919050565b60008060408385031215613489578182fd5b8235915061323760208401613185565b6000602082840312156134aa578081fd5b81356001600160e01b0319811681146109d3578182fd5b600080600080600080608087890312156134d9578182fd5b863567ffffffffffffffff808211156134f0578384fd5b6134fc8a838b0161319c565b90985096506020890135915080821115613514578384fd5b5061352189828a0161319c565b9095509350613534905060408801613185565b915061354260608801613185565b90509295509295509295565b600082516135608184602087016136ce565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516135a28160178501602088016136ce565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516135d38160288401602088016136ce565b01602801949350505050565b60006020825282518060208401526135fe8160408501602087016136ce565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561367357613673613746565b500190565b60008261369357634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156136b2576136b2613746565b500290565b6000828210156136c9576136c9613746565b500390565b60005b838110156136e95781810151838201526020016136d1565b838111156116655750506000910152565b60008161370957613709613746565b506000190190565b600181811c9082168061372557607f821691505b6020821081141561205c57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a26469706673582212203bfc12096307f01a458c12dfe8df26fd0aab6ddb91bc6c6277ab2630a746650d64736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106102515760003560e01c80636fcfff4511610139578063a217fddf116100b6578063d53913931161007a578063d539139314610710578063d547741f14610732578063dd62ed3e14610752578063e63ab1e914610798578063f1127ed8146107ba578063f72c0d8b1461080457610251565b8063a217fddf1461067b578063a457c2d714610690578063a9059cbb146106b0578063c3cda520146106d0578063d505accf146106f057610251565b80638e539e8c116100fd5780638e539e8c146105e65780638f15b4141461060657806391d148541461062657806395d89b41146106465780639ab24eb01461065b57610251565b80636fcfff451461052657806370a082311461055b57806379cc6790146105915780637ecebe00146105b15780638456cb59146105d157610251565b80633659cfe6116101d257806342966c681161019657806342966c68146104485780634f1ef28614610468578063587cde1e1461047b5780635c19a95c146104cd5780635c975abb146104ed57806361d027b31461050557610251565b80633659cfe6146103b357806339509351146103d35780633a46b1a8146103f35780633f4ba83a1461041357806340c10f191461042857610251565b8063248a9ca311610219578063248a9ca3146103105780632f2ff15d14610340578063313ce567146103625780633644e5151461037e57806336568abe1461039357610251565b806301ffc9a71461025657806306fdde031461028b578063095ea7b3146102ad57806318160ddd146102cd57806323b872dd146102f0575b600080fd5b34801561026257600080fd5b50610276610271366004613499565b610838565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a0610871565b60405161028291906135df565b3480156102b957600080fd5b506102766102c83660046133a1565b610903565b3480156102d957600080fd5b506102e2610919565b604051908152602001610282565b3480156102fc57600080fd5b5061027661030b366004613240565b610929565b34801561031c57600080fd5b506102e261032b36600461345f565b600090815260fb602052604090206001015490565b34801561034c57600080fd5b5061036061035b366004613477565b6109da565b005b34801561036e57600080fd5b5060405160128152602001610282565b34801561038a57600080fd5b506102e2610a06565b34801561039f57600080fd5b506103606103ae366004613477565b610a10565b3480156103bf57600080fd5b506103606103ce3660046131f4565b610a8e565b3480156103df57600080fd5b506102766103ee3660046133a1565b610ab5565b3480156103ff57600080fd5b506102e261040e3660046133a1565b610af1565b34801561041f57600080fd5b50610360610b65565b34801561043457600080fd5b506103606104433660046133a1565b610b86565b34801561045457600080fd5b5061036061046336600461345f565b610ba9565b6103606104763660046132e4565b610bb3565b34801561048757600080fd5b506104b56104963660046131f4565b6001600160a01b03908116600090815261019460205260409020541690565b6040516001600160a01b039091168152602001610282565b3480156104d957600080fd5b506103606104e83660046131f4565b610bc8565b3480156104f957600080fd5b5060975460ff16610276565b34801561051157600080fd5b5061022a546104b5906001600160a01b031681565b34801561053257600080fd5b506105466105413660046131f4565b610bd2565b60405163ffffffff9091168152602001610282565b34801561056757600080fd5b506102e26105763660046131f4565b6001600160a01b031660009081526033602052604090205490565b34801561059d57600080fd5b506103606105ac3660046133a1565b610bf5565b3480156105bd57600080fd5b506102e26105cc3660046131f4565b610c22565b3480156105dd57600080fd5b50610360610c41565b3480156105f257600080fd5b506102e261060136600461345f565b610c62565b34801561061257600080fd5b506103606106213660046134c1565b610cbf565b34801561063257600080fd5b50610276610641366004613477565b610ebf565b34801561065257600080fd5b506102a0610eea565b34801561066757600080fd5b506102e26106763660046131f4565b610ef9565b34801561068757600080fd5b506102e2600081565b34801561069c57600080fd5b506102766106ab3660046133a1565b610f90565b3480156106bc57600080fd5b506102766106cb3660046133a1565b611029565b3480156106dc57600080fd5b506103606106eb3660046133ca565b611035565b3480156106fc57600080fd5b5061036061070b36600461327b565b611162565b34801561071c57600080fd5b506102e26000805160206137ba83398151915281565b34801561073e57600080fd5b5061036061074d366004613477565b6112a9565b34801561075e57600080fd5b506102e261076d36600461320e565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b3480156107a457600080fd5b506102e260008051602061377383398151915281565b3480156107c657600080fd5b506107da6107d5366004613421565b6112cf565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610282565b34801561081057600080fd5b506102e27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b148061086957506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60606036805461088090613711565b80601f01602080910402602001604051908101604052809291908181526020018280546108ac90613711565b80156108f95780601f106108ce576101008083540402835291602001916108f9565b820191906000526020600020905b8154815290600101906020018083116108dc57829003601f168201915b5050505050905090565b6000610910338484611362565b50600192915050565b600061092460355490565b905090565b6000610936848484611486565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156109c05760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6109cd8533858403611362565b60019150505b9392505050565b600082815260fb60205260409020600101546109f781335b61166b565b610a0183836116cf565b505050565b6000610924611755565b6001600160a01b0381163314610a805760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016109b7565b610a8a82826117d2565b5050565b610a9781611839565b610ab281604051806020016040528060008152506000611864565b50565b3360008181526034602090815260408083206001600160a01b03871684529091528120549091610910918590610aec908690613660565b611362565b6000438210610b425760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064016109b7565b6001600160a01b0383166000908152610195602052604090206109d390836119ec565b600080516020613773833981519152610b7e81336109f2565b610ab2611ac5565b6000805160206137ba833981519152610b9f81336109f2565b610a018383611b58565b610ab23382611b62565b610bbc82611839565b610a8a82826001611864565b610ab23382611b6c565b6001600160a01b0381166000908152610195602052604081205461086990611be7565b61022a546001600160a01b0316331415610c1857610c138282611b62565b610a8a565b610a8a8282611c50565b6001600160a01b03811660009081526101616020526040812054610869565b600080516020613773833981519152610c5a81336109f2565b610ab2611cd1565b6000438210610cb35760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064016109b7565b610869610196836119ec565b600054610100900460ff1680610cd8575060005460ff16155b610cf45760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015610d16576000805461ffff19166101011790555b610d8987878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250611d4c92505050565b610d91611dcb565b610d99611e46565b610da1611ead565b610de087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611f0c92505050565b610de8611dcb565b61022a80546001600160a01b0319166001600160a01b038416179055610e0f600033610a10565b610e276000805160206137ba83398151915233610a10565b610e3f60008051602061377383398151915233610a10565b610e4a600084611fac565b610e626000805160206137ba83398151915284611fac565b610e7a60008051602061377383398151915284611fac565b610ea47f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611fac565b8015610eb6576000805461ff00191690555b50505050505050565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606037805461088090613711565b6001600160a01b038116600090815261019560205260408120548015610f7d576001600160a01b038316600090815261019560205260409020610f3d6001836136b7565b81548110610f5b57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316610f80565b60005b6001600160e01b03169392505050565b3360009081526034602090815260408083206001600160a01b0386168452909152812054828110156110125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016109b7565b61101f3385858403611362565b5060019392505050565b60006109d38383611fb6565b834211156110855760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e6174757265206578706972656400000060448201526064016109b7565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906110ff906110f79060a00160405160208183030381529060405280519060200120611fc3565b858585612011565b905061110a81612039565b86146111585760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e63650000000000000060448201526064016109b7565b610eb68188611b6c565b834211156111b25760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016109b7565b6000610162548888886111c48c612039565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061121f82611fc3565b9050600061122f82878787612011565b9050896001600160a01b0316816001600160a01b0316146112925760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016109b7565b61129d8a8a8a611362565b50505050505050505050565b600082815260fb60205260409020600101546112c581336109f2565b610a0183836117d2565b60408051808201909152600080825260208201526001600160a01b038316600090815261019560205260409020805463ffffffff841690811061132257634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b6001600160a01b0383166113c45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016109b7565b6001600160a01b0382166114255760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016109b7565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166114ea5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016109b7565b6001600160a01b03821661154c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016109b7565b611557838383612062565b6001600160a01b038316600090815260336020526040902054818110156115cf5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016109b7565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290611606908490613660565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161165291815260200190565b60405180910390a36116658484846120d0565b50505050565b6116758282610ebf565b610a8a5761168d816001600160a01b031660146120db565b6116988360206120db565b6040516020016116a992919061356a565b60408051601f198184030181529082905262461bcd60e51b82526109b7916004016135df565b6116d98282610ebf565b610a8a57600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff191660011790556117113390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006109247f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61178561012d5490565b61012e546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6117dc8282610ebf565b15610a8a57600082815260fb602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610a8a81336109f2565b60006118977f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506118a2846122bd565b6000835111806118af5750815b156118c0576118be8484612362565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff166119e557805460ff191660011781556040516001600160a01b038316602482015261193f90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052612362565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146119dc5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016109b7565b6119e58561244d565b5050505050565b8154600090815b81811015611a5e576000611a07828461248d565b905084868281548110611a2a57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff161115611a4a57809250611a58565b611a55816001613660565b91505b506119f3565b8115611ab05784611a706001846136b7565b81548110611a8e57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316611ab3565b60005b6001600160e01b031695945050505050565b60975460ff16611b0e5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109b7565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610a8a82826124a8565b610a8a8282612538565b6001600160a01b0382811660008181526101946020818152604080842080546033845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611665828483612551565b600063ffffffff821115611c4c5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b60648201526084016109b7565b5090565b6000611c5c833361076d565b905081811015611cba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b60648201526084016109b7565b611cc78333848403611362565b610a018383611b62565b60975460ff1615611d175760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109b7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b3b3390565b600054610100900460ff1680611d65575060005460ff16155b611d815760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015611da3576000805461ffff19166101011790555b611dab612690565b611db583836126fa565b8015610a01576000805461ff0019169055505050565b600054610100900460ff1680611de4575060005460ff16155b611e005760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015611e22576000805461ffff19166101011790555b611e2a612690565b611e32612690565b8015610ab2576000805461ff001916905550565b600054610100900460ff1680611e5f575060005460ff16155b611e7b5760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015611e9d576000805461ffff19166101011790555b611ea5612690565b611e3261278f565b600054610100900460ff1680611ec6575060005460ff16155b611ee25760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015611f04576000805461ffff19166101011790555b611e22612690565b600054610100900460ff1680611f25575060005460ff16155b611f415760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015611f63576000805461ffff19166101011790555b611f6b612690565b611f8e82604051806040016040528060018152602001603160f81b815250612804565b611f9782612890565b8015610a8a576000805461ff00191690555050565b610a8a82826116cf565b6000610910338484611486565b6000610869611fd0611755565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061202287878787612921565b9150915061202f81612a0e565b5095945050505050565b6001600160a01b0381166000908152610161602052604090208054600181018255905b50919050565b60975460ff16158061208757506120876000805160206137ba83398151915233610641565b6120cb5760405162461bcd60e51b81526020600482015260156024820152742830bab9b2b21030b732103737ba1036b4b73a32b960591b60448201526064016109b7565b610a01565b610a01838383612c11565b606060006120ea836002613698565b6120f5906002613660565b67ffffffffffffffff81111561211b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612145576020820181803683370190505b509050600360fc1b8160008151811061216e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106121ab57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006121cf846002613698565b6121da906001613660565b90505b600181111561226e576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061221c57634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061224057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93612267816136fa565b90506121dd565b5083156109d35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109b7565b803b6123215760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016109b7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6123c15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016109b7565b600080846001600160a01b0316846040516123dc919061354e565b600060405180830381855af49150503d8060008114612417576040519150601f19603f3d011682016040523d82523d6000602084013e61241c565b606091505b5091509150612444828260405180606001604052806027815260200161379360279139612c44565b95945050505050565b612456816122bd565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600061249c6002848418613678565b6109d390848416613660565b6124b28282612c7d565b6001600160e01b036124c2610919565b11156125295760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b60648201526084016109b7565b611665610196612d7083612d7c565b6125428282612f1f565b61166561019661308083612d7c565b816001600160a01b0316836001600160a01b0316141580156125735750600081115b15610a01576001600160a01b03831615612602576001600160a01b03831660009081526101956020526040812081906125af9061308085612d7c565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516125f7929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615610a01576001600160a01b038216600090815261019560205260408120819061263990612d7085612d7c565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612681929190918252602082015260400190565b60405180910390a25050505050565b600054610100900460ff16806126a9575060005460ff16155b6126c55760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015611e32576000805461ffff19166101011790558015610ab2576000805461ff001916905550565b600054610100900460ff1680612713575060005460ff16155b61272f5760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff16158015612751576000805461ffff19166101011790555b82516127649060369060208601906130f5565b5081516127789060379060208501906130f5565b508015610a01576000805461ff0019169055505050565b600054610100900460ff16806127a8575060005460ff16155b6127c45760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff161580156127e6576000805461ffff19166101011790555b6097805460ff191690558015610ab2576000805461ff001916905550565b600054610100900460ff168061281d575060005460ff16155b6128395760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff1615801561285b576000805461ffff19166101011790555b825160208085019190912083519184019190912061012d9190915561012e558015610a01576000805461ff0019169055505050565b600054610100900460ff16806128a9575060005460ff16155b6128c55760405162461bcd60e51b81526004016109b790613612565b600054610100900460ff161580156128e7576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610162558015610a8a576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156129585750600090506003612a05565b8460ff16601b1415801561297057508460ff16601c14155b156129815750600090506004612a05565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156129d5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129fe57600060019250925050612a05565b9150600090505b94509492505050565b6000816004811115612a3057634e487b7160e01b600052602160045260246000fd5b1415612a3b57610ab2565b6001816004811115612a5d57634e487b7160e01b600052602160045260246000fd5b1415612aab5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109b7565b6002816004811115612acd57634e487b7160e01b600052602160045260246000fd5b1415612b1b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109b7565b6003816004811115612b3d57634e487b7160e01b600052602160045260246000fd5b1415612b965760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109b7565b6004816004811115612bb857634e487b7160e01b600052602160045260246000fd5b1415610ab25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109b7565b6001600160a01b0383811660009081526101946020526040808220548584168352912054610a0192918216911683612551565b60608315612c535750816109d3565b825115612c635782518084602001fd5b8160405162461bcd60e51b81526004016109b791906135df565b6001600160a01b038216612cd35760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016109b7565b612cdf60008383612062565b8060356000828254612cf19190613660565b90915550506001600160a01b03821660009081526033602052604081208054839290612d1e908490613660565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610a8a600083836120d0565b60006109d38284613660565b825460009081908015612dd55785612d956001836136b7565b81548110612db357634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316612dd8565b60005b6001600160e01b03169250612df183858763ffffffff16565b9150600081118015612e3d57504386612e0b6001846136b7565b81548110612e2957634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff16145b15612eab57612e4b8261308c565b86612e576001846136b7565b81548110612e7557634e487b7160e01b600052603260045260246000fd5b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b03160217905550612f16565b856040518060400160405280612ec043611be7565b63ffffffff168152602001612ed48561308c565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b50935093915050565b6001600160a01b038216612f7f5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016109b7565b612f8b82600083612062565b6001600160a01b03821660009081526033602052604090205481811015612fff5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016109b7565b6001600160a01b038316600090815260336020526040812083830390556035805484929061302e9084906136b7565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610a01836000846120d0565b60006109d382846136b7565b60006001600160e01b03821115611c4c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b60648201526084016109b7565b82805461310190613711565b90600052602060002090601f0160209004810192826131235760008555613169565b82601f1061313c57805160ff1916838001178555613169565b82800160010185558215613169579182015b8281111561316957825182559160200191906001019061314e565b50611c4c9291505b80821115611c4c5760008155600101613171565b80356001600160a01b038116811461086c57600080fd5b60008083601f8401126131ad578182fd5b50813567ffffffffffffffff8111156131c4578182fd5b6020830191508360208285010111156131dc57600080fd5b9250929050565b803560ff8116811461086c57600080fd5b600060208284031215613205578081fd5b6109d382613185565b60008060408385031215613220578081fd5b61322983613185565b915061323760208401613185565b90509250929050565b600080600060608486031215613254578081fd5b61325d84613185565b925061326b60208501613185565b9150604084013590509250925092565b600080600080600080600060e0888a031215613295578283fd5b61329e88613185565b96506132ac60208901613185565b955060408801359450606088013593506132c8608089016131e3565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156132f6578182fd5b6132ff83613185565b9150602083013567ffffffffffffffff8082111561331b578283fd5b818501915085601f83011261332e578283fd5b8135818111156133405761334061375c565b604051601f8201601f19908116603f011681019083821181831017156133685761336861375c565b81604052828152886020848701011115613380578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600080604083850312156133b3578182fd5b6133bc83613185565b946020939093013593505050565b60008060008060008060c087890312156133e2578182fd5b6133eb87613185565b95506020870135945060408701359350613407606088016131e3565b92506080870135915060a087013590509295509295509295565b60008060408385031215613433578182fd5b61343c83613185565b9150602083013563ffffffff81168114613454578182fd5b809150509250929050565b600060208284031215613470578081fd5b5035919050565b60008060408385031215613489578182fd5b8235915061323760208401613185565b6000602082840312156134aa578081fd5b81356001600160e01b0319811681146109d3578182fd5b600080600080600080608087890312156134d9578182fd5b863567ffffffffffffffff808211156134f0578384fd5b6134fc8a838b0161319c565b90985096506020890135915080821115613514578384fd5b5061352189828a0161319c565b9095509350613534905060408801613185565b915061354260608801613185565b90509295509295509295565b600082516135608184602087016136ce565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516135a28160178501602088016136ce565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516135d38160288401602088016136ce565b01602801949350505050565b60006020825282518060208401526135fe8160408501602087016136ce565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561367357613673613746565b500190565b60008261369357634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156136b2576136b2613746565b500290565b6000828210156136c9576136c9613746565b500390565b60005b838110156136e95781810151838201526020016136d1565b838111156116655750506000910152565b60008161370957613709613746565b506000190190565b600181811c9082168061372557607f821691505b6020821081141561205c57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a26469706673582212203bfc12096307f01a458c12dfe8df26fd0aab6ddb91bc6c6277ab2630a746650d64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "burn(uint256)": { + "details": "Destroys `amount` tokens from the caller. See {ERC20-_burn}." + }, + "checkpoints(address,uint32)": { + "details": "Get the `pos`-th checkpoint for `account`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "delegate(address)": { + "details": "Delegate votes from the sender to `delegatee`." + }, + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "Delegates votes from signer to `delegatee`" + }, + "delegates(address)": { + "details": "Get the address `account` is currently delegating to." + }, + "getPastTotalSupply(uint256)": { + "details": "Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances. It is but NOT the sum of all the delegated votes! Requirements: - `blockNumber` must have been already mined" + }, + "getPastVotes(address,uint256)": { + "details": "Retrieve the number of votes for `account` at the end of `blockNumber`. Requirements: - `blockNumber` must have been already mined" + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "getVotes(address)": { + "details": "Gets the current votes balance for `account`" + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "initialize(string,string,address,address)": { + "details": "This function is called `initialize` to differentiate it from `initialize(string,string)` in the parent contract which should NOT be called to initialize this contract. ", + "params": { + "name": "The name of the Float governance token", + "stakerAddress": "The staker contract that controls minting of the token", + "symbol": "The ticker representing the token" + } + }, + "mint(address,uint256)": { + "details": "Can only be called by addresses with a MINTER_ROLE. This should correspond to the Staker contract.", + "params": { + "amount": "Amount of synthetic tokens to mint in wei.", + "to": "The address for which to mint the tokens for." + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "numCheckpoints(address)": { + "details": "Get number of checkpoints for `account`." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "FloatToken", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "initialize(string,string,address,address)": { + "notice": "Initialize the Float Token with relevant" + }, + "mint(address,uint256)": { + "notice": "Mints an amount of Float tokens for an address." + } + }, + "notice": "The Float Token is the governance token for the Float Capital protocol", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1351, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1357, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1359, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 1361, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 1363, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 1904, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 2069, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1240, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_paused", + "offset": 0, + "slot": "151", + "type": "t_bool" + }, + { + "astId": 1331, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4436, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_roles", + "offset": 0, + "slot": "251", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4251, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "301", + "type": "t_bytes32" + }, + { + "astId": 4253, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "302", + "type": "t_bytes32" + }, + { + "astId": 4390, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "303", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2845, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_nonces", + "offset": 0, + "slot": "353", + "type": "t_mapping(t_address,t_struct(Counter)3544_storage)" + }, + { + "astId": 2847, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_PERMIT_TYPEHASH", + "offset": 0, + "slot": "354", + "type": "t_bytes32" + }, + { + "astId": 3015, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "355", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 2167, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_delegates", + "offset": 0, + "slot": "404", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 2173, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_checkpoints", + "offset": 0, + "slot": "405", + "type": "t_mapping(t_address,t_array(t_struct(Checkpoint)2158_storage)dyn_storage)" + }, + { + "astId": 2177, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_totalSupplyCheckpoints", + "offset": 0, + "slot": "406", + "type": "t_array(t_struct(Checkpoint)2158_storage)dyn_storage" + }, + { + "astId": 2793, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "407", + "type": "t_array(t_uint256)47_storage" + }, + { + "astId": 1085, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "454", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "504", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 9914, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "treasury", + "offset": 0, + "slot": "554", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Checkpoint)2158_storage)dyn_storage": { + "base": "t_struct(Checkpoint)2158_storage", + "encoding": "dynamic_array", + "label": "struct ERC20VotesUpgradeable.Checkpoint[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)47_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[47]", + "numberOfBytes": "1504" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_array(t_struct(Checkpoint)2158_storage)dyn_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct ERC20VotesUpgradeable.Checkpoint[])", + "numberOfBytes": "32", + "value": "t_array(t_struct(Checkpoint)2158_storage)dyn_storage" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)3544_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)3544_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Checkpoint)2158_storage": { + "encoding": "inplace", + "label": "struct ERC20VotesUpgradeable.Checkpoint", + "members": [ + { + "astId": 2155, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "fromBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 2157, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "votes", + "offset": 4, + "slot": "0", + "type": "t_uint224" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Counter)3544_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 3543, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint224": { + "encoding": "inplace", + "label": "uint224", + "numberOfBytes": "28" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/AlphaTestFLT_Proxy.json b/deployments/mumbai/AlphaTestFLT_Proxy.json new file mode 100644 index 0000000..91feecf --- /dev/null +++ b/deployments/mumbai/AlphaTestFLT_Proxy.json @@ -0,0 +1,147 @@ +{ + "address": "0x2827c87a2FC35b0D20E414DF5358B95264aC726E", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xf29df5419472af66e7fc225c9ca079dc021fa776f939df943dc1d90287d82c20", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x2827c87a2FC35b0D20E414DF5358B95264aC726E", + "transactionIndex": 0, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000410000000000000000000000000000000000000000000000000000000020000000008000002000000000000000000000000000000000000000000000000002800000000000000000040100000000000000000000000000000000000000000000000000080000000080000000000000000000000000008000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000000004000000020000000000001000000000000000000000000008000500000000000000000000000000000080000000000000000000000000000000000000800300000", + "blockHash": "0xdf85cb2a07e0154622c4cf88ca5b5e21813d50437c162e615b9731ed94979626", + "transactionHash": "0xf29df5419472af66e7fc225c9ca079dc021fa776f939df943dc1d90287d82c20", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18868809, + "transactionHash": "0xf29df5419472af66e7fc225c9ca079dc021fa776f939df943dc1d90287d82c20", + "address": "0x2827c87a2FC35b0D20E414DF5358B95264aC726E", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000008ca4c66ca03b72fa0374fc8b32e558d6fa162411" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xdf85cb2a07e0154622c4cf88ca5b5e21813d50437c162e615b9731ed94979626" + }, + { + "transactionIndex": 0, + "blockNumber": 18868809, + "transactionHash": "0xf29df5419472af66e7fc225c9ca079dc021fa776f939df943dc1d90287d82c20", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000002a41c347bf60000000000000000000000000000000000000000000000000008d226b0e3fd42cd000000000000000000000000000000000000000000000168e4abd02f360733a300000000000000000000000000000000000000000000000008cf8294af814ccd000000000000000000000000000000000000000000000168e4ae744b6a8329a3", + "logIndex": 1, + "blockHash": "0xdf85cb2a07e0154622c4cf88ca5b5e21813d50437c162e615b9731ed94979626" + } + ], + "blockNumber": 18868809, + "cumulativeGasUsed": "247797", + "status": 1, + "byzantium": true + }, + "args": [ + "0x8cA4C66Ca03b72fA0374FC8B32E558d6fa162411", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/FloatCapital_v0.json b/deployments/mumbai/FloatCapital_v0.json new file mode 100644 index 0000000..e0d6fc0 --- /dev/null +++ b/deployments/mumbai/FloatCapital_v0.json @@ -0,0 +1,473 @@ +{ + "address": "0x6975225FA43820f71725807644b9836EDc7192B6", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "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": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "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": "address", + "name": "_admin", + "type": "address" + } + ], + "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": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x6975225FA43820f71725807644b9836EDc7192B6", + "transactionIndex": 1, + "gasUsed": "349560", + "logsBloom": "0x00000004000020000000000000000000410000000000000000000000000000000000000002000000000000008000000000008000002000000000000000000000000000000000000000000000000002800000000020002000040100000000000000000000020000000000000000000800000000000000001880010000000000000000000000000000000000000000004020000000000000000000000000000000200400000000000000000000000000000000000000000000001040000000004000000020000000000001000000000000100000000000008100540000000020000080000000000000000000000000000000000000080000000000000000100000", + "blockHash": "0x177537a83d4f799e6aa8af3440a599cad11689738acd0794693a6b2d07bd2971", + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 18868816, + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "address": "0x6975225FA43820f71725807644b9836EDc7192B6", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000363b83ed940e088d5324e36553c02bb32eea2fca" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0x177537a83d4f799e6aa8af3440a599cad11689738acd0794693a6b2d07bd2971" + }, + { + "transactionIndex": 1, + "blockNumber": 18868816, + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "address": "0x6975225FA43820f71725807644b9836EDc7192B6", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0x177537a83d4f799e6aa8af3440a599cad11689738acd0794693a6b2d07bd2971" + }, + { + "transactionIndex": 1, + "blockNumber": 18868816, + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "address": "0x6975225FA43820f71725807644b9836EDc7192B6", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0x177537a83d4f799e6aa8af3440a599cad11689738acd0794693a6b2d07bd2971" + }, + { + "transactionIndex": 1, + "blockNumber": 18868816, + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "address": "0x6975225FA43820f71725807644b9836EDc7192B6", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 10, + "blockHash": "0x177537a83d4f799e6aa8af3440a599cad11689738acd0794693a6b2d07bd2971" + }, + { + "transactionIndex": 1, + "blockNumber": 18868816, + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000003b9c4d6e2100000000000000000000000000000000000000000000000000008c4be027a89f8cd000000000000000000000000000000000000000000000168e4d63facdde874a300000000000000000000000000000000000000000000000008c1043da3a7e8cd000000000000000000000000000000000000000000000168e4d9f971b4ca84a3", + "logIndex": 11, + "blockHash": "0x177537a83d4f799e6aa8af3440a599cad11689738acd0794693a6b2d07bd2971" + } + ], + "blockNumber": 18868816, + "cumulativeGasUsed": "763403", + "status": 1, + "byzantium": true + }, + "args": [ + "0x363B83ED940e088D5324e36553C02bb32EeA2FCa", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xc4d66de80000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "0x2740EA9F72B23372621D8D718F52609b80c24E61" + ] + }, + "implementation": "0x363B83ED940e088D5324e36553C02bb32EeA2FCa", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/FloatCapital_v0_Implementation.json b/deployments/mumbai/FloatCapital_v0_Implementation.json new file mode 100644 index 0000000..227a9fb --- /dev/null +++ b/deployments/mumbai/FloatCapital_v0_Implementation.json @@ -0,0 +1,536 @@ +{ + "address": "0x363B83ED940e088D5324e36553C02bb32EeA2FCa", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "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": "address", + "name": "_admin", + "type": "address" + } + ], + "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": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x443a62585b35873fbc342c01d90b8d40c814d4e2db8a67890bf502a8dc53cb12", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x363B83ED940e088D5324e36553C02bb32EeA2FCa", + "transactionIndex": 1, + "gasUsed": "1010294", + "logsBloom": "0x00000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x6ded7f7d20e7cd15bc35616933fd51e9628e0bf06c8931944779f2145c4ee55f", + "transactionHash": "0x443a62585b35873fbc342c01d90b8d40c814d4e2db8a67890bf502a8dc53cb12", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 18868813, + "transactionHash": "0x443a62585b35873fbc342c01d90b8d40c814d4e2db8a67890bf502a8dc53cb12", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x000000000000000000000000000000000000000000000000000ac49234f7540000000000000000000000000000000000000000000000000008cf8294af814ccd000000000000000000000000000000000000000000000168e4c3426ef06bb4a300000000000000000000000000000000000000000000000008c4be027a89f8cd000000000000000000000000000000000000000000000168e4ce0701256308a3", + "logIndex": 2, + "blockHash": "0x6ded7f7d20e7cd15bc35616933fd51e9628e0bf06c8931944779f2145c4ee55f" + } + ], + "blockNumber": 18868813, + "cumulativeGasUsed": "1037767", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"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\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"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\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"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.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"Float Capital Contract \",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/FloatCapital_v0.sol\":\"FloatCapital_v0\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"contracts/FloatCapital_v0.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\n/** @title Float Capital Contract */\\ncontract FloatCapital_v0 is AccessControlledAndUpgradeable {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 CONTRACT SETUP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function initialize(address _admin) external initializer {\\n _AccessControlledAndUpgradeable_init(_admin);\\n }\\n\\n /** A percentage of float token to accrue here for project\\n development */\\n}\\n\",\"keccak256\":\"0xc31184f9f4530dd91f805f20ffe1569e75caa052dae352850e8d256e89f83430\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611151806100206000396000f3fe6080604052600436106100a75760003560e01c806375b238fc1161006457806375b238fc1461019457806391d14854146101c8578063a217fddf146101e8578063c4d66de8146101fd578063d547741f1461021d578063f72c0d8b1461023d576100a7565b806301ffc9a7146100ac578063248a9ca3146100e15780632f2ff15d1461011f57806336568abe146101415780633659cfe6146101615780634f1ef28614610181575b600080fd5b3480156100b857600080fd5b506100cc6100c7366004610f10565b610271565b60405190151581526020015b60405180910390f35b3480156100ed57600080fd5b506101116100fc366004610ecd565b60009081526065602052604090206001015490565b6040519081526020016100d8565b34801561012b57600080fd5b5061013f61013a366004610ee5565b6102aa565b005b34801561014d57600080fd5b5061013f61015c366004610ee5565b6102d6565b34801561016d57600080fd5b5061013f61017c366004610df6565b610359565b61013f61018f366004610e10565b610380565b3480156101a057600080fd5b506101117fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156101d457600080fd5b506100cc6101e3366004610ee5565b610395565b3480156101f457600080fd5b50610111600081565b34801561020957600080fd5b5061013f610218366004610df6565b6103c0565b34801561022957600080fd5b5061013f610238366004610ee5565b610435565b34801561024957600080fd5b506101117f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806102a257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6000828152606560205260409020600101546102c781335b61045b565b6102d183836104bf565b505050565b6001600160a01b038116331461034b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6103558282610545565b5050565b610362816105ac565b61037d816040518060200160405280600081525060006105d7565b50565b610389826105ac565b610355828260016105d7565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600054610100900460ff16806103d9575060005460ff16155b6103f55760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610417576000805461ffff19166101011790555b6104208261075f565b8015610355576000805461ff00191690555050565b60008281526065602052604090206001015461045181336102c2565b6102d18383610545565b6104658282610395565b6103555761047d816001600160a01b031660146107cf565b6104888360206107cf565b604051602001610499929190610f54565b60408051601f198184030181529082905262461bcd60e51b825261034291600401610fc9565b6104c98282610395565b6103555760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556105013390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61054f8282610395565b156103555760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361035581336102c2565b600061060a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050610615846109b8565b6000835111806106225750815b15610633576106318484610a5d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661075857805460ff191660011781556040516001600160a01b03831660248201526106b290869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052610a5d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b0383811691161461074f5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610342565b61075885610b48565b5050505050565b600054610100900460ff1680610778575060005460ff16155b6107945760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff161580156107b6576000805461ffff19166101011790555b6107be610b88565b6107c6610c0b565b61042082610c69565b606060006107de836002611062565b6107e990600261104a565b67ffffffffffffffff81111561080f57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610839576020820181803683370190505b509050600360fc1b8160008151811061086257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061089f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006108c3846002611062565b6108ce90600161104a565b90505b6001811115610962576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061091057634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061093457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361095b816110b1565b90506108d1565b5083156109b15760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610342565b9392505050565b803b610a1c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610342565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b610abc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610342565b600080846001600160a01b031684604051610ad79190610f38565b600060405180830381855af49150503d8060008114610b12576040519150601f19603f3d011682016040523d82523d6000602084013e610b17565b606091505b5091509150610b3f82826040518060600160405280602781526020016110f560279139610d32565b95945050505050565b610b51816109b8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680610ba1575060005460ff16155b610bbd5760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610bdf576000805461ffff19166101011790555b610be7610d6b565b610bef610d6b565b610bf7610d6b565b801561037d576000805461ff001916905550565b600054610100900460ff1680610c24575060005460ff16155b610c405760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610be7576000805461ffff1916610101179055610bef610d6b565b600054610100900460ff1680610c82575060005460ff16155b610c9e5760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610cc0576000805461ffff19166101011790555b6001600160a01b038216610cd357600080fd5b610cde600083610dd5565b610d087fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610dd5565b6104207f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383610dd5565b60608315610d415750816109b1565b825115610d515782518084602001fd5b8160405162461bcd60e51b81526004016103429190610fc9565b600054610100900460ff1680610d84575060005460ff16155b610da05760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610bf7576000805461ffff1916610101179055801561037d576000805461ff001916905550565b61035582826104bf565b80356001600160a01b03811681146102a557600080fd5b600060208284031215610e07578081fd5b6109b182610ddf565b60008060408385031215610e22578081fd5b610e2b83610ddf565b9150602083013567ffffffffffffffff80821115610e47578283fd5b818501915085601f830112610e5a578283fd5b813581811115610e6c57610e6c6110de565b604051601f8201601f19908116603f01168101908382118183101715610e9457610e946110de565b81604052828152886020848701011115610eac578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600060208284031215610ede578081fd5b5035919050565b60008060408385031215610ef7578182fd5b82359150610f0760208401610ddf565b90509250929050565b600060208284031215610f21578081fd5b81356001600160e01b0319811681146109b1578182fd5b60008251610f4a818460208701611081565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351610f8c816017850160208801611081565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351610fbd816028840160208801611081565b01602801949350505050565b6000602082528251806020840152610fe8816040850160208701611081565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561105d5761105d6110c8565b500190565b600081600019048311821515161561107c5761107c6110c8565b500290565b60005b8381101561109c578181015183820152602001611084565b838111156110ab576000848401525b50505050565b6000816110c0576110c06110c8565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220cd675f65fea9a966cdcfdd33d785243d32edf66939f7f37ab4fed2259cb5a8d664736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106100a75760003560e01c806375b238fc1161006457806375b238fc1461019457806391d14854146101c8578063a217fddf146101e8578063c4d66de8146101fd578063d547741f1461021d578063f72c0d8b1461023d576100a7565b806301ffc9a7146100ac578063248a9ca3146100e15780632f2ff15d1461011f57806336568abe146101415780633659cfe6146101615780634f1ef28614610181575b600080fd5b3480156100b857600080fd5b506100cc6100c7366004610f10565b610271565b60405190151581526020015b60405180910390f35b3480156100ed57600080fd5b506101116100fc366004610ecd565b60009081526065602052604090206001015490565b6040519081526020016100d8565b34801561012b57600080fd5b5061013f61013a366004610ee5565b6102aa565b005b34801561014d57600080fd5b5061013f61015c366004610ee5565b6102d6565b34801561016d57600080fd5b5061013f61017c366004610df6565b610359565b61013f61018f366004610e10565b610380565b3480156101a057600080fd5b506101117fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156101d457600080fd5b506100cc6101e3366004610ee5565b610395565b3480156101f457600080fd5b50610111600081565b34801561020957600080fd5b5061013f610218366004610df6565b6103c0565b34801561022957600080fd5b5061013f610238366004610ee5565b610435565b34801561024957600080fd5b506101117f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806102a257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6000828152606560205260409020600101546102c781335b61045b565b6102d183836104bf565b505050565b6001600160a01b038116331461034b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6103558282610545565b5050565b610362816105ac565b61037d816040518060200160405280600081525060006105d7565b50565b610389826105ac565b610355828260016105d7565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600054610100900460ff16806103d9575060005460ff16155b6103f55760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610417576000805461ffff19166101011790555b6104208261075f565b8015610355576000805461ff00191690555050565b60008281526065602052604090206001015461045181336102c2565b6102d18383610545565b6104658282610395565b6103555761047d816001600160a01b031660146107cf565b6104888360206107cf565b604051602001610499929190610f54565b60408051601f198184030181529082905262461bcd60e51b825261034291600401610fc9565b6104c98282610395565b6103555760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556105013390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61054f8282610395565b156103555760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361035581336102c2565b600061060a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050610615846109b8565b6000835111806106225750815b15610633576106318484610a5d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661075857805460ff191660011781556040516001600160a01b03831660248201526106b290869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052610a5d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b0383811691161461074f5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610342565b61075885610b48565b5050505050565b600054610100900460ff1680610778575060005460ff16155b6107945760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff161580156107b6576000805461ffff19166101011790555b6107be610b88565b6107c6610c0b565b61042082610c69565b606060006107de836002611062565b6107e990600261104a565b67ffffffffffffffff81111561080f57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610839576020820181803683370190505b509050600360fc1b8160008151811061086257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061089f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006108c3846002611062565b6108ce90600161104a565b90505b6001811115610962576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061091057634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061093457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361095b816110b1565b90506108d1565b5083156109b15760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610342565b9392505050565b803b610a1c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610342565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b610abc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610342565b600080846001600160a01b031684604051610ad79190610f38565b600060405180830381855af49150503d8060008114610b12576040519150601f19603f3d011682016040523d82523d6000602084013e610b17565b606091505b5091509150610b3f82826040518060600160405280602781526020016110f560279139610d32565b95945050505050565b610b51816109b8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680610ba1575060005460ff16155b610bbd5760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610bdf576000805461ffff19166101011790555b610be7610d6b565b610bef610d6b565b610bf7610d6b565b801561037d576000805461ff001916905550565b600054610100900460ff1680610c24575060005460ff16155b610c405760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610be7576000805461ffff1916610101179055610bef610d6b565b600054610100900460ff1680610c82575060005460ff16155b610c9e5760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610cc0576000805461ffff19166101011790555b6001600160a01b038216610cd357600080fd5b610cde600083610dd5565b610d087fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610dd5565b6104207f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383610dd5565b60608315610d415750816109b1565b825115610d515782518084602001fd5b8160405162461bcd60e51b81526004016103429190610fc9565b600054610100900460ff1680610d84575060005460ff16155b610da05760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610bf7576000805461ffff1916610101179055801561037d576000805461ff001916905550565b61035582826104bf565b80356001600160a01b03811681146102a557600080fd5b600060208284031215610e07578081fd5b6109b182610ddf565b60008060408385031215610e22578081fd5b610e2b83610ddf565b9150602083013567ffffffffffffffff80821115610e47578283fd5b818501915085601f830112610e5a578283fd5b813581811115610e6c57610e6c6110de565b604051601f8201601f19908116603f01168101908382118183101715610e9457610e946110de565b81604052828152886020848701011115610eac578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600060208284031215610ede578081fd5b5035919050565b60008060408385031215610ef7578182fd5b82359150610f0760208401610ddf565b90509250929050565b600060208284031215610f21578081fd5b81356001600160e01b0319811681146109b1578182fd5b60008251610f4a818460208701611081565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351610f8c816017850160208801611081565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351610fbd816028840160208801611081565b01602801949350505050565b6000602082528251806020840152610fe8816040850160208701611081565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561105d5761105d6110c8565b500190565b600081600019048311821515161561107c5761107c6110c8565b500290565b60005b8381101561109c578181015183820152602001611084565b838111156110ab576000848401525b50505050565b6000816110c0576110c06110c8565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220cd675f65fea9a966cdcfdd33d785243d32edf66939f7f37ab4fed2259cb5a8d664736f6c63430008030033", + "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." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "Float Capital Contract ", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/FloatCapital_v0_Proxy.json b/deployments/mumbai/FloatCapital_v0_Proxy.json new file mode 100644 index 0000000..bbabf26 --- /dev/null +++ b/deployments/mumbai/FloatCapital_v0_Proxy.json @@ -0,0 +1,192 @@ +{ + "address": "0x6975225FA43820f71725807644b9836EDc7192B6", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x6975225FA43820f71725807644b9836EDc7192B6", + "transactionIndex": 1, + "gasUsed": "349560", + "logsBloom": "0x00000004000020000000000000000000410000000000000000000000000000000000000002000000000000008000000000008000002000000000000000000000000000000000000000000000000002800000000020002000040100000000000000000000020000000000000000000800000000000000001880010000000000000000000000000000000000000000004020000000000000000000000000000000200400000000000000000000000000000000000000000000001040000000004000000020000000000001000000000000100000000000008100540000000020000080000000000000000000000000000000000000080000000000000000100000", + "blockHash": "0x177537a83d4f799e6aa8af3440a599cad11689738acd0794693a6b2d07bd2971", + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 18868816, + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "address": "0x6975225FA43820f71725807644b9836EDc7192B6", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000363b83ed940e088d5324e36553c02bb32eea2fca" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0x177537a83d4f799e6aa8af3440a599cad11689738acd0794693a6b2d07bd2971" + }, + { + "transactionIndex": 1, + "blockNumber": 18868816, + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "address": "0x6975225FA43820f71725807644b9836EDc7192B6", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0x177537a83d4f799e6aa8af3440a599cad11689738acd0794693a6b2d07bd2971" + }, + { + "transactionIndex": 1, + "blockNumber": 18868816, + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "address": "0x6975225FA43820f71725807644b9836EDc7192B6", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0x177537a83d4f799e6aa8af3440a599cad11689738acd0794693a6b2d07bd2971" + }, + { + "transactionIndex": 1, + "blockNumber": 18868816, + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "address": "0x6975225FA43820f71725807644b9836EDc7192B6", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 10, + "blockHash": "0x177537a83d4f799e6aa8af3440a599cad11689738acd0794693a6b2d07bd2971" + }, + { + "transactionIndex": 1, + "blockNumber": 18868816, + "transactionHash": "0xeb5ec206b140f05cf25775d296a34e915c0455efa9248ffbc3adf6bbd344443b", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000003b9c4d6e2100000000000000000000000000000000000000000000000000008c4be027a89f8cd000000000000000000000000000000000000000000000168e4d63facdde874a300000000000000000000000000000000000000000000000008c1043da3a7e8cd000000000000000000000000000000000000000000000168e4d9f971b4ca84a3", + "logIndex": 11, + "blockHash": "0x177537a83d4f799e6aa8af3440a599cad11689738acd0794693a6b2d07bd2971" + } + ], + "blockNumber": 18868816, + "cumulativeGasUsed": "763403", + "status": 1, + "byzantium": true + }, + "args": [ + "0x363B83ED940e088D5324e36553C02bb32EeA2FCa", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xc4d66de80000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/GEMS.json b/deployments/mumbai/GEMS.json new file mode 100644 index 0000000..980c9b7 --- /dev/null +++ b/deployments/mumbai/GEMS.json @@ -0,0 +1,540 @@ +{ + "address": "0xD28789C4563d70B42226C2AFcc13bF3386a449A2", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gems", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "streak", + "type": "uint256" + } + ], + "name": "GemsCollected", + "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": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "GEM_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "gems", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "gm", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "lastAction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "streak", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xba9d10e95a97da9c5816408de9bb3f8889a3ae2b147b75adf9af66eb44212ecd", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xD28789C4563d70B42226C2AFcc13bF3386a449A2", + "transactionIndex": 4, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000410000000000000000000000000000000000000800000000000000000000000000008000002000000000000000000000000000000000000000000000000002800000000000000000040100000000000000000000000000000000020000000000000000000000000080000008000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000002004000000020000000000001000000000000000000000000008000500000020000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x5a20f5f2db82e18c3e1899c1a675dea2ea2ecc7c28c138e3bf08f02d947b0832", + "transactionHash": "0xba9d10e95a97da9c5816408de9bb3f8889a3ae2b147b75adf9af66eb44212ecd", + "logs": [ + { + "transactionIndex": 4, + "blockNumber": 18868825, + "transactionHash": "0xba9d10e95a97da9c5816408de9bb3f8889a3ae2b147b75adf9af66eb44212ecd", + "address": "0xD28789C4563d70B42226C2AFcc13bF3386a449A2", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000004a6727d2170bee6d51aee2d36a8aa9879d417def" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0x5a20f5f2db82e18c3e1899c1a675dea2ea2ecc7c28c138e3bf08f02d947b0832" + }, + { + "transactionIndex": 4, + "blockNumber": 18868825, + "transactionHash": "0xba9d10e95a97da9c5816408de9bb3f8889a3ae2b147b75adf9af66eb44212ecd", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000002a41c347bf60000000000000000000000000000000000000000000000000008b44d64d600cccd000000000000000000000000000000000000000000000168e529a7768d8f02a300000000000000000000000000000000000000000000000008b1a948a184d6cd000000000000000000000000000000000000000000000168e52c4b92c20af8a3", + "logIndex": 10, + "blockHash": "0x5a20f5f2db82e18c3e1899c1a675dea2ea2ecc7c28c138e3bf08f02d947b0832" + } + ], + "blockNumber": 18868825, + "cumulativeGasUsed": "490181", + "status": 1, + "byzantium": true + }, + "args": [ + "0x4a6727d2170beE6D51AeE2d36a8Aa9879D417DEf", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "implementation": "0x4a6727d2170beE6D51AeE2d36a8Aa9879D417DEf", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/GEMS_Implementation.json b/deployments/mumbai/GEMS_Implementation.json new file mode 100644 index 0000000..c1ab880 --- /dev/null +++ b/deployments/mumbai/GEMS_Implementation.json @@ -0,0 +1,685 @@ +{ + "address": "0x4a6727d2170beE6D51AeE2d36a8Aa9879D417DEf", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gems", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "streak", + "type": "uint256" + } + ], + "name": "GemsCollected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "GEM_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "gems", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "gm", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "lastAction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "streak", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x1817c76449d66c1ab8b641279987d5ca1c08abd97d75f7cb4bf0493d0aea3376", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x4a6727d2170beE6D51AeE2d36a8Aa9879D417DEf", + "transactionIndex": 2, + "gasUsed": "1192914", + "logsBloom": "0x00000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x305c39526ee2d839993b7acd7dfc70acc232344aa15cfb96c84bd92976c06a06", + "transactionHash": "0x1817c76449d66c1ab8b641279987d5ca1c08abd97d75f7cb4bf0493d0aea3376", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 18868821, + "transactionHash": "0x1817c76449d66c1ab8b641279987d5ca1c08abd97d75f7cb4bf0493d0aea3376", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x000000000000000000000000000000000000000000000000000cb6d8cda71c0000000000000000000000000000000000000000000000000008c1043da3a7e8cd000000000000000000000000000000000000000000000168e50cab3b3ef33ca300000000000000000000000000000000000000000000000008b44d64d600cccd000000000000000000000000000000000000000000000168e51962140c9a58a3", + "logIndex": 9, + "blockHash": "0x305c39526ee2d839993b7acd7dfc70acc232344aa15cfb96c84bd92976c06a06" + } + ], + "blockNumber": 18868821, + "cumulativeGasUsed": "1715371", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gems\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"streak\",\"type\":\"uint256\"}],\"name\":\"GemsCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GEM_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"gems\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"gm\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staker\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastAction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"streak\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"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.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"GEMS \",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/GEMS.sol\":\"GEMS\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"contracts/GEMS.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\n/** Contract giving user GEMS*/\\n\\n// Inspired by https://github.com/andrecronje/rarity/blob/main/rarity.sol\\n\\n/** @title GEMS */\\ncontract GEMS is AccessControlledAndUpgradeable {\\n bytes32 public constant GEM_ROLE = keccak256(\\\"GEM_ROLE\\\");\\n\\n uint256 constant gems_per_day = 250e18;\\n uint256 constant DAY = 1 days;\\n\\n mapping(address => uint256) public gems;\\n mapping(address => uint256) public streak;\\n mapping(address => uint256) public lastAction;\\n\\n event GemsCollected(address user, uint256 gems, uint256 streak);\\n\\n function initialize(\\n address _admin,\\n address _longShort,\\n address _staker\\n ) external initializer {\\n _AccessControlledAndUpgradeable_init(_admin);\\n _setupRole(GEM_ROLE, _longShort);\\n _setupRole(GEM_ROLE, _staker);\\n }\\n\\n // Say gm and get gems by performing an action in LongShort or Staker\\n function gm(address user) external {\\n if (hasRole(GEM_ROLE, msg.sender)) {\\n uint256 usersLastAction = lastAction[user];\\n uint256 blocktimestamp = block.timestamp;\\n\\n if (blocktimestamp - usersLastAction >= DAY) {\\n // Award gems\\n gems[user] += gems_per_day;\\n\\n // Increment streak\\n if (blocktimestamp - usersLastAction < 2 * DAY) {\\n streak[user] += 1;\\n } else {\\n streak[user] = 1; // reset streak to 1\\n }\\n\\n lastAction[user] = blocktimestamp;\\n }\\n emit GemsCollected(user, gems[user], streak[user]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0335305655aa936242355a082737ca1d3e819d38601a0bf3b1672158591e2abd\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061149f806100206000396000f3fe6080604052600436106100fe5760003560e01c806370720d1f11610095578063a217fddf11610064578063a217fddf146102e6578063c0c53b8b146102fb578063d547741f1461031b578063f4e5f7061461033b578063f72c0d8b1461035d576100fe565b806370720d1f1461024557806375b238fc1461027257806391d14854146102a657806392d0214c146102c6576100fe565b80633659cfe6116100d15780633659cfe6146101b85780633809467e146101d85780634f1ef286146102055780636a2a651814610218576100fe565b806301ffc9a714610103578063248a9ca3146101385780632f2ff15d1461017657806336568abe14610198575b600080fd5b34801561010f57600080fd5b5061012361011e36600461122b565b610391565b60405190151581526020015b60405180910390f35b34801561014457600080fd5b506101686101533660046111e8565b60009081526065602052604090206001015490565b60405190815260200161012f565b34801561018257600080fd5b50610196610191366004611200565b6103ca565b005b3480156101a457600080fd5b506101966101b3366004611200565b6103f6565b3480156101c457600080fd5b506101966101d33660046110cf565b610479565b3480156101e457600080fd5b506101686101f33660046110cf565b60fb6020526000908152604090205481565b61019661021336600461112b565b6104a0565b34801561022457600080fd5b506101686102333660046110cf565b60fc6020526000908152604090205481565b34801561025157600080fd5b506101686102603660046110cf565b60fd6020526000908152604090205481565b34801561027e57600080fd5b506101687fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102b257600080fd5b506101236102c1366004611200565b6104b5565b3480156102d257600080fd5b506101966102e13660046110cf565b6104e0565b3480156102f257600080fd5b50610168600081565b34801561030757600080fd5b506101966103163660046110e9565b610651565b34801561032757600080fd5b50610196610336366004611200565b6106f9565b34801561034757600080fd5b5061016860008051602061142383398151915281565b34801561036957600080fd5b506101687f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806103c257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6000828152606560205260409020600101546103e781335b61071f565b6103f18383610783565b505050565b6001600160a01b038116331461046b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104758282610809565b5050565b61048281610870565b61049d8160405180602001604052806000815250600061089b565b50565b6104a982610870565b6104758282600161089b565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6104f8600080516020611423833981519152336104b5565b1561049d576001600160a01b038116600090815260fd60205260409020544262015180610525838361139c565b106105ec576001600160a01b038316600090815260fb602052604081208054680d8d726b7177a80000929061055b908490611365565b9091555061056f905062015180600261137d565b610579838361139c565b10156105b3576001600160a01b038316600090815260fc602052604081208054600192906105a8908490611365565b909155506105d09050565b6001600160a01b038316600090815260fc60205260409020600190555b6001600160a01b038316600090815260fd602052604090208190555b6001600160a01b038316600081815260fb602090815260408083205460fc8352928190205481519485529184019290925282820152517f6f4864c954777b623ffcb477ee1875e76a6345a6ca1588bcc781048e8674e5ee9181900360600190a1505050565b600054610100900460ff168061066a575060005460ff16155b6106865760405162461bcd60e51b815260040161046290611317565b600054610100900460ff161580156106a8576000805461ffff19166101011790555b6106b184610a23565b6106c960008051602061142383398151915284610aa8565b6106e160008051602061142383398151915283610aa8565b80156106f3576000805461ff00191690555b50505050565b60008281526065602052604090206001015461071581336103e2565b6103f18383610809565b61072982826104b5565b61047557610741816001600160a01b03166014610ab2565b61074c836020610ab2565b60405160200161075d92919061126f565b60408051601f198184030181529082905262461bcd60e51b8252610462916004016112e4565b61078d82826104b5565b6104755760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556107c53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61081382826104b5565b156104755760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361047581336103e2565b60006108ce7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506108d984610c9b565b6000835111806108e65750815b156108f7576108f58484610d40565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610a1c57805460ff191660011781556040516001600160a01b038316602482015261097690869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052610d40565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b03838116911614610a135760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610462565b610a1c85610e2b565b5050505050565b600054610100900460ff1680610a3c575060005460ff16155b610a585760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610a7a576000805461ffff19166101011790555b610a82610e6b565b610a8a610eee565b610a9382610f4c565b8015610475576000805461ff00191690555050565b6104758282610783565b60606000610ac183600261137d565b610acc906002611365565b67ffffffffffffffff811115610af257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610b1c576020820181803683370190505b509050600360fc1b81600081518110610b4557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610b8257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610ba684600261137d565b610bb1906001611365565b90505b6001811115610c45576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610bf357634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110610c1757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93610c3e816113df565b9050610bb4565b508315610c945760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610462565b9392505050565b803b610cff5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610462565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b610d9f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610462565b600080846001600160a01b031684604051610dba9190611253565b600060405180830381855af49150503d8060008114610df5576040519150601f19603f3d011682016040523d82523d6000602084013e610dfa565b606091505b5091509150610e22828260405180606001604052806027815260200161144360279139611015565b95945050505050565b610e3481610c9b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680610e84575060005460ff16155b610ea05760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610ec2576000805461ffff19166101011790555b610eca61104e565b610ed261104e565b610eda61104e565b801561049d576000805461ff001916905550565b600054610100900460ff1680610f07575060005460ff16155b610f235760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610eca576000805461ffff1916610101179055610ed261104e565b600054610100900460ff1680610f65575060005460ff16155b610f815760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610fa3576000805461ffff19166101011790555b6001600160a01b038216610fb657600080fd5b610fc1600083610aa8565b610feb7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610aa8565b610a937f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383610aa8565b60608315611024575081610c94565b8251156110345782518084602001fd5b8160405162461bcd60e51b815260040161046291906112e4565b600054610100900460ff1680611067575060005460ff16155b6110835760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610eda576000805461ffff1916610101179055801561049d576000805461ff001916905550565b80356001600160a01b03811681146103c557600080fd5b6000602082840312156110e0578081fd5b610c94826110b8565b6000806000606084860312156110fd578182fd5b611106846110b8565b9250611114602085016110b8565b9150611122604085016110b8565b90509250925092565b6000806040838503121561113d578182fd5b611146836110b8565b9150602083013567ffffffffffffffff80821115611162578283fd5b818501915085601f830112611175578283fd5b8135818111156111875761118761140c565b604051601f8201601f19908116603f011681019083821181831017156111af576111af61140c565b816040528281528860208487010111156111c7578586fd5b82602086016020830137856020848301015280955050505050509250929050565b6000602082840312156111f9578081fd5b5035919050565b60008060408385031215611212578182fd5b82359150611222602084016110b8565b90509250929050565b60006020828403121561123c578081fd5b81356001600160e01b031981168114610c94578182fd5b600082516112658184602087016113b3565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516112a78160178501602088016113b3565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516112d88160288401602088016113b3565b01602801949350505050565b60006020825282518060208401526113038160408501602087016113b3565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115611378576113786113f6565b500190565b6000816000190483118215151615611397576113976113f6565b500290565b6000828210156113ae576113ae6113f6565b500390565b60005b838110156113ce5781810151838201526020016113b6565b838111156106f35750506000910152565b6000816113ee576113ee6113f6565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfefbb0a55d3bd620b175b4b5ed8e54b15ee857894bb1d3baf3b9219271d425d7f9416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c3ce78d167fc465a7b455d7d930fadb0a7bcf261567cf9417feb06f7fb1f03d164736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106100fe5760003560e01c806370720d1f11610095578063a217fddf11610064578063a217fddf146102e6578063c0c53b8b146102fb578063d547741f1461031b578063f4e5f7061461033b578063f72c0d8b1461035d576100fe565b806370720d1f1461024557806375b238fc1461027257806391d14854146102a657806392d0214c146102c6576100fe565b80633659cfe6116100d15780633659cfe6146101b85780633809467e146101d85780634f1ef286146102055780636a2a651814610218576100fe565b806301ffc9a714610103578063248a9ca3146101385780632f2ff15d1461017657806336568abe14610198575b600080fd5b34801561010f57600080fd5b5061012361011e36600461122b565b610391565b60405190151581526020015b60405180910390f35b34801561014457600080fd5b506101686101533660046111e8565b60009081526065602052604090206001015490565b60405190815260200161012f565b34801561018257600080fd5b50610196610191366004611200565b6103ca565b005b3480156101a457600080fd5b506101966101b3366004611200565b6103f6565b3480156101c457600080fd5b506101966101d33660046110cf565b610479565b3480156101e457600080fd5b506101686101f33660046110cf565b60fb6020526000908152604090205481565b61019661021336600461112b565b6104a0565b34801561022457600080fd5b506101686102333660046110cf565b60fc6020526000908152604090205481565b34801561025157600080fd5b506101686102603660046110cf565b60fd6020526000908152604090205481565b34801561027e57600080fd5b506101687fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102b257600080fd5b506101236102c1366004611200565b6104b5565b3480156102d257600080fd5b506101966102e13660046110cf565b6104e0565b3480156102f257600080fd5b50610168600081565b34801561030757600080fd5b506101966103163660046110e9565b610651565b34801561032757600080fd5b50610196610336366004611200565b6106f9565b34801561034757600080fd5b5061016860008051602061142383398151915281565b34801561036957600080fd5b506101687f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806103c257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6000828152606560205260409020600101546103e781335b61071f565b6103f18383610783565b505050565b6001600160a01b038116331461046b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104758282610809565b5050565b61048281610870565b61049d8160405180602001604052806000815250600061089b565b50565b6104a982610870565b6104758282600161089b565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6104f8600080516020611423833981519152336104b5565b1561049d576001600160a01b038116600090815260fd60205260409020544262015180610525838361139c565b106105ec576001600160a01b038316600090815260fb602052604081208054680d8d726b7177a80000929061055b908490611365565b9091555061056f905062015180600261137d565b610579838361139c565b10156105b3576001600160a01b038316600090815260fc602052604081208054600192906105a8908490611365565b909155506105d09050565b6001600160a01b038316600090815260fc60205260409020600190555b6001600160a01b038316600090815260fd602052604090208190555b6001600160a01b038316600081815260fb602090815260408083205460fc8352928190205481519485529184019290925282820152517f6f4864c954777b623ffcb477ee1875e76a6345a6ca1588bcc781048e8674e5ee9181900360600190a1505050565b600054610100900460ff168061066a575060005460ff16155b6106865760405162461bcd60e51b815260040161046290611317565b600054610100900460ff161580156106a8576000805461ffff19166101011790555b6106b184610a23565b6106c960008051602061142383398151915284610aa8565b6106e160008051602061142383398151915283610aa8565b80156106f3576000805461ff00191690555b50505050565b60008281526065602052604090206001015461071581336103e2565b6103f18383610809565b61072982826104b5565b61047557610741816001600160a01b03166014610ab2565b61074c836020610ab2565b60405160200161075d92919061126f565b60408051601f198184030181529082905262461bcd60e51b8252610462916004016112e4565b61078d82826104b5565b6104755760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556107c53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61081382826104b5565b156104755760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361047581336103e2565b60006108ce7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506108d984610c9b565b6000835111806108e65750815b156108f7576108f58484610d40565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610a1c57805460ff191660011781556040516001600160a01b038316602482015261097690869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052610d40565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b03838116911614610a135760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610462565b610a1c85610e2b565b5050505050565b600054610100900460ff1680610a3c575060005460ff16155b610a585760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610a7a576000805461ffff19166101011790555b610a82610e6b565b610a8a610eee565b610a9382610f4c565b8015610475576000805461ff00191690555050565b6104758282610783565b60606000610ac183600261137d565b610acc906002611365565b67ffffffffffffffff811115610af257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610b1c576020820181803683370190505b509050600360fc1b81600081518110610b4557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610b8257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610ba684600261137d565b610bb1906001611365565b90505b6001811115610c45576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610bf357634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110610c1757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93610c3e816113df565b9050610bb4565b508315610c945760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610462565b9392505050565b803b610cff5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610462565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b610d9f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610462565b600080846001600160a01b031684604051610dba9190611253565b600060405180830381855af49150503d8060008114610df5576040519150601f19603f3d011682016040523d82523d6000602084013e610dfa565b606091505b5091509150610e22828260405180606001604052806027815260200161144360279139611015565b95945050505050565b610e3481610c9b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680610e84575060005460ff16155b610ea05760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610ec2576000805461ffff19166101011790555b610eca61104e565b610ed261104e565b610eda61104e565b801561049d576000805461ff001916905550565b600054610100900460ff1680610f07575060005460ff16155b610f235760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610eca576000805461ffff1916610101179055610ed261104e565b600054610100900460ff1680610f65575060005460ff16155b610f815760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610fa3576000805461ffff19166101011790555b6001600160a01b038216610fb657600080fd5b610fc1600083610aa8565b610feb7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610aa8565b610a937f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383610aa8565b60608315611024575081610c94565b8251156110345782518084602001fd5b8160405162461bcd60e51b815260040161046291906112e4565b600054610100900460ff1680611067575060005460ff16155b6110835760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610eda576000805461ffff1916610101179055801561049d576000805461ff001916905550565b80356001600160a01b03811681146103c557600080fd5b6000602082840312156110e0578081fd5b610c94826110b8565b6000806000606084860312156110fd578182fd5b611106846110b8565b9250611114602085016110b8565b9150611122604085016110b8565b90509250925092565b6000806040838503121561113d578182fd5b611146836110b8565b9150602083013567ffffffffffffffff80821115611162578283fd5b818501915085601f830112611175578283fd5b8135818111156111875761118761140c565b604051601f8201601f19908116603f011681019083821181831017156111af576111af61140c565b816040528281528860208487010111156111c7578586fd5b82602086016020830137856020848301015280955050505050509250929050565b6000602082840312156111f9578081fd5b5035919050565b60008060408385031215611212578182fd5b82359150611222602084016110b8565b90509250929050565b60006020828403121561123c578081fd5b81356001600160e01b031981168114610c94578182fd5b600082516112658184602087016113b3565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516112a78160178501602088016113b3565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516112d88160288401602088016113b3565b01602801949350505050565b60006020825282518060208401526113038160408501602087016113b3565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115611378576113786113f6565b500190565b6000816000190483118215151615611397576113976113f6565b500290565b6000828210156113ae576113ae6113f6565b500390565b60005b838110156113ce5781810151838201526020016113b6565b838111156106f35750506000910152565b6000816113ee576113ee6113f6565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfefbb0a55d3bd620b175b4b5ed8e54b15ee857894bb1d3baf3b9219271d425d7f9416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c3ce78d167fc465a7b455d7d930fadb0a7bcf261567cf9417feb06f7fb1f03d164736f6c63430008030033", + "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." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "GEMS ", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/GEMS.sol:GEMS", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/GEMS.sol:GEMS", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/GEMS.sol:GEMS", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/GEMS.sol:GEMS", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/GEMS.sol:GEMS", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/GEMS.sol:GEMS", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/GEMS.sol:GEMS", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/GEMS.sol:GEMS", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 10544, + "contract": "contracts/GEMS.sol:GEMS", + "label": "gems", + "offset": 0, + "slot": "251", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 10548, + "contract": "contracts/GEMS.sol:GEMS", + "label": "streak", + "offset": 0, + "slot": "252", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 10552, + "contract": "contracts/GEMS.sol:GEMS", + "label": "lastAction", + "offset": 0, + "slot": "253", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/GEMS.sol:GEMS", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/GEMS.sol:GEMS", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/GEMS_Proxy.json b/deployments/mumbai/GEMS_Proxy.json new file mode 100644 index 0000000..6c10c7c --- /dev/null +++ b/deployments/mumbai/GEMS_Proxy.json @@ -0,0 +1,147 @@ +{ + "address": "0xD28789C4563d70B42226C2AFcc13bF3386a449A2", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xba9d10e95a97da9c5816408de9bb3f8889a3ae2b147b75adf9af66eb44212ecd", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xD28789C4563d70B42226C2AFcc13bF3386a449A2", + "transactionIndex": 4, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000410000000000000000000000000000000000000800000000000000000000000000008000002000000000000000000000000000000000000000000000000002800000000000000000040100000000000000000000000000000000020000000000000000000000000080000008000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000002004000000020000000000001000000000000000000000000008000500000020000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x5a20f5f2db82e18c3e1899c1a675dea2ea2ecc7c28c138e3bf08f02d947b0832", + "transactionHash": "0xba9d10e95a97da9c5816408de9bb3f8889a3ae2b147b75adf9af66eb44212ecd", + "logs": [ + { + "transactionIndex": 4, + "blockNumber": 18868825, + "transactionHash": "0xba9d10e95a97da9c5816408de9bb3f8889a3ae2b147b75adf9af66eb44212ecd", + "address": "0xD28789C4563d70B42226C2AFcc13bF3386a449A2", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000004a6727d2170bee6d51aee2d36a8aa9879d417def" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0x5a20f5f2db82e18c3e1899c1a675dea2ea2ecc7c28c138e3bf08f02d947b0832" + }, + { + "transactionIndex": 4, + "blockNumber": 18868825, + "transactionHash": "0xba9d10e95a97da9c5816408de9bb3f8889a3ae2b147b75adf9af66eb44212ecd", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000002a41c347bf60000000000000000000000000000000000000000000000000008b44d64d600cccd000000000000000000000000000000000000000000000168e529a7768d8f02a300000000000000000000000000000000000000000000000008b1a948a184d6cd000000000000000000000000000000000000000000000168e52c4b92c20af8a3", + "logIndex": 10, + "blockHash": "0x5a20f5f2db82e18c3e1899c1a675dea2ea2ecc7c28c138e3bf08f02d947b0832" + } + ], + "blockNumber": 18868825, + "cumulativeGasUsed": "490181", + "status": 1, + "byzantium": true + }, + "args": [ + "0x4a6727d2170beE6D51AeE2d36a8Aa9879D417DEf", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/LongShort.json b/deployments/mumbai/LongShort.json new file mode 100644 index 0000000..b04242f --- /dev/null +++ b/deployments/mumbai/LongShort.json @@ -0,0 +1,1650 @@ +{ + "address": "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + } + ], + "name": "ExecuteNextPriceSettlementsUser", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "tokenFactory", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "staker", + "type": "address" + } + ], + "name": "LongShortV1", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "initialSeed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "marketLeverage", + "type": "uint256" + } + ], + "name": "NewMarketLaunchedAndSeeded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositAdded", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oracleUpdateIndex", + "type": "uint256" + } + ], + "name": "NextPriceDeposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "synthRedeemed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oracleUpdateIndex", + "type": "uint256" + } + ], + "name": "NextPriceRedeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "synthShifted", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oracleUpdateIndex", + "type": "uint256" + } + ], + "name": "NextPriceSyntheticPositionShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldOracleAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOracleAddress", + "type": "address" + } + ], + "name": "OracleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "longTokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "shortTokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "paymentToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "int256", + "name": "initialAssetPrice", + "type": "int256" + }, + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "oracleAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "yieldManagerAddress", + "type": "address" + } + ], + "name": "SyntheticMarketCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "updateIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "underlyingAssetPrice", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "longValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shortValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "longPrice", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shortPrice", + "type": "uint256" + } + ], + "name": "SystemStateUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMANENT_INITIAL_LIQUIDITY_HOLDER", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "assetPrice", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "batched_amountPaymentToken_deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "batched_amountSyntheticToken_redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "batched_amountSyntheticToken_toShiftAwayFrom_marketSide", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_marketTreasurySplitGradient_e18", + "type": "uint256" + } + ], + "name": "changeMarketTreasurySplitGradient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "syntheticName", + "type": "string" + }, + { + "internalType": "string", + "name": "syntheticSymbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_oracleManager", + "type": "address" + }, + { + "internalType": "address", + "name": "_yieldManager", + "type": "address" + } + ], + "name": "createNewSyntheticMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "syntheticName", + "type": "string" + }, + { + "internalType": "string", + "name": "syntheticSymbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_shortToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_oracleManager", + "type": "address" + }, + { + "internalType": "address", + "name": "_yieldManager", + "type": "address" + } + ], + "name": "createNewSyntheticMarketExternalSyntheticTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + } + ], + "name": "executeOutstandingNextPriceSettlementsUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + } + ], + "name": "executeOutstandingNextPriceSettlementsUserMulti", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gems", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticToken_redeemOnOriginSide", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "priceSnapshotIndex", + "type": "uint256" + } + ], + "name": "getAmountSyntheticTokenToMintOnTargetSide", + "outputs": [ + { + "internalType": "uint256", + "name": "amountSyntheticTokensToMintOnTargetSide", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + } + ], + "name": "getUsersConfirmedButNotSettledSynthBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "confirmedButNotSettledBalance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "address", + "name": "_gems", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "kInitialMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "unstakeFee_e18", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialMarketSeedForEachMarketSide", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balanceIncentiveCurve_exponent", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "_marketTreasurySplitGradient_e18", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "marketLeverage", + "type": "uint256" + } + ], + "name": "initializeMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "latestMarket", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketExists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketLeverage_e18", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "marketSideValueInPaymentToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketTreasurySplitGradient_e18", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketUpdateIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mintLongNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mintShortNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "oracleManagers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "paymentTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "redeemLongNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "redeemShortNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + } + ], + "name": "shiftPositionFromLongNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + } + ], + "name": "shiftPositionFromShortNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + } + ], + "name": "shiftPositionNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "syntheticToken_priceSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "syntheticTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenFactory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_newOracleManager", + "type": "address" + } + ], + "name": "updateMarketOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + } + ], + "name": "updateSystemState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + } + ], + "name": "updateSystemStateMulti", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_currentUpdateIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_paymentToken_depositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_syntheticToken_redeemAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_syntheticToken_toShiftAwayFrom_marketSide", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "yieldManagers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x41e573a052c097340fd3ab32c8263f323a0e1f04b1d2ba75f631f72d5580dd01", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "transactionIndex": 3, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000410000000000000000000000000000000000040000000000000000000000010000008000002010000000000000000000000000000000000000000000000002800000000000000000040100000000000000000000000000000000000000000000000000000000000080000000000000000000040000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000000004000000020000000000001000000000000000000000000008000500200000000000000400000000000000000000000000000000000000000000000000000100000", + "blockHash": "0xf846a0e2f7dddf40c460353e23dfe32ec88cfa486e2cf68011df28975196b521", + "transactionHash": "0x41e573a052c097340fd3ab32c8263f323a0e1f04b1d2ba75f631f72d5580dd01", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 18868848, + "transactionHash": "0x41e573a052c097340fd3ab32c8263f323a0e1f04b1d2ba75f631f72d5580dd01", + "address": "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000018e94eb6e6c35e2827386646ee2b53ea1eceac73" + ], + "data": "0x", + "logIndex": 10, + "blockHash": "0xf846a0e2f7dddf40c460353e23dfe32ec88cfa486e2cf68011df28975196b521" + }, + { + "transactionIndex": 3, + "blockNumber": 18868848, + "transactionHash": "0x41e573a052c097340fd3ab32c8263f323a0e1f04b1d2ba75f631f72d5580dd01", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000002a41c347bf6000000000000000000000000000000000000000000000000000824fae5db01becd000000000000000000000000000000000000000000000168e6dda93298cdf4a3000000000000000000000000000000000000000000000000082256c9a685c8cd000000000000000000000000000000000000000000000168e6e04d4ecd49eaa3", + "logIndex": 11, + "blockHash": "0xf846a0e2f7dddf40c460353e23dfe32ec88cfa486e2cf68011df28975196b521" + } + ], + "blockNumber": 18868848, + "cumulativeGasUsed": "1827159", + "status": 1, + "byzantium": true + }, + "args": [ + "0x18e94eb6E6C35E2827386646ee2b53eA1ECeAC73", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "implementation": "0x18e94eb6E6C35E2827386646ee2b53eA1ECeAC73", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/LongShort_Implementation.json b/deployments/mumbai/LongShort_Implementation.json new file mode 100644 index 0000000..48f3938 --- /dev/null +++ b/deployments/mumbai/LongShort_Implementation.json @@ -0,0 +1,2307 @@ +{ + "address": "0x18e94eb6E6C35E2827386646ee2b53eA1ECeAC73", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + } + ], + "name": "ExecuteNextPriceSettlementsUser", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "tokenFactory", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "staker", + "type": "address" + } + ], + "name": "LongShortV1", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "initialSeed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "marketLeverage", + "type": "uint256" + } + ], + "name": "NewMarketLaunchedAndSeeded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositAdded", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oracleUpdateIndex", + "type": "uint256" + } + ], + "name": "NextPriceDeposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "synthRedeemed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oracleUpdateIndex", + "type": "uint256" + } + ], + "name": "NextPriceRedeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "synthShifted", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oracleUpdateIndex", + "type": "uint256" + } + ], + "name": "NextPriceSyntheticPositionShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldOracleAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOracleAddress", + "type": "address" + } + ], + "name": "OracleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "longTokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "shortTokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "paymentToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "int256", + "name": "initialAssetPrice", + "type": "int256" + }, + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "oracleAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "yieldManagerAddress", + "type": "address" + } + ], + "name": "SyntheticMarketCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "updateIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "underlyingAssetPrice", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "longValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shortValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "longPrice", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shortPrice", + "type": "uint256" + } + ], + "name": "SystemStateUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMANENT_INITIAL_LIQUIDITY_HOLDER", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "assetPrice", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "batched_amountPaymentToken_deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "batched_amountSyntheticToken_redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "batched_amountSyntheticToken_toShiftAwayFrom_marketSide", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_marketTreasurySplitGradient_e18", + "type": "uint256" + } + ], + "name": "changeMarketTreasurySplitGradient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "syntheticName", + "type": "string" + }, + { + "internalType": "string", + "name": "syntheticSymbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_oracleManager", + "type": "address" + }, + { + "internalType": "address", + "name": "_yieldManager", + "type": "address" + } + ], + "name": "createNewSyntheticMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "syntheticName", + "type": "string" + }, + { + "internalType": "string", + "name": "syntheticSymbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_shortToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_oracleManager", + "type": "address" + }, + { + "internalType": "address", + "name": "_yieldManager", + "type": "address" + } + ], + "name": "createNewSyntheticMarketExternalSyntheticTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + } + ], + "name": "executeOutstandingNextPriceSettlementsUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + } + ], + "name": "executeOutstandingNextPriceSettlementsUserMulti", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gems", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticToken_redeemOnOriginSide", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "priceSnapshotIndex", + "type": "uint256" + } + ], + "name": "getAmountSyntheticTokenToMintOnTargetSide", + "outputs": [ + { + "internalType": "uint256", + "name": "amountSyntheticTokensToMintOnTargetSide", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + } + ], + "name": "getUsersConfirmedButNotSettledSynthBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "confirmedButNotSettledBalance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "address", + "name": "_gems", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "kInitialMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "unstakeFee_e18", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialMarketSeedForEachMarketSide", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balanceIncentiveCurve_exponent", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "_marketTreasurySplitGradient_e18", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "marketLeverage", + "type": "uint256" + } + ], + "name": "initializeMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "latestMarket", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketExists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketLeverage_e18", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "marketSideValueInPaymentToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketTreasurySplitGradient_e18", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketUpdateIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mintLongNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mintShortNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "oracleManagers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "paymentTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "redeemLongNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "redeemShortNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + } + ], + "name": "shiftPositionFromLongNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + } + ], + "name": "shiftPositionFromShortNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + } + ], + "name": "shiftPositionNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "syntheticToken_priceSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "syntheticTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenFactory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_newOracleManager", + "type": "address" + } + ], + "name": "updateMarketOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + } + ], + "name": "updateSystemState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + } + ], + "name": "updateSystemStateMulti", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_currentUpdateIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_paymentToken_depositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_syntheticToken_redeemAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_syntheticToken_toShiftAwayFrom_marketSide", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "yieldManagers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xbf04acfdb8805b8d71c068bdf838f3421e73a2dc9b80db0ff5fa4f1d32d6ca8f", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x18e94eb6E6C35E2827386646ee2b53eA1ECeAC73", + "transactionIndex": 0, + "gasUsed": "4367611", + "logsBloom": "0x00000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x4f6f3bf738eff6f148915ed5ecbf9fadfc55c279577c214e383e75fb6dfacc8f", + "transactionHash": "0xbf04acfdb8805b8d71c068bdf838f3421e73a2dc9b80db0ff5fa4f1d32d6ca8f", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18868844, + "transactionHash": "0xbf04acfdb8805b8d71c068bdf838f3421e73a2dc9b80db0ff5fa4f1d32d6ca8f", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x000000000000000000000000000000000000000000000000002e8cf50a842a00000000000000000000000000000000000000000000000000085387dae585e8cd000000000000000000000000000000000000000000000168e5f26e223b601aa30000000000000000000000000000000000000000000000000824fae5db01becd000000000000000000000000000000000000000000000168e620fb1745e444a3", + "logIndex": 0, + "blockHash": "0x4f6f3bf738eff6f148915ed5ecbf9fadfc55c279577c214e383e75fb6dfacc8f" + } + ], + "blockNumber": 18868844, + "cumulativeGasUsed": "4367611", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"}],\"name\":\"ExecuteNextPriceSettlementsUser\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenFactory\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"LongShortV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialSeed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"marketLeverage\",\"type\":\"uint256\"}],\"name\":\"NewMarketLaunchedAndSeeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isLong\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositAdded\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oracleUpdateIndex\",\"type\":\"uint256\"}],\"name\":\"NextPriceDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isLong\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"synthRedeemed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oracleUpdateIndex\",\"type\":\"uint256\"}],\"name\":\"NextPriceRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isShiftFromLong\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"synthShifted\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oracleUpdateIndex\",\"type\":\"uint256\"}],\"name\":\"NextPriceSyntheticPositionShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldOracleAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOracleAddress\",\"type\":\"address\"}],\"name\":\"OracleUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"longTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"shortTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"paymentToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"initialAssetPrice\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oracleAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"yieldManagerAddress\",\"type\":\"address\"}],\"name\":\"SyntheticMarketCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"updateIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"underlyingAssetPrice\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"longValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shortValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"longPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shortPrice\",\"type\":\"uint256\"}],\"name\":\"SystemStateUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMANENT_INITIAL_LIQUIDITY_HOLDER\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"assetPrice\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"batched_amountPaymentToken_deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"batched_amountSyntheticToken_redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"batched_amountSyntheticToken_toShiftAwayFrom_marketSide\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_marketTreasurySplitGradient_e18\",\"type\":\"uint256\"}],\"name\":\"changeMarketTreasurySplitGradient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"syntheticName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"syntheticSymbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_paymentToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oracleManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_yieldManager\",\"type\":\"address\"}],\"name\":\"createNewSyntheticMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"syntheticName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"syntheticSymbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_longToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_shortToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_paymentToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oracleManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_yieldManager\",\"type\":\"address\"}],\"name\":\"createNewSyntheticMarketExternalSyntheticTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"}],\"name\":\"executeOutstandingNextPriceSettlementsUser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint32[]\",\"name\":\"marketIndexes\",\"type\":\"uint32[]\"}],\"name\":\"executeOutstandingNextPriceSettlementsUserMulti\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gems\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amountSyntheticToken_redeemOnOriginSide\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isShiftFromLong\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"priceSnapshotIndex\",\"type\":\"uint256\"}],\"name\":\"getAmountSyntheticTokenToMintOnTargetSide\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountSyntheticTokensToMintOnTargetSide\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isLong\",\"type\":\"bool\"}],\"name\":\"getUsersConfirmedButNotSettledSynthBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"confirmedButNotSettledBalance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenFactory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gems\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"kInitialMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeFee_e18\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initialMarketSeedForEachMarketSide\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balanceIncentiveCurve_exponent\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"balanceIncentiveCurve_equilibriumOffset\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"_marketTreasurySplitGradient_e18\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"marketLeverage\",\"type\":\"uint256\"}],\"name\":\"initializeMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestMarket\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketLeverage_e18\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"marketSideValueInPaymentToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketTreasurySplitGradient_e18\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketUpdateIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mintLongNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mintShortNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"oracleManagers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"paymentTokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"tokens_redeem\",\"type\":\"uint256\"}],\"name\":\"redeemLongNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"tokens_redeem\",\"type\":\"uint256\"}],\"name\":\"redeemShortNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amountSyntheticTokensToShift\",\"type\":\"uint256\"}],\"name\":\"shiftPositionFromLongNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amountSyntheticTokensToShift\",\"type\":\"uint256\"}],\"name\":\"shiftPositionFromShortNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amountSyntheticTokensToShift\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isShiftFromLong\",\"type\":\"bool\"}],\"name\":\"shiftPositionNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staker\",\"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\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"syntheticToken_priceSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"syntheticTokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_newOracleManager\",\"type\":\"address\"}],\"name\":\"updateMarketOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"}],\"name\":\"updateSystemState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"marketIndexes\",\"type\":\"uint32[]\"}],\"name\":\"updateSystemStateMulti\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_currentUpdateIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_paymentToken_depositAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_syntheticToken_redeemAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_syntheticToken_toShiftAwayFrom_marketSide\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"yieldManagers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"float.capital\",\"custom:auditors\":\"This contract balances long and short sides.\",\"details\":\"All functions in this file are currently `virtual`. This is NOT to encourage inheritance. It is merely for convenince when unit testing.\",\"kind\":\"dev\",\"methods\":{\"createNewSyntheticMarket(string,string,address,address,address)\":{\"details\":\"This does not make the market active. The `initializeMarket` function was split out separately to this function to reduce costs.\",\"params\":{\"_oracleManager\":\"The address of the oracle manager that provides the price feed for this market\",\"_paymentToken\":\"The address of the erc20 token used to buy this synthetic asset this will likely always be DAI\",\"_yieldManager\":\"The contract that manages depositing the paymentToken into a yield bearing protocol\",\"syntheticName\":\"Name of the synthetic asset\",\"syntheticSymbol\":\"Symbol for the synthetic asset\"}},\"createNewSyntheticMarketExternalSyntheticTokens(string,string,address,address,address,address,address)\":{\"details\":\"This does not make the market active. The `initializeMarket` function was split out separately to this function to reduce costs.\",\"params\":{\"_longToken\":\"Address for the long token.\",\"_oracleManager\":\"The address of the oracle manager that provides the price feed for this market\",\"_paymentToken\":\"The address of the erc20 token used to buy this synthetic asset this will likely always be DAI\",\"_shortToken\":\"Address for the short token.\",\"_yieldManager\":\"The contract that manages depositing the paymentToken into a yield bearing protocol\",\"syntheticName\":\"Name of the synthetic asset\",\"syntheticSymbol\":\"Symbol for the synthetic asset\"}},\"executeOutstandingNextPriceSettlementsUser(address,uint32)\":{\"params\":{\"marketIndex\":\"An uint32 which uniquely identifies a market.\",\"user\":\"The address of the user for whom to execute the function.\"}},\"executeOutstandingNextPriceSettlementsUserMulti(address,uint32[])\":{\"params\":{\"marketIndexes\":\"An array of int32s which each uniquely identify a market.\",\"user\":\"The address of the user for whom to execute the function.\"}},\"getAmountSyntheticTokenToMintOnTargetSide(uint32,uint256,bool,uint256)\":{\"details\":\"Intended for use primarily by Staker.sol\",\"params\":{\"amountSyntheticToken_redeemOnOriginSide\":\"Amount of synth token in wei.\",\"isShiftFromLong\":\"Whether the token shift is from long to short (true), or short to long (false).\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\",\"priceSnapshotIndex\":\"Index which identifies which synth prices to use.\"},\"returns\":{\"amountSyntheticTokensToMintOnTargetSide\":\"The amount in wei of tokens for the other side that the shift was worth.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getUsersConfirmedButNotSettledSynthBalance(address,uint32,bool)\":{\"details\":\"Used in SyntheticToken.sol balanceOf to allow for automatic reflection of next price actions.\",\"params\":{\"isLong\":\"Whether it is for the long synthetic asset or the short synthetic asset.\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\",\"user\":\"The address of the user for whom to execute the function for.\"},\"returns\":{\"confirmedButNotSettledBalance\":\"The amount in wei of tokens that the user is owed.\"}},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address,address)\":{\"details\":\"Calls OpenZeppelin's initializer modifier.\",\"params\":{\"_admin\":\"Address of the admin role.\",\"_staker\":\"Address of the contract which handles synthetic asset stakes.\",\"_tokenFactory\":\"Address of the contract which creates synthetic asset tokens.\"}},\"initializeMarket(uint32,uint256,uint256,uint256,uint256,uint256,int256,uint256,uint256)\":{\"details\":\"Seperated from createNewSyntheticMarket due to gas considerations.\",\"params\":{\"balanceIncentiveCurve_equilibriumOffset\":\"An offset to account for naturally imbalanced markets when Float token issuance should differ for market sides. See Staker.sol\",\"balanceIncentiveCurve_exponent\":\"Sets the degree to which Float token issuance differs for market sides in unbalanced markets. See Staker.sol\",\"initialMarketSeedForEachMarketSide\":\"Amount of payment token that will be deposited in each market side to seed the market.\",\"kInitialMultiplier\":\"Linearly decreasing multiplier for Float token issuance for the market when staking synths.\",\"kPeriod\":\"Time which kInitialMultiplier will last\",\"marketIndex\":\"An int32 which uniquely identifies the market.\",\"unstakeFee_e18\":\"Base 1e18 percentage fee levied when unstaking for the market.\"}},\"mintLongNextPrice(uint32,uint256)\":{\"params\":{\"amount\":\"Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"mintShortNextPrice(uint32,uint256)\":{\"params\":{\"amount\":\"Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"redeemLongNextPrice(uint32,uint256)\":{\"params\":{\"marketIndex\":\"An uint32 which uniquely identifies a market.\",\"tokens_redeem\":\"Amount in wei of synth tokens to redeem at the next oracle price.\"}},\"redeemShortNextPrice(uint32,uint256)\":{\"params\":{\"marketIndex\":\"An uint32 which uniquely identifies a market.\",\"tokens_redeem\":\"Amount in wei of synth tokens to redeem at the next oracle price.\"}},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"shiftPositionFromLongNextPrice(uint32,uint256)\":{\"params\":{\"amountSyntheticTokensToShift\":\"Amount in wei of synthetic tokens to shift from long to short the next oracle price update.\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"shiftPositionFromShortNextPrice(uint32,uint256)\":{\"params\":{\"amountSyntheticTokensToShift\":\"Amount in wei of synthetic tokens to shift from the short to long at the next oracle price update.\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"shiftPositionNextPrice(uint32,uint256,bool)\":{\"details\":\"Called by external functions to shift either way. Intended for primary use by Staker.sol\",\"params\":{\"amountSyntheticTokensToShift\":\"Amount in wei of synthetic tokens to shift from the one side to the other at the next oracle price update.\",\"isShiftFromLong\":\"Whether the token shift is from long to short (true), or short to long (false).\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"updateMarketOracle(uint32,address)\":{\"details\":\"Can only be called by the current admin.\",\"params\":{\"_newOracleManager\":\"Address of the replacement oracle manager.\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"updateSystemState(uint32)\":{\"params\":{\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"updateSystemStateMulti(uint32[])\":{\"params\":{\"marketIndexes\":\"An array of int32s which uniquely identify markets.\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"stateVariables\":{\"PERMANENT_INITIAL_LIQUIDITY_HOLDER\":{\"details\":\"f10a7 spells float in hex - for fun - important part is that the private key for this address in not known.\"},\"__constantsGap\":{\"details\":\"an empty allocation of storage for use in future upgrades - inspiration from OZ: https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/10f0f1a95b1b0fd5520351886bae7a03490f1056/contracts/token/ERC20/ERC20Upgradeable.sol#L361\"}},\"title\":\"Core logic of Float Protocal markets\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"PERMANENT_INITIAL_LIQUIDITY_HOLDER()\":{\"notice\":\"this is the address that permanently locked initial liquidity for markets is held by. These tokens will never move so market can never have zero liquidity on a side.\"},\"changeMarketTreasurySplitGradient(uint32,uint256)\":{\"notice\":\"changes the gradient of the line for determining the yield split between market and treasury.\"},\"createNewSyntheticMarket(string,string,address,address,address)\":{\"notice\":\"Creates an entirely new long/short market tracking an underlying oracle price. Make sure the synthetic names/symbols are unique.\"},\"createNewSyntheticMarketExternalSyntheticTokens(string,string,address,address,address,address,address)\":{\"notice\":\"Creates an entirely new long/short market tracking an underlying oracle price. Uses already created synthetic tokens.\"},\"executeOutstandingNextPriceSettlementsUser(address,uint32)\":{\"notice\":\"After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user.\"},\"executeOutstandingNextPriceSettlementsUserMulti(address,uint32[])\":{\"notice\":\"Executes outstanding next price settlements for a user for multiple markets.\"},\"getAmountSyntheticTokenToMintOnTargetSide(uint32,uint256,bool,uint256)\":{\"notice\":\"Given an executed next price shift from tokens on one market side to the other, determines how many other side tokens the shift was worth.\"},\"getUsersConfirmedButNotSettledSynthBalance(address,uint32,bool)\":{\"notice\":\"The amount of a synth token a user is owed following a batch execution. 4 possible states for next price actions: - \\\"Pending\\\" - means the next price update hasn't happened or been enacted on by the updateSystemState function. - \\\"Confirmed\\\" - means the next price has been updated by the updateSystemState function. There is still - outstanding (lazy) computation that needs to be executed per user in the batch. - \\\"Settled\\\" - there is no more computation left for the user. - \\\"Non-existent\\\" - user has no next price actions. This function returns a calculated value only in the case of 'confirmed' next price actions. It should return zero for all other types of next price actions.\"},\"initialize(address,address,address,address)\":{\"notice\":\"Initializes the contract.\"},\"initializeMarket(uint32,uint256,uint256,uint256,uint256,uint256,int256,uint256,uint256)\":{\"notice\":\"Sets a market as active once it has already been setup by createNewSyntheticMarket.\"},\"mintLongNextPrice(uint32,uint256)\":{\"notice\":\"Allows users to mint long synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\"},\"mintShortNextPrice(uint32,uint256)\":{\"notice\":\"Allows users to mint short synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\"},\"redeemLongNextPrice(uint32,uint256)\":{\"notice\":\"Allows users to redeem long synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle.\"},\"redeemShortNextPrice(uint32,uint256)\":{\"notice\":\"Allows users to redeem short synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle.\"},\"shiftPositionFromLongNextPrice(uint32,uint256)\":{\"notice\":\"Allows users to shift their position from long to short in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\"},\"shiftPositionFromShortNextPrice(uint32,uint256)\":{\"notice\":\"Allows users to shift their position from short to long in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\"},\"shiftPositionNextPrice(uint32,uint256,bool)\":{\"notice\":\"Allows users to shift their position from one side of the market to the other in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\"},\"syntheticToken_priceSnapshot(uint32,bool,uint256)\":{\"notice\":\"synthetic token prices of a given market of a (long/short) at every previous price update\"},\"updateMarketOracle(uint32,address)\":{\"notice\":\"Update oracle for a market\"},\"updateSystemState(uint32)\":{\"notice\":\"Updates the state of a market to account for the latest oracle price update.\"},\"updateSystemStateMulti(uint32[])\":{\"notice\":\"Updates the state of multiples markets to account for their latest oracle price updates.\"}},\"notice\":\"visit https://float.capital for more info\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LongShort.sol\":\"LongShort\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x02348b2e4b9f3200c7e3907c5c2661643a6d8520e9f79939fbb9b4005a54894d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 / b + (a % b == 0 ? 0 : 1);\\n }\\n}\\n\",\"keccak256\":\"0x49ebdac5d515aebb95168564158940b79d7d5d12fbfe59cec546a00d57fee64a\",\"license\":\"MIT\"},\"contracts/GEMS.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\n/** Contract giving user GEMS*/\\n\\n// Inspired by https://github.com/andrecronje/rarity/blob/main/rarity.sol\\n\\n/** @title GEMS */\\ncontract GEMS is AccessControlledAndUpgradeable {\\n bytes32 public constant GEM_ROLE = keccak256(\\\"GEM_ROLE\\\");\\n\\n uint256 constant gems_per_day = 250e18;\\n uint256 constant DAY = 1 days;\\n\\n mapping(address => uint256) public gems;\\n mapping(address => uint256) public streak;\\n mapping(address => uint256) public lastAction;\\n\\n event GemsCollected(address user, uint256 gems, uint256 streak);\\n\\n function initialize(\\n address _admin,\\n address _longShort,\\n address _staker\\n ) external initializer {\\n _AccessControlledAndUpgradeable_init(_admin);\\n _setupRole(GEM_ROLE, _longShort);\\n _setupRole(GEM_ROLE, _staker);\\n }\\n\\n // Say gm and get gems by performing an action in LongShort or Staker\\n function gm(address user) external {\\n if (hasRole(GEM_ROLE, msg.sender)) {\\n uint256 usersLastAction = lastAction[user];\\n uint256 blocktimestamp = block.timestamp;\\n\\n if (blocktimestamp - usersLastAction >= DAY) {\\n // Award gems\\n gems[user] += gems_per_day;\\n\\n // Increment streak\\n if (blocktimestamp - usersLastAction < 2 * DAY) {\\n streak[user] += 1;\\n } else {\\n streak[user] = 1; // reset streak to 1\\n }\\n\\n lastAction[user] = blocktimestamp;\\n }\\n emit GemsCollected(user, gems[user], streak[user]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0335305655aa936242355a082737ca1d3e819d38601a0bf3b1672158591e2abd\",\"license\":\"BUSL-1.1\"},\"contracts/LongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"./interfaces/ITokenFactory.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/IYieldManager.sol\\\";\\nimport \\\"./interfaces/IOracleManager.sol\\\";\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\nimport \\\"./GEMS.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\n/**\\n **** visit https://float.capital *****\\n */\\n\\n/// @title Core logic of Float Protocal markets\\n/// @author float.capital\\n/// @notice visit https://float.capital for more info\\n/// @dev All functions in this file are currently `virtual`. This is NOT to encourage inheritance.\\n/// It is merely for convenince when unit testing.\\n/// @custom:auditors This contract balances long and short sides.\\ncontract LongShort is ILongShort, AccessControlledAndUpgradeable {\\n //Using Open Zeppelin safe transfer library for token transfers\\n using SafeERC20 for IERC20;\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 VARIABLES \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Fixed-precision constants \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n /// @notice this is the address that permanently locked initial liquidity for markets is held by.\\n /// These tokens will never move so market can never have zero liquidity on a side.\\n /// @dev f10a7 spells float in hex - for fun - important part is that the private key for this address in not known.\\n address public constant PERMANENT_INITIAL_LIQUIDITY_HOLDER =\\n 0xf10A7_F10A7_f10A7_F10a7_F10A7_f10a7_F10A7_f10a7;\\n\\n /// @dev an empty allocation of storage for use in future upgrades - inspiration from OZ:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/10f0f1a95b1b0fd5520351886bae7a03490f1056/contracts/token/ERC20/ERC20Upgradeable.sol#L361\\n uint256[45] private __constantsGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Global state \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n uint32 public latestMarket;\\n\\n address public staker;\\n address public tokenFactory;\\n address public gems;\\n\\n uint256[45] private __globalStateGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Market specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n mapping(uint32 => bool) public marketExists;\\n\\n mapping(uint32 => int256) public assetPrice;\\n mapping(uint32 => uint256) public override marketUpdateIndex;\\n mapping(uint32 => uint256) public marketTreasurySplitGradient_e18;\\n mapping(uint32 => uint256) public marketLeverage_e18;\\n\\n mapping(uint32 => address) public paymentTokens;\\n mapping(uint32 => address) public yieldManagers;\\n mapping(uint32 => address) public oracleManagers;\\n uint256[45] private __marketStateGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Market + position (long/short) specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n mapping(uint32 => mapping(bool => address)) public override syntheticTokens;\\n mapping(uint32 => mapping(bool => uint256)) public override marketSideValueInPaymentToken;\\n\\n /// @notice synthetic token prices of a given market of a (long/short) at every previous price update\\n mapping(uint32 => mapping(bool => mapping(uint256 => uint256)))\\n public\\n override syntheticToken_priceSnapshot;\\n\\n mapping(uint32 => mapping(bool => uint256)) public batched_amountPaymentToken_deposit;\\n mapping(uint32 => mapping(bool => uint256)) public batched_amountSyntheticToken_redeem;\\n mapping(uint32 => mapping(bool => uint256))\\n public batched_amountSyntheticToken_toShiftAwayFrom_marketSide;\\n uint256[45] private __marketPositonStateGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 User specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n mapping(uint32 => mapping(address => uint256)) public userNextPrice_currentUpdateIndex;\\n\\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\\n public userNextPrice_paymentToken_depositAmount;\\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\\n public userNextPrice_syntheticToken_redeemAmount;\\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\\n public userNextPrice_syntheticToken_toShiftAwayFrom_marketSide;\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MODIFIERS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function adminOnlyModifierLogic() internal virtual {\\n _checkRole(ADMIN_ROLE, msg.sender);\\n }\\n\\n modifier adminOnly() {\\n adminOnlyModifierLogic();\\n _;\\n }\\n\\n function requireMarketExistsModifierLogic(uint32 marketIndex) internal view virtual {\\n require(marketExists[marketIndex], \\\"market doesn't exist\\\");\\n }\\n\\n modifier requireMarketExists(uint32 marketIndex) {\\n requireMarketExistsModifierLogic(marketIndex);\\n _;\\n }\\n\\n modifier updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(\\n address user,\\n uint32 marketIndex\\n ) {\\n _updateSystemStateInternal(marketIndex);\\n _executeOutstandingNextPriceSettlements(user, marketIndex);\\n _;\\n }\\n\\n function gemCollectingModifierLogic() internal virtual {\\n if (msg.sender != staker) {\\n GEMS(gems).gm(msg.sender);\\n }\\n }\\n\\n modifier gemCollecting() {\\n gemCollectingModifierLogic();\\n _;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 CONTRACT SET-UP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Initializes the contract.\\n /// @dev Calls OpenZeppelin's initializer modifier.\\n /// @param _admin Address of the admin role.\\n /// @param _tokenFactory Address of the contract which creates synthetic asset tokens.\\n /// @param _staker Address of the contract which handles synthetic asset stakes.\\n function initialize(\\n address _admin,\\n address _tokenFactory,\\n address _staker,\\n address _gems\\n ) external virtual initializer {\\n require(\\n _admin != address(0) &&\\n _tokenFactory != address(0) &&\\n _staker != address(0) &&\\n _gems != address(0)\\n );\\n _AccessControlledAndUpgradeable_init(_admin);\\n tokenFactory = _tokenFactory;\\n staker = _staker;\\n gems = _gems;\\n\\n emit LongShortV1(_admin, _tokenFactory, _staker);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 ADMIN \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Update oracle for a market\\n /// @dev Can only be called by the current admin.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param _newOracleManager Address of the replacement oracle manager.\\n function updateMarketOracle(uint32 marketIndex, address _newOracleManager) external adminOnly {\\n // If not a oracle contract this would break things.. Test's arn't validating this\\n // Ie require isOracle interface - ERC165\\n address previousOracleManager = oracleManagers[marketIndex];\\n oracleManagers[marketIndex] = _newOracleManager;\\n emit OracleUpdated(marketIndex, previousOracleManager, _newOracleManager);\\n }\\n\\n /// @notice changes the gradient of the line for determining the yield split between market and treasury.\\n function changeMarketTreasurySplitGradient(\\n uint32 marketIndex,\\n uint256 _marketTreasurySplitGradient_e18\\n ) external adminOnly {\\n marketTreasurySplitGradient_e18[marketIndex] = _marketTreasurySplitGradient_e18;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MARKET CREATION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Creates an entirely new long/short market tracking an underlying oracle price.\\n /// Make sure the synthetic names/symbols are unique.\\n /// @dev This does not make the market active.\\n /// The `initializeMarket` function was split out separately to this function to reduce costs.\\n /// @param syntheticName Name of the synthetic asset\\n /// @param syntheticSymbol Symbol for the synthetic asset\\n /// @param _paymentToken The address of the erc20 token used to buy this synthetic asset\\n /// this will likely always be DAI\\n /// @param _oracleManager The address of the oracle manager that provides the price feed for this market\\n /// @param _yieldManager The contract that manages depositing the paymentToken into a yield bearing protocol\\n function createNewSyntheticMarket(\\n string calldata syntheticName,\\n string calldata syntheticSymbol,\\n address _paymentToken,\\n address _oracleManager,\\n address _yieldManager\\n ) external adminOnly {\\n require(\\n _paymentToken != address(0) && _oracleManager != address(0) && _yieldManager != address(0)\\n );\\n\\n uint32 marketIndex = ++latestMarket;\\n address _staker = staker;\\n\\n // Ensure new markets don't use the same yield manager\\n IYieldManager(_yieldManager).initializeForMarket();\\n\\n // Create new synthetic long token.\\n syntheticTokens[marketIndex][true] = ITokenFactory(tokenFactory).createSyntheticToken(\\n string(abi.encodePacked(\\\"Float Long \\\", syntheticName)),\\n string(abi.encodePacked(\\\"fl\\\", syntheticSymbol)),\\n _staker,\\n marketIndex,\\n true\\n );\\n\\n // Create new synthetic short token.\\n syntheticTokens[marketIndex][false] = ITokenFactory(tokenFactory).createSyntheticToken(\\n string(abi.encodePacked(\\\"Float Short \\\", syntheticName)),\\n string(abi.encodePacked(\\\"fs\\\", syntheticSymbol)),\\n _staker,\\n marketIndex,\\n false\\n );\\n\\n // Initial market state.\\n paymentTokens[marketIndex] = _paymentToken;\\n yieldManagers[marketIndex] = _yieldManager;\\n oracleManagers[marketIndex] = _oracleManager;\\n assetPrice[marketIndex] = IOracleManager(oracleManagers[marketIndex]).updatePrice();\\n\\n emit SyntheticMarketCreated(\\n marketIndex,\\n syntheticTokens[marketIndex][true],\\n syntheticTokens[marketIndex][false],\\n _paymentToken,\\n assetPrice[marketIndex],\\n syntheticName,\\n syntheticSymbol,\\n _oracleManager,\\n _yieldManager\\n );\\n }\\n\\n /// @notice Creates an entirely new long/short market tracking an underlying oracle price.\\n /// Uses already created synthetic tokens.\\n /// @dev This does not make the market active.\\n /// The `initializeMarket` function was split out separately to this function to reduce costs.\\n /// @param syntheticName Name of the synthetic asset\\n /// @param syntheticSymbol Symbol for the synthetic asset\\n /// @param _longToken Address for the long token.\\n /// @param _shortToken Address for the short token.\\n /// @param _paymentToken The address of the erc20 token used to buy this synthetic asset\\n /// this will likely always be DAI\\n /// @param _oracleManager The address of the oracle manager that provides the price feed for this market\\n /// @param _yieldManager The contract that manages depositing the paymentToken into a yield bearing protocol\\n function createNewSyntheticMarketExternalSyntheticTokens(\\n string calldata syntheticName,\\n string calldata syntheticSymbol,\\n address _longToken,\\n address _shortToken,\\n address _paymentToken,\\n address _oracleManager,\\n address _yieldManager\\n ) external adminOnly {\\n uint32 marketIndex = ++latestMarket;\\n\\n // Ensure new markets don't use the same yield manager\\n IYieldManager(_yieldManager).initializeForMarket();\\n\\n // Assign new synthetic long token.\\n syntheticTokens[marketIndex][true] = _longToken;\\n\\n // Assign new synthetic short token.\\n syntheticTokens[marketIndex][false] = _shortToken;\\n\\n // Initial market state.\\n paymentTokens[marketIndex] = _paymentToken;\\n yieldManagers[marketIndex] = _yieldManager;\\n oracleManagers[marketIndex] = _oracleManager;\\n assetPrice[marketIndex] = IOracleManager(oracleManagers[marketIndex]).updatePrice();\\n\\n emit SyntheticMarketCreated(\\n marketIndex,\\n _longToken,\\n _shortToken,\\n _paymentToken,\\n assetPrice[marketIndex],\\n syntheticName,\\n syntheticSymbol,\\n _oracleManager,\\n _yieldManager\\n );\\n }\\n\\n /// @notice Seeds a new market with initial capital.\\n /// @dev Only called when initializing a market.\\n /// @param initialMarketSeedForEachMarketSide Amount in wei for which to seed both sides of the market.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n function _seedMarketInitially(uint256 initialMarketSeedForEachMarketSide, uint32 marketIndex)\\n internal\\n virtual\\n {\\n require(\\n // You require at least 1e18 (1 payment token with 18 decimal places) of the underlying payment token to seed the market.\\n initialMarketSeedForEachMarketSide >= 1e18,\\n \\\"Insufficient market seed\\\"\\n );\\n\\n uint256 amountToLockInYieldManager = initialMarketSeedForEachMarketSide * 2;\\n _transferPaymentTokensFromUserToYieldManager(marketIndex, amountToLockInYieldManager);\\n IYieldManager(yieldManagers[marketIndex]).depositPaymentToken(amountToLockInYieldManager);\\n\\n ISyntheticToken(syntheticTokens[marketIndex][true]).mint(\\n PERMANENT_INITIAL_LIQUIDITY_HOLDER,\\n initialMarketSeedForEachMarketSide\\n );\\n ISyntheticToken(syntheticTokens[marketIndex][false]).mint(\\n PERMANENT_INITIAL_LIQUIDITY_HOLDER,\\n initialMarketSeedForEachMarketSide\\n );\\n\\n marketSideValueInPaymentToken[marketIndex][true] = initialMarketSeedForEachMarketSide;\\n marketSideValueInPaymentToken[marketIndex][false] = initialMarketSeedForEachMarketSide;\\n }\\n\\n /// @notice Sets a market as active once it has already been setup by createNewSyntheticMarket.\\n /// @dev Seperated from createNewSyntheticMarket due to gas considerations.\\n /// @param marketIndex An int32 which uniquely identifies the market.\\n /// @param kInitialMultiplier Linearly decreasing multiplier for Float token issuance for the market when staking synths.\\n /// @param kPeriod Time which kInitialMultiplier will last\\n /// @param unstakeFee_e18 Base 1e18 percentage fee levied when unstaking for the market.\\n /// @param balanceIncentiveCurve_exponent Sets the degree to which Float token issuance differs\\n /// for market sides in unbalanced markets. See Staker.sol\\n /// @param balanceIncentiveCurve_equilibriumOffset An offset to account for naturally imbalanced markets\\n /// when Float token issuance should differ for market sides. See Staker.sol\\n /// @param initialMarketSeedForEachMarketSide Amount of payment token that will be deposited in each market side to seed the market.\\n function initializeMarket(\\n uint32 marketIndex,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 initialMarketSeedForEachMarketSide,\\n uint256 balanceIncentiveCurve_exponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 _marketTreasurySplitGradient_e18,\\n uint256 marketLeverage\\n ) external adminOnly {\\n require(\\n kInitialMultiplier != 0 &&\\n unstakeFee_e18 != 0 &&\\n initialMarketSeedForEachMarketSide != 0 &&\\n balanceIncentiveCurve_exponent != 0 &&\\n _marketTreasurySplitGradient_e18 != 0\\n );\\n\\n require(!marketExists[marketIndex], \\\"already initialized\\\");\\n require(marketIndex <= latestMarket, \\\"index too high\\\");\\n\\n marketExists[marketIndex] = true;\\n\\n marketTreasurySplitGradient_e18[marketIndex] = _marketTreasurySplitGradient_e18;\\n\\n // Set this value to one initially - 0 is a null value and thus potentially bug prone.\\n marketUpdateIndex[marketIndex] = 1;\\n\\n _seedMarketInitially(initialMarketSeedForEachMarketSide, marketIndex);\\n\\n marketLeverage_e18[marketIndex] = marketLeverage;\\n\\n // Add new staker funds with fresh synthetic tokens.\\n IStaker(staker).addNewStakingFund(\\n marketIndex,\\n syntheticTokens[marketIndex][true],\\n syntheticTokens[marketIndex][false],\\n kInitialMultiplier,\\n kPeriod,\\n unstakeFee_e18,\\n balanceIncentiveCurve_exponent,\\n balanceIncentiveCurve_equilibriumOffset\\n );\\n\\n IStaker(staker).pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n marketIndex,\\n 1,\\n 1e18,\\n 1e18,\\n initialMarketSeedForEachMarketSide,\\n initialMarketSeedForEachMarketSide\\n );\\n\\n emit NewMarketLaunchedAndSeeded(\\n marketIndex,\\n initialMarketSeedForEachMarketSide,\\n marketLeverage\\n );\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 GETTER FUNCTIONS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Calculates the conversion rate from synthetic tokens to payment tokens.\\n /// @dev Synth tokens have a fixed 18 decimals.\\n /// @param amountPaymentTokenBackingSynth Amount of payment tokens in that token's lowest denomination.\\n /// @param amountSyntheticToken Amount of synth token in wei.\\n /// @return syntheticTokenPrice The calculated conversion rate in base 1e18.\\n function _getSyntheticTokenPrice(\\n uint256 amountPaymentTokenBackingSynth,\\n uint256 amountSyntheticToken\\n ) internal pure virtual returns (uint256 syntheticTokenPrice) {\\n return (amountPaymentTokenBackingSynth * 1e18) / amountSyntheticToken;\\n }\\n\\n /// @notice Converts synth token amounts to payment token amounts at a synth token price.\\n /// @dev Price assumed base 1e18.\\n /// @param amountSyntheticToken Amount of synth token in wei.\\n /// @param syntheticTokenPriceInPaymentTokens The conversion rate from synth to payment tokens in base 1e18.\\n /// @return amountPaymentToken The calculated amount of payment tokens in token's lowest denomination.\\n function _getAmountPaymentToken(\\n uint256 amountSyntheticToken,\\n uint256 syntheticTokenPriceInPaymentTokens\\n ) internal pure virtual returns (uint256 amountPaymentToken) {\\n return (amountSyntheticToken * syntheticTokenPriceInPaymentTokens) / 1e18;\\n }\\n\\n /// @notice Converts payment token amounts to synth token amounts at a synth token price.\\n /// @dev Price assumed base 1e18.\\n /// @param amountPaymentTokenBackingSynth Amount of payment tokens in that token's lowest denomination.\\n /// @param syntheticTokenPriceInPaymentTokens The conversion rate from synth to payment tokens in base 1e18.\\n /// @return amountSyntheticToken The calculated amount of synthetic token in wei.\\n function _getAmountSyntheticToken(\\n uint256 amountPaymentTokenBackingSynth,\\n uint256 syntheticTokenPriceInPaymentTokens\\n ) internal pure virtual returns (uint256 amountSyntheticToken) {\\n return (amountPaymentTokenBackingSynth * 1e18) / syntheticTokenPriceInPaymentTokens;\\n }\\n\\n /**\\n @notice Calculate the amount of target side synthetic tokens that are worth the same\\n amount of payment tokens as X many synthetic tokens on origin side.\\n The resulting equation comes from simplifying this function\\n\\n _getAmountSyntheticToken(\\n _getAmountPaymentToken(\\n amountOriginSynth,\\n priceOriginSynth\\n ),\\n priceTargetSynth)\\n\\n Unpacking the function we get:\\n ((amountOriginSynth * priceOriginSynth) / 1e18) * 1e18 / priceTargetSynth\\n And simplifying this we get:\\n (amountOriginSynth * priceOriginSynth) / priceTargetSynth\\n @param amountSyntheticTokens_originSide Amount of synthetic tokens on origin side\\n @param syntheticTokenPrice_originSide Price of origin side's synthetic token\\n @param syntheticTokenPrice_targetSide Price of target side's synthetic token\\n @return equivalentAmountSyntheticTokensOnTargetSide Amount of synthetic token on target side\\n */\\n function _getEquivalentAmountSyntheticTokensOnTargetSide(\\n uint256 amountSyntheticTokens_originSide,\\n uint256 syntheticTokenPrice_originSide,\\n uint256 syntheticTokenPrice_targetSide\\n ) internal pure virtual returns (uint256 equivalentAmountSyntheticTokensOnTargetSide) {\\n equivalentAmountSyntheticTokensOnTargetSide =\\n (amountSyntheticTokens_originSide * syntheticTokenPrice_originSide) /\\n syntheticTokenPrice_targetSide;\\n }\\n\\n /// @notice Given an executed next price shift from tokens on one market side to the other,\\n /// determines how many other side tokens the shift was worth.\\n /// @dev Intended for use primarily by Staker.sol\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amountSyntheticToken_redeemOnOriginSide Amount of synth token in wei.\\n /// @param isShiftFromLong Whether the token shift is from long to short (true), or short to long (false).\\n /// @param priceSnapshotIndex Index which identifies which synth prices to use.\\n /// @return amountSyntheticTokensToMintOnTargetSide The amount in wei of tokens for the other side that the shift was worth.\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticToken_redeemOnOriginSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) public view virtual override returns (uint256 amountSyntheticTokensToMintOnTargetSide) {\\n uint256 syntheticTokenPriceOnOriginSide = syntheticToken_priceSnapshot[marketIndex][\\n isShiftFromLong\\n ][priceSnapshotIndex];\\n uint256 syntheticTokenPriceOnTargetSide = syntheticToken_priceSnapshot[marketIndex][\\n !isShiftFromLong\\n ][priceSnapshotIndex];\\n\\n amountSyntheticTokensToMintOnTargetSide = _getEquivalentAmountSyntheticTokensOnTargetSide(\\n amountSyntheticToken_redeemOnOriginSide,\\n syntheticTokenPriceOnOriginSide,\\n syntheticTokenPriceOnTargetSide\\n );\\n }\\n\\n /**\\n @notice The amount of a synth token a user is owed following a batch execution.\\n 4 possible states for next price actions:\\n - \\\"Pending\\\" - means the next price update hasn't happened or been enacted on by the updateSystemState function.\\n - \\\"Confirmed\\\" - means the next price has been updated by the updateSystemState function. There is still\\n - outstanding (lazy) computation that needs to be executed per user in the batch.\\n - \\\"Settled\\\" - there is no more computation left for the user.\\n - \\\"Non-existent\\\" - user has no next price actions.\\n This function returns a calculated value only in the case of 'confirmed' next price actions.\\n It should return zero for all other types of next price actions.\\n @dev Used in SyntheticToken.sol balanceOf to allow for automatic reflection of next price actions.\\n @param user The address of the user for whom to execute the function for.\\n @param marketIndex An uint32 which uniquely identifies a market.\\n @param isLong Whether it is for the long synthetic asset or the short synthetic asset.\\n @return confirmedButNotSettledBalance The amount in wei of tokens that the user is owed.\\n */\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n )\\n external\\n view\\n virtual\\n override\\n requireMarketExists(marketIndex)\\n returns (uint256 confirmedButNotSettledBalance)\\n {\\n uint256 currentMarketUpdateIndex = marketUpdateIndex[marketIndex];\\n uint256 userNextPrice_currentUpdateIndex_forMarket = userNextPrice_currentUpdateIndex[\\n marketIndex\\n ][user];\\n if (\\n userNextPrice_currentUpdateIndex_forMarket != 0 &&\\n userNextPrice_currentUpdateIndex_forMarket <= currentMarketUpdateIndex\\n ) {\\n uint256 amountPaymentTokenDeposited = userNextPrice_paymentToken_depositAmount[marketIndex][\\n isLong\\n ][user];\\n\\n if (amountPaymentTokenDeposited > 0) {\\n uint256 syntheticTokenPrice = syntheticToken_priceSnapshot[marketIndex][isLong][\\n userNextPrice_currentUpdateIndex_forMarket\\n ];\\n\\n confirmedButNotSettledBalance = _getAmountSyntheticToken(\\n amountPaymentTokenDeposited,\\n syntheticTokenPrice\\n );\\n }\\n\\n uint256 amountSyntheticTokensToBeShiftedAwayFromOriginSide = userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[\\n marketIndex\\n ][!isLong][user];\\n\\n if (amountSyntheticTokensToBeShiftedAwayFromOriginSide > 0) {\\n uint256 syntheticTokenPriceOnOriginSide = syntheticToken_priceSnapshot[marketIndex][\\n !isLong\\n ][userNextPrice_currentUpdateIndex_forMarket];\\n uint256 syntheticTokenPriceOnTargetSide = syntheticToken_priceSnapshot[marketIndex][isLong][\\n userNextPrice_currentUpdateIndex_forMarket\\n ];\\n\\n confirmedButNotSettledBalance += _getEquivalentAmountSyntheticTokensOnTargetSide(\\n amountSyntheticTokensToBeShiftedAwayFromOriginSide,\\n syntheticTokenPriceOnOriginSide,\\n syntheticTokenPriceOnTargetSide\\n );\\n }\\n }\\n }\\n\\n /**\\n @notice Calculates the percentage in base 1e18 of how much of the accrued yield\\n for a market should be allocated to treasury.\\n @dev For gas considerations also returns whether the long side is imbalanced.\\n @dev For gas considerations totalValueLockedInMarket is passed as a parameter as the function\\n calling this function has pre calculated the value\\n @param longValue The current total payment token value of the long side of the market.\\n @param shortValue The current total payment token value of the short side of the market.\\n @param totalValueLockedInMarket Total payment token value of both sides of the market.\\n @return isLongSideUnderbalanced Whether the long side initially had less value than the short side.\\n @return treasuryYieldPercent_e18 The percentage in base 1e18 of how much of the accrued yield\\n for a market should be allocated to treasury.\\n */\\n function _getYieldSplit(\\n uint32 marketIndex,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 totalValueLockedInMarket\\n ) internal view virtual returns (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) {\\n isLongSideUnderbalanced = longValue < shortValue;\\n uint256 imbalance;\\n\\n unchecked {\\n if (isLongSideUnderbalanced) {\\n imbalance = shortValue - longValue;\\n } else {\\n imbalance = longValue - shortValue;\\n }\\n }\\n\\n // marketTreasurySplitGradient_e18 may be adjusted to ensure yield is given\\n // to the market at a desired rate e.g. if a market tends to become imbalanced\\n // frequently then the gradient can be increased to funnel yield to the market\\n // quicker.\\n // See this equation in latex: https://ipfs.io/ipfs/QmXsW4cHtxpJ5BFwRcMSUw7s5G11Qkte13NTEfPLTKEx4x\\n // Interact with this equation: https://www.desmos.com/calculator/pnl43tfv5b\\n uint256 marketPercentCalculated_e18 = (imbalance *\\n marketTreasurySplitGradient_e18[marketIndex]) / totalValueLockedInMarket;\\n\\n uint256 marketPercent_e18 = Math.min(marketPercentCalculated_e18, 1e18);\\n\\n unchecked {\\n treasuryYieldPercent_e18 = 1e18 - marketPercent_e18;\\n }\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 HELPER FUNCTIONS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice First gets yield from the yield manager and allocates it to market and treasury.\\n /// It then allocates the full market yield portion to the underbalanced side of the market.\\n /// NB this function also adjusts the value of the long and short side based on the latest\\n /// price of the underlying asset received from the oracle. This function should ideally be\\n /// called everytime there is an price update from the oracle. We have built a bot that does this.\\n /// The system is still perectly safe if not called every price update, the synthetic will just\\n /// less closely track the underlying asset.\\n /// @dev In one function as yield should be allocated before rebalancing.\\n /// This prevents an attack whereby the user imbalances a side to capture all accrued yield.\\n /// @param marketIndex The market for which to execute the function for.\\n /// @param newAssetPrice The new asset price.\\n /// @return longValue The value of the long side after rebalancing.\\n /// @return shortValue The value of the short side after rebalancing.\\n function _claimAndDistributeYieldThenRebalanceMarket(uint32 marketIndex, int256 newAssetPrice)\\n internal\\n virtual\\n returns (uint256 longValue, uint256 shortValue)\\n {\\n int256 oldAssetPrice = assetPrice[marketIndex];\\n // Claiming and distributing the yield\\n longValue = marketSideValueInPaymentToken[marketIndex][true];\\n shortValue = marketSideValueInPaymentToken[marketIndex][false];\\n uint256 totalValueLockedInMarket = longValue + shortValue;\\n\\n (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) = _getYieldSplit(\\n marketIndex,\\n longValue,\\n shortValue,\\n totalValueLockedInMarket\\n );\\n\\n uint256 marketAmount = IYieldManager(yieldManagers[marketIndex])\\n .distributeYieldForTreasuryAndReturnMarketAllocation(\\n totalValueLockedInMarket,\\n treasuryYieldPercent_e18\\n );\\n\\n if (marketAmount > 0) {\\n if (isLongSideUnderbalanced) {\\n longValue += marketAmount;\\n } else {\\n shortValue += marketAmount;\\n }\\n }\\n\\n // Adjusting value of long and short pool based on price movement\\n // The side/position with less liquidity has 100% percent exposure to the price movement.\\n // The side/position with more liquidity will have exposure < 100% to the price movement.\\n // I.e. Imagine $100 in longValue and $50 shortValue\\n // long side would have $50/$100 = 50% exposure to price movements based on the liquidity imbalance.\\n // min(longValue, shortValue) = $50 , therefore if the price change was -10% then\\n // $50 * 10% = $5 gained for short side and conversely $5 lost for long side.\\n int256 underbalancedSideValue = int256(Math.min(longValue, shortValue));\\n\\n // See this equation in latex: https://ipfs.io/ipfs/QmPeJ3SZdn1GfxqCD4GDYyWTJGPMSHkjPJaxrzk2qTTPSE\\n // Interact with this equation: https://www.desmos.com/calculator/t8gr6j5vsq\\n int256 valueChange = ((newAssetPrice - oldAssetPrice) *\\n underbalancedSideValue *\\n int256(marketLeverage_e18[marketIndex])) / (oldAssetPrice * 1e18);\\n\\n if (valueChange < 0) {\\n valueChange = -valueChange; // make value change positive\\n\\n // handle 'impossible' edge case where underlying price feed changes more than 100% downwards gracefully.\\n if (uint256(valueChange) > longValue) {\\n valueChange = (int256(longValue) * 99999) / 100000;\\n }\\n longValue -= uint256(valueChange);\\n shortValue += uint256(valueChange);\\n } else {\\n // handle 'impossible' edge case where underlying price feed changes more than 100% upwards gracefully.\\n if (uint256(valueChange) > shortValue) {\\n valueChange = (int256(shortValue) * 99999) / 100000;\\n }\\n longValue += uint256(valueChange);\\n shortValue -= uint256(valueChange);\\n }\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 UPDATING SYSTEM STATE \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Updates the value of the long and short sides to account for latest oracle price updates\\n /// and batches all next price actions.\\n /// @dev To prevent front-running only executes on price change from an oracle.\\n /// We assume the function will be called for each market at least once per price update.\\n /// Note Even if not called on every price update, this won't affect security, it will only affect how closely\\n /// the synthetic asset actually tracks the underlying asset.\\n /// @param marketIndex The market index for which to update.\\n function _updateSystemStateInternal(uint32 marketIndex)\\n internal\\n virtual\\n requireMarketExists(marketIndex)\\n {\\n // If a negative int is return this should fail.\\n int256 newAssetPrice = IOracleManager(oracleManagers[marketIndex]).updatePrice();\\n\\n uint256 currentMarketIndex = marketUpdateIndex[marketIndex];\\n\\n bool assetPriceHasChanged = assetPrice[marketIndex] != newAssetPrice;\\n\\n if (assetPriceHasChanged) {\\n uint256 syntheticTokenPrice_inPaymentTokens_long = syntheticToken_priceSnapshot[marketIndex][\\n true\\n ][currentMarketIndex];\\n uint256 syntheticTokenPrice_inPaymentTokens_short = syntheticToken_priceSnapshot[marketIndex][\\n false\\n ][currentMarketIndex];\\n // if there is a price change and the 'staker' contract has pending updates, push the stakers price snapshot index to the staker\\n // (so the staker can handle its internal accounting)\\n\\n (\\n uint256 newLongPoolValue,\\n uint256 newShortPoolValue\\n ) = _claimAndDistributeYieldThenRebalanceMarket(marketIndex, newAssetPrice);\\n\\n syntheticTokenPrice_inPaymentTokens_long = _getSyntheticTokenPrice(\\n newLongPoolValue,\\n ISyntheticToken(syntheticTokens[marketIndex][true]).totalSupply()\\n );\\n syntheticTokenPrice_inPaymentTokens_short = _getSyntheticTokenPrice(\\n newShortPoolValue,\\n ISyntheticToken(syntheticTokens[marketIndex][false]).totalSupply()\\n );\\n\\n assetPrice[marketIndex] = newAssetPrice;\\n\\n currentMarketIndex++;\\n marketUpdateIndex[marketIndex] = currentMarketIndex;\\n\\n syntheticToken_priceSnapshot[marketIndex][true][\\n currentMarketIndex\\n ] = syntheticTokenPrice_inPaymentTokens_long;\\n\\n syntheticToken_priceSnapshot[marketIndex][false][\\n currentMarketIndex\\n ] = syntheticTokenPrice_inPaymentTokens_short;\\n\\n (\\n int256 long_changeInMarketValue_inPaymentToken,\\n int256 short_changeInMarketValue_inPaymentToken\\n ) = _batchConfirmOutstandingPendingActions(\\n marketIndex,\\n syntheticTokenPrice_inPaymentTokens_long,\\n syntheticTokenPrice_inPaymentTokens_short\\n );\\n\\n newLongPoolValue = uint256(\\n int256(newLongPoolValue) + long_changeInMarketValue_inPaymentToken\\n );\\n newShortPoolValue = uint256(\\n int256(newShortPoolValue) + short_changeInMarketValue_inPaymentToken\\n );\\n marketSideValueInPaymentToken[marketIndex][true] = newLongPoolValue;\\n marketSideValueInPaymentToken[marketIndex][false] = newShortPoolValue;\\n\\n IStaker(staker).pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n marketIndex,\\n currentMarketIndex,\\n syntheticTokenPrice_inPaymentTokens_long,\\n syntheticTokenPrice_inPaymentTokens_short,\\n newLongPoolValue,\\n newShortPoolValue\\n );\\n\\n emit SystemStateUpdated(\\n marketIndex,\\n currentMarketIndex,\\n newAssetPrice,\\n newLongPoolValue,\\n newShortPoolValue,\\n syntheticTokenPrice_inPaymentTokens_long,\\n syntheticTokenPrice_inPaymentTokens_short\\n );\\n }\\n }\\n\\n /// @notice Updates the state of a market to account for the latest oracle price update.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n function updateSystemState(uint32 marketIndex) external override {\\n _updateSystemStateInternal(marketIndex);\\n }\\n\\n /// @notice Updates the state of multiples markets to account for their latest oracle price updates.\\n /// @param marketIndexes An array of int32s which uniquely identify markets.\\n function updateSystemStateMulti(uint32[] calldata marketIndexes) external override {\\n uint256 length = marketIndexes.length;\\n for (uint256 i = 0; i < length; i++) {\\n _updateSystemStateInternal(marketIndexes[i]);\\n }\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 DEPOSIT \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Transfers payment tokens for a market from msg.sender to this contract.\\n /// @dev Tokens are transferred directly to this contract to be deposited by the yield manager in the batch to earn yield.\\n /// Since we check the return value of the transferFrom method, all payment tokens we use must conform to the ERC20 standard.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amount Amount of payment tokens in that token's lowest denominationto deposit.\\n function _transferPaymentTokensFromUserToYieldManager(uint32 marketIndex, uint256 amount)\\n internal\\n virtual\\n {\\n IERC20(paymentTokens[marketIndex]).safeTransferFrom(\\n msg.sender,\\n yieldManagers[marketIndex],\\n amount\\n );\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MINT POSITION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Allows users to mint synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\\n /// @dev Called by external functions to mint either long or short. If a user mints multiple times before a price update, these are treated as a single mint.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\\n /// @param isLong Whether the mint is for a long or short synth.\\n function _mintNextPrice(\\n uint32 marketIndex,\\n uint256 amount,\\n bool isLong\\n )\\n internal\\n virtual\\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\\n gemCollecting\\n {\\n _transferPaymentTokensFromUserToYieldManager(marketIndex, amount);\\n\\n batched_amountPaymentToken_deposit[marketIndex][isLong] += amount;\\n userNextPrice_paymentToken_depositAmount[marketIndex][isLong][msg.sender] += amount;\\n uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1;\\n userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex;\\n\\n emit NextPriceDeposit(marketIndex, isLong, amount, msg.sender, nextUpdateIndex);\\n }\\n\\n /// @notice Allows users to mint long synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external override {\\n _mintNextPrice(marketIndex, amount, true);\\n }\\n\\n /// @notice Allows users to mint short synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external override {\\n _mintNextPrice(marketIndex, amount, false);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 REDEEM POSITION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Allows users to redeem their synthetic tokens for payment tokens. To prevent front-running these redeems are executed on the next price update from the oracle.\\n /// @dev Called by external functions to redeem either long or short. Payment tokens are actually transferred to the user when executeOutstandingNextPriceSettlements is called from a function call by the user.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param tokens_redeem Amount in wei of synth tokens to redeem.\\n /// @param isLong Whether this redeem is for a long or short synth.\\n function _redeemNextPrice(\\n uint32 marketIndex,\\n uint256 tokens_redeem,\\n bool isLong\\n )\\n internal\\n virtual\\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\\n gemCollecting\\n {\\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).transferFrom(\\n msg.sender,\\n address(this),\\n tokens_redeem\\n );\\n\\n userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][msg.sender] += tokens_redeem;\\n uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1;\\n userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex;\\n\\n batched_amountSyntheticToken_redeem[marketIndex][isLong] += tokens_redeem;\\n\\n emit NextPriceRedeem(marketIndex, isLong, tokens_redeem, msg.sender, nextUpdateIndex);\\n }\\n\\n /// @notice Allows users to redeem long synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param tokens_redeem Amount in wei of synth tokens to redeem at the next oracle price.\\n function redeemLongNextPrice(uint32 marketIndex, uint256 tokens_redeem) external override {\\n _redeemNextPrice(marketIndex, tokens_redeem, true);\\n }\\n\\n /// @notice Allows users to redeem short synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param tokens_redeem Amount in wei of synth tokens to redeem at the next oracle price.\\n function redeemShortNextPrice(uint32 marketIndex, uint256 tokens_redeem) external override {\\n _redeemNextPrice(marketIndex, tokens_redeem, false);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 SHIFT POSITION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Allows users to shift their position from one side of the market to the other in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\\n /// @dev Called by external functions to shift either way. Intended for primary use by Staker.sol\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from the one side to the other at the next oracle price update.\\n /// @param isShiftFromLong Whether the token shift is from long to short (true), or short to long (false).\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n )\\n public\\n virtual\\n override\\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\\n gemCollecting\\n {\\n require(\\n ISyntheticToken(syntheticTokens[marketIndex][isShiftFromLong]).transferFrom(\\n msg.sender,\\n address(this),\\n amountSyntheticTokensToShift\\n )\\n );\\n\\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][\\n msg.sender\\n ] += amountSyntheticTokensToShift;\\n uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1;\\n userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex;\\n\\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][\\n isShiftFromLong\\n ] += amountSyntheticTokensToShift;\\n\\n emit NextPriceSyntheticPositionShift(\\n marketIndex,\\n isShiftFromLong,\\n amountSyntheticTokensToShift,\\n msg.sender,\\n nextUpdateIndex\\n );\\n }\\n\\n /// @notice Allows users to shift their position from long to short in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from long to short the next oracle price update.\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external\\n override\\n {\\n shiftPositionNextPrice(marketIndex, amountSyntheticTokensToShift, true);\\n }\\n\\n /// @notice Allows users to shift their position from short to long in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from the short to long at the next oracle price update.\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external\\n override\\n {\\n shiftPositionNextPrice(marketIndex, amountSyntheticTokensToShift, false);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 NEXT PRICE SETTLEMENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Transfers outstanding synth tokens from a next price mint to the user.\\n /// @dev The outstanding synths should already be reflected for the user due to balanceOf in SyntheticToken.sol, this just does the accounting.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param user The address of the user for whom to execute the function for.\\n /// @param isLong Whether this is for the long or short synth for the market.\\n function _executeOutstandingNextPriceMints(\\n uint32 marketIndex,\\n address user,\\n bool isLong\\n ) internal virtual {\\n uint256 currentPaymentTokenDepositAmount = userNextPrice_paymentToken_depositAmount[\\n marketIndex\\n ][isLong][user];\\n if (currentPaymentTokenDepositAmount > 0) {\\n userNextPrice_paymentToken_depositAmount[marketIndex][isLong][user] = 0;\\n uint256 amountSyntheticTokensToTransferToUser = _getAmountSyntheticToken(\\n currentPaymentTokenDepositAmount,\\n syntheticToken_priceSnapshot[marketIndex][isLong][\\n userNextPrice_currentUpdateIndex[marketIndex][user]\\n ]\\n );\\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).transfer(\\n user,\\n amountSyntheticTokensToTransferToUser\\n );\\n }\\n }\\n\\n /// @notice Transfers outstanding payment tokens from a next price redemption to the user.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param user The address of the user for whom to execute the function for.\\n /// @param isLong Whether this is for the long or short synth for the market.\\n function _executeOutstandingNextPriceRedeems(\\n uint32 marketIndex,\\n address user,\\n bool isLong\\n ) internal virtual {\\n uint256 currentSyntheticTokenRedemptions = userNextPrice_syntheticToken_redeemAmount[\\n marketIndex\\n ][isLong][user];\\n if (currentSyntheticTokenRedemptions > 0) {\\n userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][user] = 0;\\n uint256 amountPaymentToken_toRedeem = _getAmountPaymentToken(\\n currentSyntheticTokenRedemptions,\\n syntheticToken_priceSnapshot[marketIndex][isLong][\\n userNextPrice_currentUpdateIndex[marketIndex][user]\\n ]\\n );\\n\\n IYieldManager(yieldManagers[marketIndex]).transferPaymentTokensToUser(\\n user,\\n amountPaymentToken_toRedeem\\n );\\n }\\n }\\n\\n /// @notice Transfers outstanding synth tokens from a next price position shift to the user.\\n /// @dev The outstanding synths should already be reflected for the user due to balanceOf in SyntheticToken.sol, this just does the accounting.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param user The address of the user for whom to execute the function for.\\n /// @param isShiftFromLong Whether the token shift was from long to short (true), or short to long (false).\\n function _executeOutstandingNextPriceTokenShifts(\\n uint32 marketIndex,\\n address user,\\n bool isShiftFromLong\\n ) internal virtual {\\n uint256 syntheticToken_toShiftAwayFrom_marketSide = userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[\\n marketIndex\\n ][isShiftFromLong][user];\\n if (syntheticToken_toShiftAwayFrom_marketSide > 0) {\\n uint256 syntheticToken_toShiftTowardsTargetSide = getAmountSyntheticTokenToMintOnTargetSide(\\n marketIndex,\\n syntheticToken_toShiftAwayFrom_marketSide,\\n isShiftFromLong,\\n userNextPrice_currentUpdateIndex[marketIndex][user]\\n );\\n\\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][\\n user\\n ] = 0;\\n\\n require(\\n ISyntheticToken(syntheticTokens[marketIndex][!isShiftFromLong]).transfer(\\n user,\\n syntheticToken_toShiftTowardsTargetSide\\n )\\n );\\n }\\n }\\n\\n /// @notice After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user.\\n /// @dev Once the market has updated for the next price, should be guaranteed (through modifiers) to execute for a user before user initiation of new next price actions.\\n /// @param user The address of the user for whom to execute the function.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n function _executeOutstandingNextPriceSettlements(address user, uint32 marketIndex)\\n internal\\n virtual\\n {\\n uint256 userCurrentUpdateIndex = userNextPrice_currentUpdateIndex[marketIndex][user];\\n if (userCurrentUpdateIndex != 0 && userCurrentUpdateIndex <= marketUpdateIndex[marketIndex]) {\\n _executeOutstandingNextPriceMints(marketIndex, user, true);\\n _executeOutstandingNextPriceMints(marketIndex, user, false);\\n _executeOutstandingNextPriceRedeems(marketIndex, user, true);\\n _executeOutstandingNextPriceRedeems(marketIndex, user, false);\\n _executeOutstandingNextPriceTokenShifts(marketIndex, user, true);\\n _executeOutstandingNextPriceTokenShifts(marketIndex, user, false);\\n\\n userNextPrice_currentUpdateIndex[marketIndex][user] = 0;\\n\\n emit ExecuteNextPriceSettlementsUser(user, marketIndex);\\n }\\n }\\n\\n /// @notice After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user.\\n /// @param user The address of the user for whom to execute the function.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex)\\n external\\n override\\n {\\n _executeOutstandingNextPriceSettlements(user, marketIndex);\\n }\\n\\n /// @notice Executes outstanding next price settlements for a user for multiple markets.\\n /// @param user The address of the user for whom to execute the function.\\n /// @param marketIndexes An array of int32s which each uniquely identify a market.\\n function executeOutstandingNextPriceSettlementsUserMulti(\\n address user,\\n uint32[] memory marketIndexes\\n ) external {\\n uint256 length = marketIndexes.length;\\n for (uint256 i = 0; i < length; i++) {\\n _executeOutstandingNextPriceSettlements(user, marketIndexes[i]);\\n }\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 BATCHED NEXT PRICE SETTLEMENT ACTIONS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Either transfers funds from the yield manager to this contract if redeems > deposits,\\n /// and vice versa. The yield manager handles depositing and withdrawing the funds from a yield market.\\n /// @dev When all batched next price actions are handled the total value in the market can either increase or decrease based on the value of mints and redeems.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param totalPaymentTokenValueChangeForMarket An int256 which indicates the magnitude and direction of the change in market value.\\n function _handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\\n uint32 marketIndex,\\n int256 totalPaymentTokenValueChangeForMarket\\n ) internal virtual {\\n if (totalPaymentTokenValueChangeForMarket > 0) {\\n IYieldManager(yieldManagers[marketIndex]).depositPaymentToken(\\n uint256(totalPaymentTokenValueChangeForMarket)\\n );\\n } else if (totalPaymentTokenValueChangeForMarket < 0) {\\n // NB there will be issues here if not enough liquidity exists to withdraw\\n // Boolean should be returned from yield manager and think how to appropriately handle this\\n IYieldManager(yieldManagers[marketIndex]).removePaymentTokenFromMarket(\\n uint256(-totalPaymentTokenValueChangeForMarket)\\n );\\n }\\n }\\n\\n /// @notice Given a desired change in synth token supply, either mints or burns tokens to achieve that desired change.\\n /// @dev When all batched next price actions are executed total supply for a synth can either increase or decrease.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param isLong Whether this function should execute for the long or short synth for the market.\\n /// @param changeInSyntheticTokensTotalSupply The amount in wei by which synth token supply should change.\\n function _handleChangeInSyntheticTokensTotalSupply(\\n uint32 marketIndex,\\n bool isLong,\\n int256 changeInSyntheticTokensTotalSupply\\n ) internal virtual {\\n if (changeInSyntheticTokensTotalSupply > 0) {\\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).mint(\\n address(this),\\n uint256(changeInSyntheticTokensTotalSupply)\\n );\\n } else if (changeInSyntheticTokensTotalSupply < 0) {\\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).burn(\\n uint256(-changeInSyntheticTokensTotalSupply)\\n );\\n }\\n }\\n\\n /**\\n @notice Performs all batched next price actions on an oracle price update.\\n @dev Mints or burns all synthetic tokens for this contract.\\n\\n After this function is executed all user actions in that batch are confirmed and can be settled individually by\\n calling _executeOutstandingNexPriceSettlements for a given user.\\n\\n The maths here is safe from rounding errors since it always over estimates on the batch with division.\\n (as an example (5/3) + (5/3) = 2 but (5+5)/3 = 10/3 = 3, so the batched action would mint one more)\\n @param marketIndex An uint32 which uniquely identifies a market.\\n @param syntheticTokenPrice_inPaymentTokens_long The long synthetic token price for this oracle price update.\\n @param syntheticTokenPrice_inPaymentTokens_short The short synthetic token price for this oracle price update.\\n @return long_changeInMarketValue_inPaymentToken The total value change for the long side after all batched actions are executed.\\n @return short_changeInMarketValue_inPaymentToken The total value change for the short side after all batched actions are executed.\\n */\\n function _batchConfirmOutstandingPendingActions(\\n uint32 marketIndex,\\n uint256 syntheticTokenPrice_inPaymentTokens_long,\\n uint256 syntheticTokenPrice_inPaymentTokens_short\\n )\\n internal\\n virtual\\n returns (\\n int256 long_changeInMarketValue_inPaymentToken,\\n int256 short_changeInMarketValue_inPaymentToken\\n )\\n {\\n int256 changeInSupply_syntheticToken_long;\\n int256 changeInSupply_syntheticToken_short;\\n\\n // NOTE: the only reason we are reusing amountForCurrentAction_workingVariable for all actions (redeemLong, redeemShort, mintLong, mintShort, shiftFromLong, shiftFromShort) is to reduce stack usage\\n uint256 amountForCurrentAction_workingVariable = batched_amountPaymentToken_deposit[\\n marketIndex\\n ][true];\\n\\n // Handle batched deposits LONG\\n if (amountForCurrentAction_workingVariable > 0) {\\n long_changeInMarketValue_inPaymentToken = int256(amountForCurrentAction_workingVariable);\\n\\n batched_amountPaymentToken_deposit[marketIndex][true] = 0;\\n\\n changeInSupply_syntheticToken_long = int256(\\n _getAmountSyntheticToken(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_long\\n )\\n );\\n }\\n\\n // Handle batched deposits SHORT\\n amountForCurrentAction_workingVariable = batched_amountPaymentToken_deposit[marketIndex][false];\\n if (amountForCurrentAction_workingVariable > 0) {\\n short_changeInMarketValue_inPaymentToken = int256(amountForCurrentAction_workingVariable);\\n\\n batched_amountPaymentToken_deposit[marketIndex][false] = 0;\\n\\n changeInSupply_syntheticToken_short = int256(\\n _getAmountSyntheticToken(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_short\\n )\\n );\\n }\\n\\n // Handle shift tokens from LONG to SHORT\\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_toShiftAwayFrom_marketSide[\\n marketIndex\\n ][true];\\n\\n if (amountForCurrentAction_workingVariable > 0) {\\n int256 paymentTokenValueChangeForShiftToShort = int256(\\n _getAmountPaymentToken(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_long\\n )\\n );\\n\\n long_changeInMarketValue_inPaymentToken -= paymentTokenValueChangeForShiftToShort;\\n short_changeInMarketValue_inPaymentToken += paymentTokenValueChangeForShiftToShort;\\n\\n changeInSupply_syntheticToken_long -= int256(amountForCurrentAction_workingVariable);\\n changeInSupply_syntheticToken_short += int256(\\n _getEquivalentAmountSyntheticTokensOnTargetSide(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_long,\\n syntheticTokenPrice_inPaymentTokens_short\\n )\\n );\\n\\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][true] = 0;\\n }\\n\\n // Handle shift tokens from SHORT to LONG\\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_toShiftAwayFrom_marketSide[\\n marketIndex\\n ][false];\\n if (amountForCurrentAction_workingVariable > 0) {\\n int256 paymentTokenValueChangeForShiftToLong = int256(\\n _getAmountPaymentToken(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_short\\n )\\n );\\n\\n short_changeInMarketValue_inPaymentToken -= paymentTokenValueChangeForShiftToLong;\\n long_changeInMarketValue_inPaymentToken += paymentTokenValueChangeForShiftToLong;\\n\\n changeInSupply_syntheticToken_short -= int256(amountForCurrentAction_workingVariable);\\n changeInSupply_syntheticToken_long += int256(\\n _getEquivalentAmountSyntheticTokensOnTargetSide(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_short,\\n syntheticTokenPrice_inPaymentTokens_long\\n )\\n );\\n\\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][false] = 0;\\n }\\n\\n // Handle batched redeems LONG\\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_redeem[marketIndex][true];\\n if (amountForCurrentAction_workingVariable > 0) {\\n long_changeInMarketValue_inPaymentToken -= int256(\\n _getAmountPaymentToken(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_long\\n )\\n );\\n changeInSupply_syntheticToken_long -= int256(amountForCurrentAction_workingVariable);\\n\\n batched_amountSyntheticToken_redeem[marketIndex][true] = 0;\\n }\\n\\n // Handle batched redeems SHORT\\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_redeem[marketIndex][\\n false\\n ];\\n if (amountForCurrentAction_workingVariable > 0) {\\n short_changeInMarketValue_inPaymentToken -= int256(\\n _getAmountPaymentToken(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_short\\n )\\n );\\n changeInSupply_syntheticToken_short -= int256(amountForCurrentAction_workingVariable);\\n\\n batched_amountSyntheticToken_redeem[marketIndex][false] = 0;\\n }\\n\\n // Batch settle payment tokens\\n _handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\\n marketIndex,\\n long_changeInMarketValue_inPaymentToken + short_changeInMarketValue_inPaymentToken\\n );\\n // Batch settle synthetic tokens\\n _handleChangeInSyntheticTokensTotalSupply(\\n marketIndex,\\n true,\\n changeInSupply_syntheticToken_long\\n );\\n _handleChangeInSyntheticTokensTotalSupply(\\n marketIndex,\\n false,\\n changeInSupply_syntheticToken_short\\n );\\n }\\n}\\n\",\"keccak256\":\"0x4c8aa645d9aa72ffb0ab2dd1d5436100c3224ef32015b88c82d0d9bbfb9e4f69\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IOracleManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/*\\n * Manages price feeds from different oracle implementations.\\n */\\ninterface IOracleManager {\\n function updatePrice() external returns (int256);\\n\\n /*\\n *Returns the latest price from the oracle feed.\\n */\\n function getLatestPrice() external view returns (int256);\\n}\\n\",\"keccak256\":\"0x257b71cc5a9394ba0ea022556bf1f38012046c5ca568ff0d73ce6cf95c278376\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ITokenFactory.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ITokenFactory {\\n function createSyntheticToken(\\n string calldata syntheticName,\\n string calldata syntheticSymbol,\\n address staker,\\n uint32 marketIndex,\\n bool isLong\\n ) external returns (address);\\n}\\n\",\"keccak256\":\"0x90e4adf1a78ded36d804731a69137b3a4b6c4a6e9c9af46c7ccfa8d91b976e2e\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IYieldManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/// @notice Manages yield accumulation for the LongShort contract. Each market is deployed with its own yield manager to simplify the bookkeeping, as different markets may share a payment token and yield pool.\\nabstract contract IYieldManager {\\n event ClaimAaveRewardTokenToTreasury(uint256 amount);\\n\\n event YieldDistributed(uint256 unrealizedYield, uint256 treasuryYieldPercent_e18);\\n\\n /// @dev This is purely saving some gas, but the subgraph will know how much is due for the treasury at all times - no need to include in event.\\n event WithdrawTreasuryFunds();\\n\\n /// @notice distributed yield not yet transferred to the treasury\\n function totalReservedForTreasury() external virtual returns (uint256);\\n\\n /// @notice Deposits the given amount of payment tokens into this yield manager.\\n /// @param amount Amount of payment token to deposit\\n function depositPaymentToken(uint256 amount) external virtual;\\n\\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\\n /// @param user User to recieve the payout\\n /// @param amount Amount of payment token to pay to user\\n function transferPaymentTokensToUser(address user, uint256 amount) external virtual;\\n\\n /// @notice Withdraws the given amount of tokens from this yield manager.\\n /// @param amount Amount of payment token to withdraw\\n function removePaymentTokenFromMarket(uint256 amount) external virtual;\\n\\n /** \\n @notice Calculates and updates the yield allocation to the treasury and the market\\n @dev treasuryPercent = 1 - marketPercent\\n @param totalValueRealizedForMarket total value of long and short side of the market\\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\\n @return amountForMarketIncentives The market allocation of the yield\\n */\\n function distributeYieldForTreasuryAndReturnMarketAllocation(\\n uint256 totalValueRealizedForMarket,\\n uint256 treasuryYieldPercent_e18\\n ) external virtual returns (uint256 amountForMarketIncentives);\\n\\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\\n function withdrawTreasuryFunds() external virtual;\\n\\n /// @notice Initializes a specific yield manager to a given market\\n function initializeForMarket() external virtual;\\n}\\n\",\"keccak256\":\"0x20116e375d536c6ee7bec74d1ee5c1a552465a79fc8f1f2a9e2428078d3648f6\",\"license\":\"BUSL-1.1\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50614e0f806100206000396000f3fe60806040526004361061031a5760003560e01c8063867dfc6d116101ab578063c2b80072116100f7578063eeb0235211610095578063f72c0d8b1161006f578063f72c0d8b14610b3e578063f7cbb68714610b72578063f80c9b9214610b92578063f8c8765e14610bcb5761031a565b8063eeb0235214610ac7578063f41cb19514610ae7578063f68a327f14610b1e5761031a565b8063d88905c9116100d1578063d88905c914610a46578063da04ce1414610a66578063e6b604e014610a86578063e77772fe14610aa65761031a565b8063c2b80072146109c7578063c2e1247114610a06578063d547741f14610a265761031a565b80639c5b0ee311610164578063b054c4a11161013e578063b054c4a1146108f3578063b36f537414610935578063b3c7e21814610966578063bb0a45291461099f5761031a565b80639c5b0ee31461086e5780639dc39e0f146108a5578063a217fddf146108de5761031a565b8063867dfc6d146107a05780638900bdfa146107c0578063897a0786146107ee57806391a9fa611461080e57806391d148541461082e57806392f6fe801461084e5761031a565b80634f1ef2861161026a578063682ad286116102235780636f486c5b116101fd5780636f486c5b146106ed57806371fd96231461072c57806375b238fc1461074c5780637a0e94f0146107805761031a565b8063682ad2861461068c5780636c305055146106ac5780636c8d2b97146106cd5761031a565b80634f1ef286146105965780635ebaf1db146105a9578063602aabab146105d2578063636190c81461060057806364d16f531461063357806364e4a81d146106535761031a565b8063248a9ca3116102d757806334daaa25116102b157806334daaa25146104fd57806336568abe146105365780633659cfe6146105565780633d6a2b3f146105765761031a565b8063248a9ca31461046e5780632f2ff15d1461049e57806334898684146104be5761031a565b806301ffc9a71461031f57806305c8146f146103545780630e5140dc1461037657806314c88ffa146103c35780631badf5c0146103f157806321658e4814610440575b600080fd5b34801561032b57600080fd5b5061033f61033a36600461446c565b610beb565b60405190151581526020015b60405180910390f35b34801561036057600080fd5b5061037461036f36600461461c565b610c24565b005b34801561038257600080fd5b506103b561039136600461468c565b6101c360209081526000938452604080852082529284528284209052825290205481565b60405190815260200161034b565b3480156103cf57600080fd5b506103b56103de36600461461c565b61015a6020526000908152604090205481565b3480156103fd57600080fd5b5061042861040c36600461461c565b61015f602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161034b565b34801561044c57600080fd5b506103b561045b36600461461c565b61015b6020526000908152604090205481565b34801561047a57600080fd5b506103b5610489366004614425565b60009081526065602052604090206001015490565b3480156104aa57600080fd5b506103746104b936600461443d565b610c30565b3480156104ca57600080fd5b506103b56104d936600461468c565b6101c260209081526000938452604080852082529284528284209052825290205481565b34801561050957600080fd5b506103b5610518366004614661565b61019160209081526000928352604080842090915290825290205481565b34801561054257600080fd5b5061037461055136600461443d565b610c5c565b34801561056257600080fd5b50610374610571366004614124565b610cdf565b34801561058257600080fd5b50610374610591366004614552565b610d03565b6103746105a436600461427b565b610f2a565b3480156105b557600080fd5b50610128546104289064010000000090046001600160a01b031681565b3480156105de57600080fd5b506103b56105ed36600461461c565b61015c6020526000908152604090205481565b34801561060c57600080fd5b506101285461061e9063ffffffff1681565b60405163ffffffff909116815260200161034b565b34801561063f57600080fd5b5061037461064e366004614636565b610f3f565b34801561065f57600080fd5b506103b561066e366004614661565b61019060209081526000928352604080842090915290825290205481565b34801561069857600080fd5b506103746106a7366004614707565b610fc5565b3480156106b857600080fd5b5061012a54610428906001600160a01b031681565b3480156106d957600080fd5b506103746106e8366004614399565b610fd1565b3480156106f957600080fd5b506103b56107083660046146c9565b61018f60209081526000938452604080852082529284528284209052825290205481565b34801561073857600080fd5b50610374610747366004614730565b611032565b34801561075857600080fd5b506103b57fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561078c57600080fd5b5061037461079b3660046141b7565b611201565b3480156107ac57600080fd5b506103746107bb366004614707565b611251565b3480156107cc57600080fd5b506103b56107db36600461461c565b6101596020526000908152604090205481565b3480156107fa57600080fd5b5061037461080936600461431d565b61125d565b34801561081a57600080fd5b50610374610829366004614707565b611267565b34801561083a57600080fd5b5061033f61084936600461443d565b611273565b34801561085a57600080fd5b506103b5610869366004614764565b61129e565b34801561087a57600080fd5b5061042861088936600461461c565b61015e602052600090815260409020546001600160a01b031681565b3480156108b157600080fd5b506103b56108c0366004614636565b6101c060209081526000928352604080842090915290825290205481565b3480156108ea57600080fd5b506103b5600081565b3480156108ff57600080fd5b5061042861090e366004614661565b61018d6020908152600092835260408084209091529082529020546001600160a01b031681565b34801561094157600080fd5b5061033f61095036600461461c565b6101586020526000908152604090205460ff1681565b34801561097257600080fd5b506103b5610981366004614661565b61018e60209081526000928352604080842090915290825290205481565b3480156109ab57600080fd5b5061042873f10a7f10a7f10a7f10a7f10a7f10a7f10a7f10a781565b3480156109d357600080fd5b506103b56109e236600461468c565b6101c160209081526000938452604080852082529284528284209052825290205481565b348015610a1257600080fd5b50610374610a21366004614707565b6112f4565b348015610a3257600080fd5b50610374610a4136600461443d565b611300565b348015610a5257600080fd5b50610374610a613660046144ac565b611326565b348015610a7257600080fd5b50610374610a81366004614707565b6117f4565b348015610a9257600080fd5b50610374610aa1366004614707565b611816565b348015610ab257600080fd5b5061012954610428906001600160a01b031681565b348015610ad357600080fd5b50610374610ae2366004614707565b611822565b348015610af357600080fd5b50610428610b0236600461461c565b61015d602052600090815260409020546001600160a01b031681565b348015610b2a57600080fd5b506103b5610b39366004614351565b61182e565b348015610b4a57600080fd5b506103b57f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b348015610b7e57600080fd5b50610374610b8d3660046147a9565b61199a565b348015610b9e57600080fd5b506103b5610bad366004614661565b61019260209081526000928352604080842090915290825290205481565b348015610bd757600080fd5b50610374610be636600461415c565b611c74565b60006001600160e01b03198216637965db0b60e01b1480610c1c57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b610c2d81611dd6565b50565b600082815260656020526040902060010154610c4d81335b6121c9565b610c57838361222d565b505050565b6001600160a01b0381163314610cd15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610cdb82826122b3565b5050565b610ce88161231a565b610c2d81604051806020016040528060008152506000612345565b610d0b6124c6565b6101288054600091908290610d259063ffffffff16614d0f565b91906101000a81548163ffffffff021916908363ffffffff16021790559050816001600160a01b031663edf565cc6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610d7f57600080fd5b505af1158015610d93573d6000803e3d6000fd5b5050505063ffffffff8116600081815261018d6020908152604080832060018452825280832080546001600160a01b03199081166001600160a01b038d811691909117909255848052828520805482168c841617905594845261015d8352818420805486168a831617905561015e83528184208054861688831617905561015f835281842080549095169088169081179094558051630ce74fc560e31b8152905163673a7e2893600480840194938390030190829087803b158015610e5757600080fd5b505af1158015610e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8f9190614494565b61015960008363ffffffff1663ffffffff168152602001908152602001600020819055507f901e73890694712ca72bdc627d356f05f11be45e7ccf490a8d4924c393bcb5658187878761015960008763ffffffff1663ffffffff168152602001908152602001600020548f8f8f8f8c8c604051610f169b9a99989796959493929190614a35565b60405180910390a150505050505050505050565b610f338261231a565b610cdb82826001612345565b610f476124c6565b63ffffffff8216600081815261015f602090815260409182902080546001600160a01b038681166001600160a01b03198316811790935584519586521691840182905291830191909152907ffc4d69f373858d480cfc3f12e7cc7f9b12201291753ffc3babef0e7a8041979f906060015b60405180910390a1505050565b610cdb82826000611032565b8060005b8181101561102c5761101a84848381811061100057634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611015919061461c565b611dd6565b8061102481614cf4565b915050610fd5565b50505050565b338361103d81611dd6565b61104782826124f2565b61104f6125f3565b63ffffffff8516600090815261018d602090815260408083208615158452909152908190205490516323b872dd60e01b8152336004820152306024820152604481018690526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156110c357600080fd5b505af11580156110d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fb9190614409565b61110457600080fd5b63ffffffff851660009081526101c360209081526040808320861515845282528083203384529091528120805486929061113f908490614b5f565b909155505063ffffffff8516600090815261015a6020526040812054611166906001614b5f565b63ffffffff871660008181526101c0602090815260408083203384528252808320859055928252610192815282822088151583529052908120805492935087929091906111b4908490614b5f565b90915550506040517fd850f5d8405edb0730cd72e6bb9e228043c91fd591562543ea553efda14970b6906111f19088908790899033908790614ab9565b60405180910390a1505050505050565b805160005b8181101561102c5761123f8484838151811061123257634e487b7160e01b600052603260045260246000fd5b60200260200101516124f2565b8061124981614cf4565b915050611206565b610cdb82826001612668565b610cdb82826124f2565b610cdb82826000612668565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b63ffffffff8416600090815261018f602090815260408083208515801585528184528285208686528452828520549085529083528184208585529092528220546112e9868383612787565b979650505050505050565b610cdb828260016127a6565b60008281526065602052604090206001015461131c8133610c48565b610c5783836122b3565b61132e6124c6565b6001600160a01b0383161580159061134e57506001600160a01b03821615155b801561136257506001600160a01b03811615155b61136b57600080fd5b61012880546000919082906113859063ffffffff16614d0f565b91906101000a81548163ffffffff021916908363ffffffff16021790559050600061012860049054906101000a90046001600160a01b03169050826001600160a01b031663edf565cc6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156113fa57600080fd5b505af115801561140e573d6000803e3d6000fd5b5050610129546040516001600160a01b03909116925063e6d30467915061143b908c908c90602001614959565b604051602081830303815290604052898960405160200161145d9291906148c6565b604051602081830303815290604052848660016040518663ffffffff1660e01b8152600401611490959493929190614993565b602060405180830381600087803b1580156114aa57600080fd5b505af11580156114be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e29190614140565b63ffffffff8316600090815261018d602090815260408083206001845282529182902080546001600160a01b0319166001600160a01b03948516179055610129549151919092169163e6d304679161153e918d918d910161489e565b6040516020818303038152906040528989604051602001611560929190614880565b604051602081830303815290604052848660006040518663ffffffff1660e01b8152600401611593959493929190614993565b602060405180830381600087803b1580156115ad57600080fd5b505af11580156115c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e59190614140565b63ffffffff8316600081815261018d60209081526040808320838052825280832080546001600160a01b03199081166001600160a01b039788161790915593835261015d8252808320805485168b871617905561015e82528083208054851689871617905561015f825280832080549094169489169485179093558251630ce74fc560e31b8152925163673a7e2893600480820194918390030190829087803b15801561169157600080fd5b505af11580156116a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c99190614494565b61015960008463ffffffff1663ffffffff168152602001908152602001600020819055507f901e73890694712ca72bdc627d356f05f11be45e7ccf490a8d4924c393bcb5658261018d60008563ffffffff1663ffffffff1681526020019081526020016000206000600115151515815260200190815260200160002060009054906101000a90046001600160a01b031661018d60008663ffffffff1663ffffffff16815260200190815260200160002060008015151515815260200190815260200160002060009054906101000a90046001600160a01b03168861015960008863ffffffff1663ffffffff168152602001908152602001600020548e8e8e8e8d8d6040516117e19b9a99989796959493929190614a35565b60405180910390a1505050505050505050565b6117fc6124c6565b63ffffffff909116600090815261015b6020526040902055565b610cdb828260006127a6565b610cdb82826001611032565b60008261183a8161295d565b63ffffffff8416600090815261015a60209081526040808320546101c083528184206001600160a01b038a16855290925290912054801580159061187e5750818111155b156119905763ffffffff861660009081526101c160209081526040808320881515845282528083206001600160a01b038b16845290915290205480156118f85763ffffffff8716600090815261018f60209081526040808320891515845282528083208584529091529020546118f482826129ba565b9550505b63ffffffff871660009081526101c3602090815260408083208915845282528083206001600160a01b038c168452909152902054801561198d5763ffffffff8816600090815261018f602090815260408083208a15808552818452828520888652845282852054901585529083528184208785529092529091205461197e838383612787565b6119889089614b5f565b975050505b50505b5050509392505050565b6119a26124c6565b87158015906119b057508515155b80156119bb57508415155b80156119c657508315155b80156119d157508115155b6119da57600080fd5b63ffffffff89166000908152610158602052604090205460ff1615611a375760405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610cc8565b6101285463ffffffff908116908a161115611a855760405162461bcd60e51b815260206004820152600e60248201526d0d2dcc8caf040e8dede40d0d2ced60931b6044820152606401610cc8565b63ffffffff8916600090815261015860209081526040808320805460ff1916600190811790915561015b835281842086905561015a90925290912055611acb858a6129e0565b63ffffffff8916600081815261015c602090815260408083208590556101285461018d835281842060018552909252808320548380529281902054905163b0956b5f60e01b815260048101949094526001600160a01b03928316602485015282166044840152606483018b9052608483018a905260a4830189905260c4830187905260e483018690526401000000009004169063b0956b5f9061010401600060405180830381600087803b158015611b8257600080fd5b505af1158015611b96573d6000803e3d6000fd5b5050610128546040516317b4d3fb60e31b815263ffffffff8d16600482015260016024820152670de0b6b3a76400006044820181905260648201526084810189905260a481018990526401000000009091046001600160a01b0316925063bda69fd8915060c401600060405180830381600087803b158015611c1757600080fd5b505af1158015611c2b573d6000803e3d6000fd5b50506040805163ffffffff8d168152602081018990529081018490527f95eeb1c33a758f56bd880588063c2f122e39c8885929e5fbbbd57418b97e58d0925060600190506117e1565b600054610100900460ff1680611c8d575060005460ff16155b611ca95760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015611ccb576000805461ffff19166101011790555b6001600160a01b03851615801590611ceb57506001600160a01b03841615155b8015611cff57506001600160a01b03831615155b8015611d1357506001600160a01b03821615155b611d1c57600080fd5b611d2585612c29565b61012980546001600160a01b03199081166001600160a01b038781169182179093556101288054640100000000600160c01b0319166401000000008886169081029190911790915561012a80549093168685161790925560408051938916845260208401919091528201527f48aa6e6153c5dedbe00925ab3c8e28c6ce0c1a80652b3369f176065e797b45079060600160405180910390a18015611dcf576000805461ff00191690555b5050505050565b80611de08161295d565b63ffffffff8216600090815261015f60209081526040808320548151630ce74fc560e31b815291516001600160a01b039091169263673a7e28926004808201939182900301818787803b158015611e3657600080fd5b505af1158015611e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6e9190614494565b63ffffffff8416600090815261015a602090815260408083205461015990925290912054919250908214801590611dcf5763ffffffff8516600090815261018f6020908152604080832060018452808352818420868552835281842054848052908352818420868552909252822054909180611eea8988612cae565b63ffffffff8b16600090815261018d602090815260408083206001845282528083205481516318160ddd60e01b81529151959750939550611f949487946001600160a01b0316936318160ddd93600480850194919392918390030190829087803b158015611f5757600080fd5b505af1158015611f6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8f9190614494565b6129ba565b63ffffffff8a16600090815261018d6020908152604080832083805282528083205481516318160ddd60e01b81529151949850611fff9486946001600160a01b03909216936318160ddd93600480820194929392918390030190829087803b158015611f5757600080fd5b63ffffffff8a1660009081526101596020526040902088905592508561202481614cf4565b63ffffffff8b16600090815261015a6020908152604080832084905561018f82528083206001845280835281842085855283528184208a9055838052825280832084845290915281208690559097509050806120818b8787612ed5565b90925090506120908285614b1e565b935061209c8184614b1e565b63ffffffff8c16600081815261018e6020908152604080832060018452909152808220889055818052908190208390556101285490516317b4d3fb60e31b81526004810192909252602482018b905260448201899052606482018890526084820187905260a482018390529194506401000000009091046001600160a01b03169063bda69fd89060c401600060405180830381600087803b15801561214057600080fd5b505af1158015612154573d6000803e3d6000fd5b50506040805163ffffffff8f168152602081018c90529081018c9052606081018790526080810186905260a0810189905260c081018890527f69e662f95898affac086a5bc1177755bdaf7f4a40a3880364c48012170ee57fe925060e001905060405180910390a15050505050505050505050565b6121d38282611273565b610cdb576121eb816001600160a01b031660146131d4565b6121f68360206131d4565b6040516020016122079291906148e4565b60408051601f198184030181529082905262461bcd60e51b8252610cc891600401614980565b6122378282611273565b610cdb5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561226f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6122bd8282611273565b15610cdb5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610cdb8133610c48565b60006123787f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050612383846133b6565b6000835111806123905750815b156123a15761239f848461345b565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16611dcf57805460ff191660011781556040516001600160a01b038316602482015261242090869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b17905261345b565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146124bd5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610cc8565b611dcf85613546565b6124f07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336121c9565b565b63ffffffff811660009081526101c0602090815260408083206001600160a01b03861684529091529020548015801590612542575063ffffffff8216600090815261015a60205260409020548111155b15610c575761255382846001613586565b61255f82846000613586565b61256b828460016136ea565b612577828460006136ea565b61258382846001613820565b61258f82846000613820565b63ffffffff821660008181526101c0602090815260408083206001600160a01b038816808552908352818420939093558051928352908201929092527fe03aa867e2345cc967d98e4c81f6b0707b5ef082d9d20bac3dcf95540acdeae49101610fb8565b6101285464010000000090046001600160a01b031633146124f05761012a546040516324b4085360e21b81523360048201526001600160a01b03909116906392d0214c90602401600060405180830381600087803b15801561265457600080fd5b505af115801561102c573d6000803e3d6000fd5b338361267381611dd6565b61267d82826124f2565b6126856125f3565b61268f858561396a565b63ffffffff85166000908152610190602090815260408083208615158452909152812080548692906126c2908490614b5f565b909155505063ffffffff851660009081526101c1602090815260408083208615158452825280832033845290915281208054869290612702908490614b5f565b909155505063ffffffff8516600090815261015a6020526040812054612729906001614b5f565b63ffffffff871660009081526101c0602090815260408083203380855292529182902083905590519192507f50b8727b538cf16daeb79894e8bde5c1e975985071be8a8d7620675a5dddfc6b916111f191899188918a918790614ab9565b6000816127948486614c3c565b61279e9190614ba5565b949350505050565b33836127b181611dd6565b6127bb82826124f2565b6127c36125f3565b63ffffffff8516600090815261018d602090815260408083208615158452909152908190205490516323b872dd60e01b8152336004820152306024820152604481018690526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561283757600080fd5b505af115801561284b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286f9190614409565b5063ffffffff851660009081526101c26020908152604080832086151584528252808320338452909152812080548692906128ab908490614b5f565b909155505063ffffffff8516600090815261015a60205260408120546128d2906001614b5f565b63ffffffff871660008181526101c060209081526040808320338452825280832085905592825261019181528282208815158352905290812080549293508792909190612920908490614b5f565b90915550506040517f191d5f0d51691cdc223884e5321013c9663c6b337a07d550c538d9dcbbd66203906111f19088908790899033908790614ab9565b63ffffffff81166000908152610158602052604090205460ff16610c2d5760405162461bcd60e51b81526020600482015260146024820152731b585c9ad95d08191bd95cdb89dd08195e1a5cdd60621b6044820152606401610cc8565b6000816129cf84670de0b6b3a7640000614c3c565b6129d99190614ba5565b9392505050565b670de0b6b3a7640000821015612a385760405162461bcd60e51b815260206004820152601860248201527f496e73756666696369656e74206d61726b6574207365656400000000000000006044820152606401610cc8565b6000612a45836002614c3c565b9050612a51828261396a565b63ffffffff8216600090815261015e6020526040908190205490516304831f7160e51b8152600481018390526001600160a01b0390911690639063ee2090602401600060405180830381600087803b158015612aac57600080fd5b505af1158015612ac0573d6000803e3d6000fd5b5050505063ffffffff8216600090815261018d6020908152604080832060018452909152908190205490516340c10f1960e01b815273f10a7f10a7f10a7f10a7f10a7f10a7f10a7f10a76004820152602481018590526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015612b4557600080fd5b505af1158015612b59573d6000803e3d6000fd5b5050505063ffffffff8216600090815261018d60209081526040808320838052909152908190205490516340c10f1960e01b815273f10a7f10a7f10a7f10a7f10a7f10a7f10a7f10a76004820152602481018590526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015612bdd57600080fd5b505af1158015612bf1573d6000803e3d6000fd5b5050505063ffffffff91909116600090815261018e602090815260408083206001845290915280822084905581805290209190915550565b600054610100900460ff1680612c42575060005460ff16155b612c5e5760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015612c80576000805461ffff19166101011790555b612c886139ab565b612c90613a2e565b612c9982613a8c565b8015610cdb576000805461ff00191690555050565b63ffffffff82166000908152610159602090815260408083205461018e835281842060018552808452828520548580529352908320549192612cf08385614b5f565b9050600080612d0188878786613b55565b63ffffffff8a16600090815261015e602052604080822054905163452accd960e11b81526004810188905260248101849052939550919350916001600160a01b0390911690638a5599b290604401602060405180830381600087803b158015612d6957600080fd5b505af1158015612d7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612da19190614494565b90508015612dcd578215612dc057612db98188614b5f565b9650612dcd565b612dca8187614b5f565b95505b6000612dd98888613bcd565b90506000612def87670de0b6b3a7640000614bb9565b63ffffffff8c16600090815261015c602052604090205483612e118a8e614c5b565b612e1b9190614bb9565b612e259190614bb9565b612e2f9190614b77565b90506000811215612e8857612e4381614d33565b905088811115612e6b57620186a0612e5e8a6201869f614bb9565b612e689190614b77565b90505b612e75818a614c9a565b9850612e818189614b5f565b9750612ec7565b87811115612eae57620186a0612ea1896201869f614bb9565b612eab9190614b77565b90505b612eb8818a614b5f565b9850612ec48189614c9a565b97505b505050505050509250929050565b63ffffffff8316600090815261019060209081526040808320600184529091528120548190819081908015612f375763ffffffff881660009081526101906020908152604080832060018452909152812055935083612f3481886129ba565b92505b5063ffffffff87166000908152610190602090815260408083208380529091529020548015612f925763ffffffff8816600090815261019060209081526040808320838052909152812055925082612f8f81876129ba565b91505b5063ffffffff871660009081526101926020908152604080832060018452909152902054801561302a576000612fc88289613be3565b9050612fd48187614c5b565b9550612fe08186614b1e565b9450612fec8285614c5b565b9350612ff9828989612787565b6130039084614b1e565b63ffffffff8a16600090815261019260209081526040808320600184529091528120559250505b5063ffffffff871660009081526101926020908152604080832083805290915290205480156130c057600061305f8288613be3565b905061306b8186614c5b565b94506130778187614b1e565b95506130838284614c5b565b925061309082888a612787565b61309a9085614b1e565b63ffffffff8a166000908152610192602090815260408083208380529091528120559350505b5063ffffffff8716600090815261019160209081526040808320600184529091529020548015613130576130f48188613be3565b6130fe9086614c5b565b945061310a8184614c5b565b63ffffffff89166000908152610191602090815260408083206001845290915281205592505b5063ffffffff8716600090815261019160209081526040808320838052909152902054801561319e576131638187613be3565b61316d9085614c5b565b93506131798183614c5b565b63ffffffff891660009081526101916020908152604080832083805290915281205591505b6131b1886131ac8688614b1e565b613bf8565b6131bd88600185613cfc565b6131c988600084613cfc565b505050935093915050565b606060006131e3836002614c3c565b6131ee906002614b5f565b67ffffffffffffffff81111561321457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561323e576020820181803683370190505b509050600360fc1b8160008151811061326757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106132a457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006132c8846002614c3c565b6132d3906001614b5f565b90505b6001811115613367576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061331557634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061333957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361336081614cdd565b90506132d6565b5083156129d95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610cc8565b803b61341a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610cc8565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6134ba5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610cc8565b600080846001600160a01b0316846040516134d59190614864565b600060405180830381855af49150503d8060008114613510576040519150601f19603f3d011682016040523d82523d6000602084013e613515565b606091505b509150915061353d8282604051806060016040528060278152602001614db360279139613e29565b95945050505050565b61354f816133b6565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b63ffffffff831660009081526101c160209081526040808320841515845282528083206001600160a01b0386168452909152902054801561102c5763ffffffff841660008181526101c1602090815260408083208615158085529083528184206001600160a01b03891680865290845282852085905585855261018f84528285209185529083528184209484526101c083528184209084528252808320548352929052908120546136389083906129ba565b63ffffffff8616600090815261018d6020908152604080832087151584529091529081902054905163a9059cbb60e01b81526001600160a01b0387811660048301526024820184905292935091169063a9059cbb90604401602060405180830381600087803b1580156136aa57600080fd5b505af11580156136be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136e29190614409565b505050505050565b63ffffffff831660009081526101c260209081526040808320841515845282528083206001600160a01b0386168452909152902054801561102c5763ffffffff841660008181526101c2602090815260408083208615158085529083528184206001600160a01b03891680865290845282852085905585855261018f84528285209185529083528184209484526101c0835281842090845282528083205483529290529081205461379c908390613be3565b63ffffffff8616600090815261015e6020526040908190205490516375b5ffd160e11b81526001600160a01b0387811660048301526024820184905292935091169063eb6bffa290604401600060405180830381600087803b15801561380157600080fd5b505af1158015613815573d6000803e3d6000fd5b505050505050505050565b63ffffffff831660009081526101c360209081526040808320841515845282528083206001600160a01b0386168452909152902054801561102c5763ffffffff841660009081526101c0602090815260408083206001600160a01b03871684529091528120546138959086908490869061129e565b63ffffffff861660008181526101c3602090815260408083208815801585529083528184206001600160a01b038b811680875291855283862086905595855261018d845282852091855292529182902054915163a9059cbb60e01b8152600481019190915260248101849052929350169063a9059cbb90604401602060405180830381600087803b15801561392957600080fd5b505af115801561393d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139619190614409565b611dcf57600080fd5b63ffffffff808316600090815261015e602090815260408083205461015d90925290912054610cdb926001600160a01b0391821692339216908590613e6216565b600054610100900460ff16806139c4575060005460ff16155b6139e05760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613a02576000805461ffff19166101011790555b613a0a613ebc565b613a12613ebc565b613a1a613ebc565b8015610c2d576000805461ff001916905550565b600054610100900460ff1680613a47575060005460ff16155b613a635760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613a0a576000805461ffff1916610101179055613a12613ebc565b600054610100900460ff1680613aa5575060005460ff16155b613ac15760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613ae3576000805461ffff19166101011790555b6001600160a01b038216613af657600080fd5b613b01600083613f26565b613b2b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583613f26565b612c997f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383613f26565b8183106000808215613b6a5750848403613b6f565b508385035b63ffffffff8716600090815261015b60205260408120548590613b929084614c3c565b613b9c9190614ba5565b90506000613bb282670de0b6b3a7640000613bcd565b905080670de0b6b3a764000003935050505094509492505050565b6000818310613bdc57816129d9565b5090919050565b6000670de0b6b3a76400006129cf8385614c3c565b6000811315613c795763ffffffff8216600090815261015e6020526040908190205490516304831f7160e51b8152600481018390526001600160a01b0390911690639063ee2090602401600060405180830381600087803b158015613c5c57600080fd5b505af1158015613c70573d6000803e3d6000fd5b50505050610cdb565b6000811215610cdb5763ffffffff8216600090815261015e60205260409020546001600160a01b0316631c499b55613cb083614d33565b6040518263ffffffff1660e01b8152600401613cce91815260200190565b600060405180830381600087803b158015613ce857600080fd5b505af11580156136e2573d6000803e3d6000fd5b6000811315613d905763ffffffff8316600090815261018d602090815260408083208515158452909152908190205490516340c10f1960e01b8152306004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015613d7357600080fd5b505af1158015613d87573d6000803e3d6000fd5b50505050610c57565b6000811215610c575763ffffffff8316600090815261018d6020908152604080832085151584529091529020546001600160a01b03166342966c68613dd483614d33565b6040518263ffffffff1660e01b8152600401613df291815260200190565b600060405180830381600087803b158015613e0c57600080fd5b505af1158015613e20573d6000803e3d6000fd5b50505050505050565b60608315613e385750816129d9565b825115613e485782518084602001fd5b8160405162461bcd60e51b8152600401610cc89190614980565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261102c908590613f30565b600054610100900460ff1680613ed5575060005460ff16155b613ef15760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613a1a576000805461ffff19166101011790558015610c2d576000805461ff001916905550565b610cdb828261222d565b6000613f85826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166140029092919063ffffffff16565b805190915015610c575780806020019051810190613fa39190614409565b610c575760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610cc8565b606061279e848460008585843b61405b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610cc8565b600080866001600160a01b031685876040516140779190614864565b60006040518083038185875af1925050503d80600081146140b4576040519150601f19603f3d011682016040523d82523d6000602084013e6140b9565b606091505b50915091506112e9828286613e29565b60008083601f8401126140da578182fd5b50813567ffffffffffffffff8111156140f1578182fd5b60208301915083602082850101111561410957600080fd5b9250929050565b803563ffffffff81168114610c1f57600080fd5b600060208284031215614135578081fd5b81356129d981614d8f565b600060208284031215614151578081fd5b81516129d981614d8f565b60008060008060808587031215614171578283fd5b843561417c81614d8f565b9350602085013561418c81614d8f565b9250604085013561419c81614d8f565b915060608501356141ac81614d8f565b939692955090935050565b600080604083850312156141c9578182fd5b82356141d481614d8f565b915060208381013567ffffffffffffffff808211156141f1578384fd5b818601915086601f830112614204578384fd5b81358181111561421657614216614d79565b8060051b9150614227848301614aed565b8181528481019084860184860187018b1015614241578788fd5b8795505b8386101561426a5761425681614110565b835260019590950194918601918601614245565b508096505050505050509250929050565b6000806040838503121561428d578182fd5b823561429881614d8f565b915060208381013567ffffffffffffffff808211156142b5578384fd5b818601915086601f8301126142c8578384fd5b8135818111156142da576142da614d79565b6142ec601f8201601f19168501614aed565b91508082528784828501011115614301578485fd5b8084840185840137810190920192909252919491935090915050565b6000806040838503121561432f578182fd5b823561433a81614d8f565b915061434860208401614110565b90509250929050565b600080600060608486031215614365578283fd5b833561437081614d8f565b925061437e60208501614110565b9150604084013561438e81614da4565b809150509250925092565b600080602083850312156143ab578182fd5b823567ffffffffffffffff808211156143c2578384fd5b818501915085601f8301126143d5578384fd5b8135818111156143e3578485fd5b8660208260051b85010111156143f7578485fd5b60209290920196919550909350505050565b60006020828403121561441a578081fd5b81516129d981614da4565b600060208284031215614436578081fd5b5035919050565b6000806040838503121561444f578182fd5b82359150602083013561446181614d8f565b809150509250929050565b60006020828403121561447d578081fd5b81356001600160e01b0319811681146129d9578182fd5b6000602082840312156144a5578081fd5b5051919050565b600080600080600080600060a0888a0312156144c6578485fd5b873567ffffffffffffffff808211156144dd578687fd5b6144e98b838c016140c9565b909950975060208a0135915080821115614501578687fd5b5061450e8a828b016140c9565b909650945050604088013561452281614d8f565b9250606088013561453281614d8f565b9150608088013561454281614d8f565b8091505092959891949750929550565b600080600080600080600080600060e08a8c03121561456f578283fd5b893567ffffffffffffffff80821115614586578485fd5b6145928d838e016140c9565b909b50995060208c01359150808211156145aa578485fd5b506145b78c828d016140c9565b90985096505060408a01356145cb81614d8f565b945060608a01356145db81614d8f565b935060808a01356145eb81614d8f565b925060a08a01356145fb81614d8f565b915060c08a013561460b81614d8f565b809150509295985092959850929598565b60006020828403121561462d578081fd5b6129d982614110565b60008060408385031215614648578182fd5b61465183614110565b9150602083013561446181614d8f565b60008060408385031215614673578182fd5b61467c83614110565b9150602083013561446181614da4565b6000806000606084860312156146a0578081fd5b6146a984614110565b925060208401356146b981614da4565b9150604084013561438e81614d8f565b6000806000606084860312156146dd578081fd5b6146e684614110565b925060208401356146f681614da4565b929592945050506040919091013590565b60008060408385031215614719578182fd5b61472283614110565b946020939093013593505050565b600080600060608486031215614744578081fd5b61474d84614110565b925060208401359150604084013561438e81614da4565b60008060008060808587031215614779578182fd5b61478285614110565b935060208501359250604085013561479981614da4565b9396929550929360600135925050565b60008060008060008060008060006101208a8c0312156147c7578283fd5b6147d08a614110565b9b60208b01359b5060408b01359a60608101359a506080810135995060a0810135985060c0810135975060e081013596506101000135945092505050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452614850816020860160208601614cb1565b601f01601f19169290920160200192915050565b60008251614876818460208701614cb1565b9190910192915050565b600061667360f01b8252828460028401379101600201908152919050565b60006b0233637b0ba1029b437b93a160a51b82528284600c8401379101600c01908152919050565b600061199b60f21b8252828460028401379101600201908152919050565b60007f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008252835161491c816017850160208801614cb1565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161494d816028840160208801614cb1565b01602801949350505050565b60006a0233637b0ba102637b733960ad1b82528284600b8401379101600b01908152919050565b6000602082526129d96020830184614838565b600060a082526149a660a0830188614838565b82810360208401526149b88188614838565b6001600160a01b03969096166040840152505063ffffffff929092166060830152151560809091015292915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b63ffffffff8c1681526001600160a01b038b811660208301528a8116604083015289811660608301526080820189905261012060a08301819052600091614a7f8483018a8c61480e565b915083820360c0850152614a9482888a61480e565b925080861660e085015280851661010085015250509c9b505050505050505050505050565b63ffffffff959095168552921515602085015260408401919091526001600160a01b03166060830152608082015260a00190565b604051601f8201601f1916810167ffffffffffffffff81118282101715614b1657614b16614d79565b604052919050565b600080821280156001600160ff1b0384900385131615614b4057614b40614d4d565b600160ff1b8390038412811615614b5957614b59614d4d565b50500190565b60008219821115614b7257614b72614d4d565b500190565b600082614b8657614b86614d63565b600160ff1b821460001984141615614ba057614ba0614d4d565b500590565b600082614bb457614bb4614d63565b500490565b60006001600160ff1b0381841382841380821686840486111615614bdf57614bdf614d4d565b600160ff1b84871282811687830589121615614bfd57614bfd614d4d565b858712925087820587128484161615614c1857614c18614d4d565b87850587128184161615614c2e57614c2e614d4d565b505050929093029392505050565b6000816000190483118215151615614c5657614c56614d4d565b500290565b60008083128015600160ff1b850184121615614c7957614c79614d4d565b6001600160ff1b0384018313811615614c9457614c94614d4d565b50500390565b600082821015614cac57614cac614d4d565b500390565b60005b83811015614ccc578181015183820152602001614cb4565b8381111561102c5750506000910152565b600081614cec57614cec614d4d565b506000190190565b6000600019821415614d0857614d08614d4d565b5060010190565b600063ffffffff80831681811415614d2957614d29614d4d565b6001019392505050565b6000600160ff1b821415614d4957614d49614d4d565b0390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c2d57600080fd5b8015158114610c2d57600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122019c08cac8a0f49b932356c300d2307de330f5556f8e594b13b296ff33c2c3ffd64736f6c63430008030033", + "deployedBytecode": "0x60806040526004361061031a5760003560e01c8063867dfc6d116101ab578063c2b80072116100f7578063eeb0235211610095578063f72c0d8b1161006f578063f72c0d8b14610b3e578063f7cbb68714610b72578063f80c9b9214610b92578063f8c8765e14610bcb5761031a565b8063eeb0235214610ac7578063f41cb19514610ae7578063f68a327f14610b1e5761031a565b8063d88905c9116100d1578063d88905c914610a46578063da04ce1414610a66578063e6b604e014610a86578063e77772fe14610aa65761031a565b8063c2b80072146109c7578063c2e1247114610a06578063d547741f14610a265761031a565b80639c5b0ee311610164578063b054c4a11161013e578063b054c4a1146108f3578063b36f537414610935578063b3c7e21814610966578063bb0a45291461099f5761031a565b80639c5b0ee31461086e5780639dc39e0f146108a5578063a217fddf146108de5761031a565b8063867dfc6d146107a05780638900bdfa146107c0578063897a0786146107ee57806391a9fa611461080e57806391d148541461082e57806392f6fe801461084e5761031a565b80634f1ef2861161026a578063682ad286116102235780636f486c5b116101fd5780636f486c5b146106ed57806371fd96231461072c57806375b238fc1461074c5780637a0e94f0146107805761031a565b8063682ad2861461068c5780636c305055146106ac5780636c8d2b97146106cd5761031a565b80634f1ef286146105965780635ebaf1db146105a9578063602aabab146105d2578063636190c81461060057806364d16f531461063357806364e4a81d146106535761031a565b8063248a9ca3116102d757806334daaa25116102b157806334daaa25146104fd57806336568abe146105365780633659cfe6146105565780633d6a2b3f146105765761031a565b8063248a9ca31461046e5780632f2ff15d1461049e57806334898684146104be5761031a565b806301ffc9a71461031f57806305c8146f146103545780630e5140dc1461037657806314c88ffa146103c35780631badf5c0146103f157806321658e4814610440575b600080fd5b34801561032b57600080fd5b5061033f61033a36600461446c565b610beb565b60405190151581526020015b60405180910390f35b34801561036057600080fd5b5061037461036f36600461461c565b610c24565b005b34801561038257600080fd5b506103b561039136600461468c565b6101c360209081526000938452604080852082529284528284209052825290205481565b60405190815260200161034b565b3480156103cf57600080fd5b506103b56103de36600461461c565b61015a6020526000908152604090205481565b3480156103fd57600080fd5b5061042861040c36600461461c565b61015f602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161034b565b34801561044c57600080fd5b506103b561045b36600461461c565b61015b6020526000908152604090205481565b34801561047a57600080fd5b506103b5610489366004614425565b60009081526065602052604090206001015490565b3480156104aa57600080fd5b506103746104b936600461443d565b610c30565b3480156104ca57600080fd5b506103b56104d936600461468c565b6101c260209081526000938452604080852082529284528284209052825290205481565b34801561050957600080fd5b506103b5610518366004614661565b61019160209081526000928352604080842090915290825290205481565b34801561054257600080fd5b5061037461055136600461443d565b610c5c565b34801561056257600080fd5b50610374610571366004614124565b610cdf565b34801561058257600080fd5b50610374610591366004614552565b610d03565b6103746105a436600461427b565b610f2a565b3480156105b557600080fd5b50610128546104289064010000000090046001600160a01b031681565b3480156105de57600080fd5b506103b56105ed36600461461c565b61015c6020526000908152604090205481565b34801561060c57600080fd5b506101285461061e9063ffffffff1681565b60405163ffffffff909116815260200161034b565b34801561063f57600080fd5b5061037461064e366004614636565b610f3f565b34801561065f57600080fd5b506103b561066e366004614661565b61019060209081526000928352604080842090915290825290205481565b34801561069857600080fd5b506103746106a7366004614707565b610fc5565b3480156106b857600080fd5b5061012a54610428906001600160a01b031681565b3480156106d957600080fd5b506103746106e8366004614399565b610fd1565b3480156106f957600080fd5b506103b56107083660046146c9565b61018f60209081526000938452604080852082529284528284209052825290205481565b34801561073857600080fd5b50610374610747366004614730565b611032565b34801561075857600080fd5b506103b57fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561078c57600080fd5b5061037461079b3660046141b7565b611201565b3480156107ac57600080fd5b506103746107bb366004614707565b611251565b3480156107cc57600080fd5b506103b56107db36600461461c565b6101596020526000908152604090205481565b3480156107fa57600080fd5b5061037461080936600461431d565b61125d565b34801561081a57600080fd5b50610374610829366004614707565b611267565b34801561083a57600080fd5b5061033f61084936600461443d565b611273565b34801561085a57600080fd5b506103b5610869366004614764565b61129e565b34801561087a57600080fd5b5061042861088936600461461c565b61015e602052600090815260409020546001600160a01b031681565b3480156108b157600080fd5b506103b56108c0366004614636565b6101c060209081526000928352604080842090915290825290205481565b3480156108ea57600080fd5b506103b5600081565b3480156108ff57600080fd5b5061042861090e366004614661565b61018d6020908152600092835260408084209091529082529020546001600160a01b031681565b34801561094157600080fd5b5061033f61095036600461461c565b6101586020526000908152604090205460ff1681565b34801561097257600080fd5b506103b5610981366004614661565b61018e60209081526000928352604080842090915290825290205481565b3480156109ab57600080fd5b5061042873f10a7f10a7f10a7f10a7f10a7f10a7f10a7f10a781565b3480156109d357600080fd5b506103b56109e236600461468c565b6101c160209081526000938452604080852082529284528284209052825290205481565b348015610a1257600080fd5b50610374610a21366004614707565b6112f4565b348015610a3257600080fd5b50610374610a4136600461443d565b611300565b348015610a5257600080fd5b50610374610a613660046144ac565b611326565b348015610a7257600080fd5b50610374610a81366004614707565b6117f4565b348015610a9257600080fd5b50610374610aa1366004614707565b611816565b348015610ab257600080fd5b5061012954610428906001600160a01b031681565b348015610ad357600080fd5b50610374610ae2366004614707565b611822565b348015610af357600080fd5b50610428610b0236600461461c565b61015d602052600090815260409020546001600160a01b031681565b348015610b2a57600080fd5b506103b5610b39366004614351565b61182e565b348015610b4a57600080fd5b506103b57f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b348015610b7e57600080fd5b50610374610b8d3660046147a9565b61199a565b348015610b9e57600080fd5b506103b5610bad366004614661565b61019260209081526000928352604080842090915290825290205481565b348015610bd757600080fd5b50610374610be636600461415c565b611c74565b60006001600160e01b03198216637965db0b60e01b1480610c1c57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b610c2d81611dd6565b50565b600082815260656020526040902060010154610c4d81335b6121c9565b610c57838361222d565b505050565b6001600160a01b0381163314610cd15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610cdb82826122b3565b5050565b610ce88161231a565b610c2d81604051806020016040528060008152506000612345565b610d0b6124c6565b6101288054600091908290610d259063ffffffff16614d0f565b91906101000a81548163ffffffff021916908363ffffffff16021790559050816001600160a01b031663edf565cc6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610d7f57600080fd5b505af1158015610d93573d6000803e3d6000fd5b5050505063ffffffff8116600081815261018d6020908152604080832060018452825280832080546001600160a01b03199081166001600160a01b038d811691909117909255848052828520805482168c841617905594845261015d8352818420805486168a831617905561015e83528184208054861688831617905561015f835281842080549095169088169081179094558051630ce74fc560e31b8152905163673a7e2893600480840194938390030190829087803b158015610e5757600080fd5b505af1158015610e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8f9190614494565b61015960008363ffffffff1663ffffffff168152602001908152602001600020819055507f901e73890694712ca72bdc627d356f05f11be45e7ccf490a8d4924c393bcb5658187878761015960008763ffffffff1663ffffffff168152602001908152602001600020548f8f8f8f8c8c604051610f169b9a99989796959493929190614a35565b60405180910390a150505050505050505050565b610f338261231a565b610cdb82826001612345565b610f476124c6565b63ffffffff8216600081815261015f602090815260409182902080546001600160a01b038681166001600160a01b03198316811790935584519586521691840182905291830191909152907ffc4d69f373858d480cfc3f12e7cc7f9b12201291753ffc3babef0e7a8041979f906060015b60405180910390a1505050565b610cdb82826000611032565b8060005b8181101561102c5761101a84848381811061100057634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611015919061461c565b611dd6565b8061102481614cf4565b915050610fd5565b50505050565b338361103d81611dd6565b61104782826124f2565b61104f6125f3565b63ffffffff8516600090815261018d602090815260408083208615158452909152908190205490516323b872dd60e01b8152336004820152306024820152604481018690526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156110c357600080fd5b505af11580156110d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fb9190614409565b61110457600080fd5b63ffffffff851660009081526101c360209081526040808320861515845282528083203384529091528120805486929061113f908490614b5f565b909155505063ffffffff8516600090815261015a6020526040812054611166906001614b5f565b63ffffffff871660008181526101c0602090815260408083203384528252808320859055928252610192815282822088151583529052908120805492935087929091906111b4908490614b5f565b90915550506040517fd850f5d8405edb0730cd72e6bb9e228043c91fd591562543ea553efda14970b6906111f19088908790899033908790614ab9565b60405180910390a1505050505050565b805160005b8181101561102c5761123f8484838151811061123257634e487b7160e01b600052603260045260246000fd5b60200260200101516124f2565b8061124981614cf4565b915050611206565b610cdb82826001612668565b610cdb82826124f2565b610cdb82826000612668565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b63ffffffff8416600090815261018f602090815260408083208515801585528184528285208686528452828520549085529083528184208585529092528220546112e9868383612787565b979650505050505050565b610cdb828260016127a6565b60008281526065602052604090206001015461131c8133610c48565b610c5783836122b3565b61132e6124c6565b6001600160a01b0383161580159061134e57506001600160a01b03821615155b801561136257506001600160a01b03811615155b61136b57600080fd5b61012880546000919082906113859063ffffffff16614d0f565b91906101000a81548163ffffffff021916908363ffffffff16021790559050600061012860049054906101000a90046001600160a01b03169050826001600160a01b031663edf565cc6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156113fa57600080fd5b505af115801561140e573d6000803e3d6000fd5b5050610129546040516001600160a01b03909116925063e6d30467915061143b908c908c90602001614959565b604051602081830303815290604052898960405160200161145d9291906148c6565b604051602081830303815290604052848660016040518663ffffffff1660e01b8152600401611490959493929190614993565b602060405180830381600087803b1580156114aa57600080fd5b505af11580156114be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e29190614140565b63ffffffff8316600090815261018d602090815260408083206001845282529182902080546001600160a01b0319166001600160a01b03948516179055610129549151919092169163e6d304679161153e918d918d910161489e565b6040516020818303038152906040528989604051602001611560929190614880565b604051602081830303815290604052848660006040518663ffffffff1660e01b8152600401611593959493929190614993565b602060405180830381600087803b1580156115ad57600080fd5b505af11580156115c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e59190614140565b63ffffffff8316600081815261018d60209081526040808320838052825280832080546001600160a01b03199081166001600160a01b039788161790915593835261015d8252808320805485168b871617905561015e82528083208054851689871617905561015f825280832080549094169489169485179093558251630ce74fc560e31b8152925163673a7e2893600480820194918390030190829087803b15801561169157600080fd5b505af11580156116a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c99190614494565b61015960008463ffffffff1663ffffffff168152602001908152602001600020819055507f901e73890694712ca72bdc627d356f05f11be45e7ccf490a8d4924c393bcb5658261018d60008563ffffffff1663ffffffff1681526020019081526020016000206000600115151515815260200190815260200160002060009054906101000a90046001600160a01b031661018d60008663ffffffff1663ffffffff16815260200190815260200160002060008015151515815260200190815260200160002060009054906101000a90046001600160a01b03168861015960008863ffffffff1663ffffffff168152602001908152602001600020548e8e8e8e8d8d6040516117e19b9a99989796959493929190614a35565b60405180910390a1505050505050505050565b6117fc6124c6565b63ffffffff909116600090815261015b6020526040902055565b610cdb828260006127a6565b610cdb82826001611032565b60008261183a8161295d565b63ffffffff8416600090815261015a60209081526040808320546101c083528184206001600160a01b038a16855290925290912054801580159061187e5750818111155b156119905763ffffffff861660009081526101c160209081526040808320881515845282528083206001600160a01b038b16845290915290205480156118f85763ffffffff8716600090815261018f60209081526040808320891515845282528083208584529091529020546118f482826129ba565b9550505b63ffffffff871660009081526101c3602090815260408083208915845282528083206001600160a01b038c168452909152902054801561198d5763ffffffff8816600090815261018f602090815260408083208a15808552818452828520888652845282852054901585529083528184208785529092529091205461197e838383612787565b6119889089614b5f565b975050505b50505b5050509392505050565b6119a26124c6565b87158015906119b057508515155b80156119bb57508415155b80156119c657508315155b80156119d157508115155b6119da57600080fd5b63ffffffff89166000908152610158602052604090205460ff1615611a375760405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610cc8565b6101285463ffffffff908116908a161115611a855760405162461bcd60e51b815260206004820152600e60248201526d0d2dcc8caf040e8dede40d0d2ced60931b6044820152606401610cc8565b63ffffffff8916600090815261015860209081526040808320805460ff1916600190811790915561015b835281842086905561015a90925290912055611acb858a6129e0565b63ffffffff8916600081815261015c602090815260408083208590556101285461018d835281842060018552909252808320548380529281902054905163b0956b5f60e01b815260048101949094526001600160a01b03928316602485015282166044840152606483018b9052608483018a905260a4830189905260c4830187905260e483018690526401000000009004169063b0956b5f9061010401600060405180830381600087803b158015611b8257600080fd5b505af1158015611b96573d6000803e3d6000fd5b5050610128546040516317b4d3fb60e31b815263ffffffff8d16600482015260016024820152670de0b6b3a76400006044820181905260648201526084810189905260a481018990526401000000009091046001600160a01b0316925063bda69fd8915060c401600060405180830381600087803b158015611c1757600080fd5b505af1158015611c2b573d6000803e3d6000fd5b50506040805163ffffffff8d168152602081018990529081018490527f95eeb1c33a758f56bd880588063c2f122e39c8885929e5fbbbd57418b97e58d0925060600190506117e1565b600054610100900460ff1680611c8d575060005460ff16155b611ca95760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015611ccb576000805461ffff19166101011790555b6001600160a01b03851615801590611ceb57506001600160a01b03841615155b8015611cff57506001600160a01b03831615155b8015611d1357506001600160a01b03821615155b611d1c57600080fd5b611d2585612c29565b61012980546001600160a01b03199081166001600160a01b038781169182179093556101288054640100000000600160c01b0319166401000000008886169081029190911790915561012a80549093168685161790925560408051938916845260208401919091528201527f48aa6e6153c5dedbe00925ab3c8e28c6ce0c1a80652b3369f176065e797b45079060600160405180910390a18015611dcf576000805461ff00191690555b5050505050565b80611de08161295d565b63ffffffff8216600090815261015f60209081526040808320548151630ce74fc560e31b815291516001600160a01b039091169263673a7e28926004808201939182900301818787803b158015611e3657600080fd5b505af1158015611e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6e9190614494565b63ffffffff8416600090815261015a602090815260408083205461015990925290912054919250908214801590611dcf5763ffffffff8516600090815261018f6020908152604080832060018452808352818420868552835281842054848052908352818420868552909252822054909180611eea8988612cae565b63ffffffff8b16600090815261018d602090815260408083206001845282528083205481516318160ddd60e01b81529151959750939550611f949487946001600160a01b0316936318160ddd93600480850194919392918390030190829087803b158015611f5757600080fd5b505af1158015611f6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8f9190614494565b6129ba565b63ffffffff8a16600090815261018d6020908152604080832083805282528083205481516318160ddd60e01b81529151949850611fff9486946001600160a01b03909216936318160ddd93600480820194929392918390030190829087803b158015611f5757600080fd5b63ffffffff8a1660009081526101596020526040902088905592508561202481614cf4565b63ffffffff8b16600090815261015a6020908152604080832084905561018f82528083206001845280835281842085855283528184208a9055838052825280832084845290915281208690559097509050806120818b8787612ed5565b90925090506120908285614b1e565b935061209c8184614b1e565b63ffffffff8c16600081815261018e6020908152604080832060018452909152808220889055818052908190208390556101285490516317b4d3fb60e31b81526004810192909252602482018b905260448201899052606482018890526084820187905260a482018390529194506401000000009091046001600160a01b03169063bda69fd89060c401600060405180830381600087803b15801561214057600080fd5b505af1158015612154573d6000803e3d6000fd5b50506040805163ffffffff8f168152602081018c90529081018c9052606081018790526080810186905260a0810189905260c081018890527f69e662f95898affac086a5bc1177755bdaf7f4a40a3880364c48012170ee57fe925060e001905060405180910390a15050505050505050505050565b6121d38282611273565b610cdb576121eb816001600160a01b031660146131d4565b6121f68360206131d4565b6040516020016122079291906148e4565b60408051601f198184030181529082905262461bcd60e51b8252610cc891600401614980565b6122378282611273565b610cdb5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561226f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6122bd8282611273565b15610cdb5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610cdb8133610c48565b60006123787f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050612383846133b6565b6000835111806123905750815b156123a15761239f848461345b565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16611dcf57805460ff191660011781556040516001600160a01b038316602482015261242090869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b17905261345b565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146124bd5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610cc8565b611dcf85613546565b6124f07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336121c9565b565b63ffffffff811660009081526101c0602090815260408083206001600160a01b03861684529091529020548015801590612542575063ffffffff8216600090815261015a60205260409020548111155b15610c575761255382846001613586565b61255f82846000613586565b61256b828460016136ea565b612577828460006136ea565b61258382846001613820565b61258f82846000613820565b63ffffffff821660008181526101c0602090815260408083206001600160a01b038816808552908352818420939093558051928352908201929092527fe03aa867e2345cc967d98e4c81f6b0707b5ef082d9d20bac3dcf95540acdeae49101610fb8565b6101285464010000000090046001600160a01b031633146124f05761012a546040516324b4085360e21b81523360048201526001600160a01b03909116906392d0214c90602401600060405180830381600087803b15801561265457600080fd5b505af115801561102c573d6000803e3d6000fd5b338361267381611dd6565b61267d82826124f2565b6126856125f3565b61268f858561396a565b63ffffffff85166000908152610190602090815260408083208615158452909152812080548692906126c2908490614b5f565b909155505063ffffffff851660009081526101c1602090815260408083208615158452825280832033845290915281208054869290612702908490614b5f565b909155505063ffffffff8516600090815261015a6020526040812054612729906001614b5f565b63ffffffff871660009081526101c0602090815260408083203380855292529182902083905590519192507f50b8727b538cf16daeb79894e8bde5c1e975985071be8a8d7620675a5dddfc6b916111f191899188918a918790614ab9565b6000816127948486614c3c565b61279e9190614ba5565b949350505050565b33836127b181611dd6565b6127bb82826124f2565b6127c36125f3565b63ffffffff8516600090815261018d602090815260408083208615158452909152908190205490516323b872dd60e01b8152336004820152306024820152604481018690526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561283757600080fd5b505af115801561284b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286f9190614409565b5063ffffffff851660009081526101c26020908152604080832086151584528252808320338452909152812080548692906128ab908490614b5f565b909155505063ffffffff8516600090815261015a60205260408120546128d2906001614b5f565b63ffffffff871660008181526101c060209081526040808320338452825280832085905592825261019181528282208815158352905290812080549293508792909190612920908490614b5f565b90915550506040517f191d5f0d51691cdc223884e5321013c9663c6b337a07d550c538d9dcbbd66203906111f19088908790899033908790614ab9565b63ffffffff81166000908152610158602052604090205460ff16610c2d5760405162461bcd60e51b81526020600482015260146024820152731b585c9ad95d08191bd95cdb89dd08195e1a5cdd60621b6044820152606401610cc8565b6000816129cf84670de0b6b3a7640000614c3c565b6129d99190614ba5565b9392505050565b670de0b6b3a7640000821015612a385760405162461bcd60e51b815260206004820152601860248201527f496e73756666696369656e74206d61726b6574207365656400000000000000006044820152606401610cc8565b6000612a45836002614c3c565b9050612a51828261396a565b63ffffffff8216600090815261015e6020526040908190205490516304831f7160e51b8152600481018390526001600160a01b0390911690639063ee2090602401600060405180830381600087803b158015612aac57600080fd5b505af1158015612ac0573d6000803e3d6000fd5b5050505063ffffffff8216600090815261018d6020908152604080832060018452909152908190205490516340c10f1960e01b815273f10a7f10a7f10a7f10a7f10a7f10a7f10a7f10a76004820152602481018590526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015612b4557600080fd5b505af1158015612b59573d6000803e3d6000fd5b5050505063ffffffff8216600090815261018d60209081526040808320838052909152908190205490516340c10f1960e01b815273f10a7f10a7f10a7f10a7f10a7f10a7f10a7f10a76004820152602481018590526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015612bdd57600080fd5b505af1158015612bf1573d6000803e3d6000fd5b5050505063ffffffff91909116600090815261018e602090815260408083206001845290915280822084905581805290209190915550565b600054610100900460ff1680612c42575060005460ff16155b612c5e5760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015612c80576000805461ffff19166101011790555b612c886139ab565b612c90613a2e565b612c9982613a8c565b8015610cdb576000805461ff00191690555050565b63ffffffff82166000908152610159602090815260408083205461018e835281842060018552808452828520548580529352908320549192612cf08385614b5f565b9050600080612d0188878786613b55565b63ffffffff8a16600090815261015e602052604080822054905163452accd960e11b81526004810188905260248101849052939550919350916001600160a01b0390911690638a5599b290604401602060405180830381600087803b158015612d6957600080fd5b505af1158015612d7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612da19190614494565b90508015612dcd578215612dc057612db98188614b5f565b9650612dcd565b612dca8187614b5f565b95505b6000612dd98888613bcd565b90506000612def87670de0b6b3a7640000614bb9565b63ffffffff8c16600090815261015c602052604090205483612e118a8e614c5b565b612e1b9190614bb9565b612e259190614bb9565b612e2f9190614b77565b90506000811215612e8857612e4381614d33565b905088811115612e6b57620186a0612e5e8a6201869f614bb9565b612e689190614b77565b90505b612e75818a614c9a565b9850612e818189614b5f565b9750612ec7565b87811115612eae57620186a0612ea1896201869f614bb9565b612eab9190614b77565b90505b612eb8818a614b5f565b9850612ec48189614c9a565b97505b505050505050509250929050565b63ffffffff8316600090815261019060209081526040808320600184529091528120548190819081908015612f375763ffffffff881660009081526101906020908152604080832060018452909152812055935083612f3481886129ba565b92505b5063ffffffff87166000908152610190602090815260408083208380529091529020548015612f925763ffffffff8816600090815261019060209081526040808320838052909152812055925082612f8f81876129ba565b91505b5063ffffffff871660009081526101926020908152604080832060018452909152902054801561302a576000612fc88289613be3565b9050612fd48187614c5b565b9550612fe08186614b1e565b9450612fec8285614c5b565b9350612ff9828989612787565b6130039084614b1e565b63ffffffff8a16600090815261019260209081526040808320600184529091528120559250505b5063ffffffff871660009081526101926020908152604080832083805290915290205480156130c057600061305f8288613be3565b905061306b8186614c5b565b94506130778187614b1e565b95506130838284614c5b565b925061309082888a612787565b61309a9085614b1e565b63ffffffff8a166000908152610192602090815260408083208380529091528120559350505b5063ffffffff8716600090815261019160209081526040808320600184529091529020548015613130576130f48188613be3565b6130fe9086614c5b565b945061310a8184614c5b565b63ffffffff89166000908152610191602090815260408083206001845290915281205592505b5063ffffffff8716600090815261019160209081526040808320838052909152902054801561319e576131638187613be3565b61316d9085614c5b565b93506131798183614c5b565b63ffffffff891660009081526101916020908152604080832083805290915281205591505b6131b1886131ac8688614b1e565b613bf8565b6131bd88600185613cfc565b6131c988600084613cfc565b505050935093915050565b606060006131e3836002614c3c565b6131ee906002614b5f565b67ffffffffffffffff81111561321457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561323e576020820181803683370190505b509050600360fc1b8160008151811061326757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106132a457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006132c8846002614c3c565b6132d3906001614b5f565b90505b6001811115613367576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061331557634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061333957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361336081614cdd565b90506132d6565b5083156129d95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610cc8565b803b61341a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610cc8565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6134ba5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610cc8565b600080846001600160a01b0316846040516134d59190614864565b600060405180830381855af49150503d8060008114613510576040519150601f19603f3d011682016040523d82523d6000602084013e613515565b606091505b509150915061353d8282604051806060016040528060278152602001614db360279139613e29565b95945050505050565b61354f816133b6565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b63ffffffff831660009081526101c160209081526040808320841515845282528083206001600160a01b0386168452909152902054801561102c5763ffffffff841660008181526101c1602090815260408083208615158085529083528184206001600160a01b03891680865290845282852085905585855261018f84528285209185529083528184209484526101c083528184209084528252808320548352929052908120546136389083906129ba565b63ffffffff8616600090815261018d6020908152604080832087151584529091529081902054905163a9059cbb60e01b81526001600160a01b0387811660048301526024820184905292935091169063a9059cbb90604401602060405180830381600087803b1580156136aa57600080fd5b505af11580156136be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136e29190614409565b505050505050565b63ffffffff831660009081526101c260209081526040808320841515845282528083206001600160a01b0386168452909152902054801561102c5763ffffffff841660008181526101c2602090815260408083208615158085529083528184206001600160a01b03891680865290845282852085905585855261018f84528285209185529083528184209484526101c0835281842090845282528083205483529290529081205461379c908390613be3565b63ffffffff8616600090815261015e6020526040908190205490516375b5ffd160e11b81526001600160a01b0387811660048301526024820184905292935091169063eb6bffa290604401600060405180830381600087803b15801561380157600080fd5b505af1158015613815573d6000803e3d6000fd5b505050505050505050565b63ffffffff831660009081526101c360209081526040808320841515845282528083206001600160a01b0386168452909152902054801561102c5763ffffffff841660009081526101c0602090815260408083206001600160a01b03871684529091528120546138959086908490869061129e565b63ffffffff861660008181526101c3602090815260408083208815801585529083528184206001600160a01b038b811680875291855283862086905595855261018d845282852091855292529182902054915163a9059cbb60e01b8152600481019190915260248101849052929350169063a9059cbb90604401602060405180830381600087803b15801561392957600080fd5b505af115801561393d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139619190614409565b611dcf57600080fd5b63ffffffff808316600090815261015e602090815260408083205461015d90925290912054610cdb926001600160a01b0391821692339216908590613e6216565b600054610100900460ff16806139c4575060005460ff16155b6139e05760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613a02576000805461ffff19166101011790555b613a0a613ebc565b613a12613ebc565b613a1a613ebc565b8015610c2d576000805461ff001916905550565b600054610100900460ff1680613a47575060005460ff16155b613a635760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613a0a576000805461ffff1916610101179055613a12613ebc565b600054610100900460ff1680613aa5575060005460ff16155b613ac15760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613ae3576000805461ffff19166101011790555b6001600160a01b038216613af657600080fd5b613b01600083613f26565b613b2b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583613f26565b612c997f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383613f26565b8183106000808215613b6a5750848403613b6f565b508385035b63ffffffff8716600090815261015b60205260408120548590613b929084614c3c565b613b9c9190614ba5565b90506000613bb282670de0b6b3a7640000613bcd565b905080670de0b6b3a764000003935050505094509492505050565b6000818310613bdc57816129d9565b5090919050565b6000670de0b6b3a76400006129cf8385614c3c565b6000811315613c795763ffffffff8216600090815261015e6020526040908190205490516304831f7160e51b8152600481018390526001600160a01b0390911690639063ee2090602401600060405180830381600087803b158015613c5c57600080fd5b505af1158015613c70573d6000803e3d6000fd5b50505050610cdb565b6000811215610cdb5763ffffffff8216600090815261015e60205260409020546001600160a01b0316631c499b55613cb083614d33565b6040518263ffffffff1660e01b8152600401613cce91815260200190565b600060405180830381600087803b158015613ce857600080fd5b505af11580156136e2573d6000803e3d6000fd5b6000811315613d905763ffffffff8316600090815261018d602090815260408083208515158452909152908190205490516340c10f1960e01b8152306004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015613d7357600080fd5b505af1158015613d87573d6000803e3d6000fd5b50505050610c57565b6000811215610c575763ffffffff8316600090815261018d6020908152604080832085151584529091529020546001600160a01b03166342966c68613dd483614d33565b6040518263ffffffff1660e01b8152600401613df291815260200190565b600060405180830381600087803b158015613e0c57600080fd5b505af1158015613e20573d6000803e3d6000fd5b50505050505050565b60608315613e385750816129d9565b825115613e485782518084602001fd5b8160405162461bcd60e51b8152600401610cc89190614980565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261102c908590613f30565b600054610100900460ff1680613ed5575060005460ff16155b613ef15760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613a1a576000805461ffff19166101011790558015610c2d576000805461ff001916905550565b610cdb828261222d565b6000613f85826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166140029092919063ffffffff16565b805190915015610c575780806020019051810190613fa39190614409565b610c575760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610cc8565b606061279e848460008585843b61405b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610cc8565b600080866001600160a01b031685876040516140779190614864565b60006040518083038185875af1925050503d80600081146140b4576040519150601f19603f3d011682016040523d82523d6000602084013e6140b9565b606091505b50915091506112e9828286613e29565b60008083601f8401126140da578182fd5b50813567ffffffffffffffff8111156140f1578182fd5b60208301915083602082850101111561410957600080fd5b9250929050565b803563ffffffff81168114610c1f57600080fd5b600060208284031215614135578081fd5b81356129d981614d8f565b600060208284031215614151578081fd5b81516129d981614d8f565b60008060008060808587031215614171578283fd5b843561417c81614d8f565b9350602085013561418c81614d8f565b9250604085013561419c81614d8f565b915060608501356141ac81614d8f565b939692955090935050565b600080604083850312156141c9578182fd5b82356141d481614d8f565b915060208381013567ffffffffffffffff808211156141f1578384fd5b818601915086601f830112614204578384fd5b81358181111561421657614216614d79565b8060051b9150614227848301614aed565b8181528481019084860184860187018b1015614241578788fd5b8795505b8386101561426a5761425681614110565b835260019590950194918601918601614245565b508096505050505050509250929050565b6000806040838503121561428d578182fd5b823561429881614d8f565b915060208381013567ffffffffffffffff808211156142b5578384fd5b818601915086601f8301126142c8578384fd5b8135818111156142da576142da614d79565b6142ec601f8201601f19168501614aed565b91508082528784828501011115614301578485fd5b8084840185840137810190920192909252919491935090915050565b6000806040838503121561432f578182fd5b823561433a81614d8f565b915061434860208401614110565b90509250929050565b600080600060608486031215614365578283fd5b833561437081614d8f565b925061437e60208501614110565b9150604084013561438e81614da4565b809150509250925092565b600080602083850312156143ab578182fd5b823567ffffffffffffffff808211156143c2578384fd5b818501915085601f8301126143d5578384fd5b8135818111156143e3578485fd5b8660208260051b85010111156143f7578485fd5b60209290920196919550909350505050565b60006020828403121561441a578081fd5b81516129d981614da4565b600060208284031215614436578081fd5b5035919050565b6000806040838503121561444f578182fd5b82359150602083013561446181614d8f565b809150509250929050565b60006020828403121561447d578081fd5b81356001600160e01b0319811681146129d9578182fd5b6000602082840312156144a5578081fd5b5051919050565b600080600080600080600060a0888a0312156144c6578485fd5b873567ffffffffffffffff808211156144dd578687fd5b6144e98b838c016140c9565b909950975060208a0135915080821115614501578687fd5b5061450e8a828b016140c9565b909650945050604088013561452281614d8f565b9250606088013561453281614d8f565b9150608088013561454281614d8f565b8091505092959891949750929550565b600080600080600080600080600060e08a8c03121561456f578283fd5b893567ffffffffffffffff80821115614586578485fd5b6145928d838e016140c9565b909b50995060208c01359150808211156145aa578485fd5b506145b78c828d016140c9565b90985096505060408a01356145cb81614d8f565b945060608a01356145db81614d8f565b935060808a01356145eb81614d8f565b925060a08a01356145fb81614d8f565b915060c08a013561460b81614d8f565b809150509295985092959850929598565b60006020828403121561462d578081fd5b6129d982614110565b60008060408385031215614648578182fd5b61465183614110565b9150602083013561446181614d8f565b60008060408385031215614673578182fd5b61467c83614110565b9150602083013561446181614da4565b6000806000606084860312156146a0578081fd5b6146a984614110565b925060208401356146b981614da4565b9150604084013561438e81614d8f565b6000806000606084860312156146dd578081fd5b6146e684614110565b925060208401356146f681614da4565b929592945050506040919091013590565b60008060408385031215614719578182fd5b61472283614110565b946020939093013593505050565b600080600060608486031215614744578081fd5b61474d84614110565b925060208401359150604084013561438e81614da4565b60008060008060808587031215614779578182fd5b61478285614110565b935060208501359250604085013561479981614da4565b9396929550929360600135925050565b60008060008060008060008060006101208a8c0312156147c7578283fd5b6147d08a614110565b9b60208b01359b5060408b01359a60608101359a506080810135995060a0810135985060c0810135975060e081013596506101000135945092505050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452614850816020860160208601614cb1565b601f01601f19169290920160200192915050565b60008251614876818460208701614cb1565b9190910192915050565b600061667360f01b8252828460028401379101600201908152919050565b60006b0233637b0ba1029b437b93a160a51b82528284600c8401379101600c01908152919050565b600061199b60f21b8252828460028401379101600201908152919050565b60007f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008252835161491c816017850160208801614cb1565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161494d816028840160208801614cb1565b01602801949350505050565b60006a0233637b0ba102637b733960ad1b82528284600b8401379101600b01908152919050565b6000602082526129d96020830184614838565b600060a082526149a660a0830188614838565b82810360208401526149b88188614838565b6001600160a01b03969096166040840152505063ffffffff929092166060830152151560809091015292915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b63ffffffff8c1681526001600160a01b038b811660208301528a8116604083015289811660608301526080820189905261012060a08301819052600091614a7f8483018a8c61480e565b915083820360c0850152614a9482888a61480e565b925080861660e085015280851661010085015250509c9b505050505050505050505050565b63ffffffff959095168552921515602085015260408401919091526001600160a01b03166060830152608082015260a00190565b604051601f8201601f1916810167ffffffffffffffff81118282101715614b1657614b16614d79565b604052919050565b600080821280156001600160ff1b0384900385131615614b4057614b40614d4d565b600160ff1b8390038412811615614b5957614b59614d4d565b50500190565b60008219821115614b7257614b72614d4d565b500190565b600082614b8657614b86614d63565b600160ff1b821460001984141615614ba057614ba0614d4d565b500590565b600082614bb457614bb4614d63565b500490565b60006001600160ff1b0381841382841380821686840486111615614bdf57614bdf614d4d565b600160ff1b84871282811687830589121615614bfd57614bfd614d4d565b858712925087820587128484161615614c1857614c18614d4d565b87850587128184161615614c2e57614c2e614d4d565b505050929093029392505050565b6000816000190483118215151615614c5657614c56614d4d565b500290565b60008083128015600160ff1b850184121615614c7957614c79614d4d565b6001600160ff1b0384018313811615614c9457614c94614d4d565b50500390565b600082821015614cac57614cac614d4d565b500390565b60005b83811015614ccc578181015183820152602001614cb4565b8381111561102c5750506000910152565b600081614cec57614cec614d4d565b506000190190565b6000600019821415614d0857614d08614d4d565b5060010190565b600063ffffffff80831681811415614d2957614d29614d4d565b6001019392505050565b6000600160ff1b821415614d4957614d49614d4d565b0390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c2d57600080fd5b8015158114610c2d57600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122019c08cac8a0f49b932356c300d2307de330f5556f8e594b13b296ff33c2c3ffd64736f6c63430008030033", + "devdoc": { + "author": "float.capital", + "custom:auditors": "This contract balances long and short sides.", + "details": "All functions in this file are currently `virtual`. This is NOT to encourage inheritance. It is merely for convenince when unit testing.", + "kind": "dev", + "methods": { + "createNewSyntheticMarket(string,string,address,address,address)": { + "details": "This does not make the market active. The `initializeMarket` function was split out separately to this function to reduce costs.", + "params": { + "_oracleManager": "The address of the oracle manager that provides the price feed for this market", + "_paymentToken": "The address of the erc20 token used to buy this synthetic asset this will likely always be DAI", + "_yieldManager": "The contract that manages depositing the paymentToken into a yield bearing protocol", + "syntheticName": "Name of the synthetic asset", + "syntheticSymbol": "Symbol for the synthetic asset" + } + }, + "createNewSyntheticMarketExternalSyntheticTokens(string,string,address,address,address,address,address)": { + "details": "This does not make the market active. The `initializeMarket` function was split out separately to this function to reduce costs.", + "params": { + "_longToken": "Address for the long token.", + "_oracleManager": "The address of the oracle manager that provides the price feed for this market", + "_paymentToken": "The address of the erc20 token used to buy this synthetic asset this will likely always be DAI", + "_shortToken": "Address for the short token.", + "_yieldManager": "The contract that manages depositing the paymentToken into a yield bearing protocol", + "syntheticName": "Name of the synthetic asset", + "syntheticSymbol": "Symbol for the synthetic asset" + } + }, + "executeOutstandingNextPriceSettlementsUser(address,uint32)": { + "params": { + "marketIndex": "An uint32 which uniquely identifies a market.", + "user": "The address of the user for whom to execute the function." + } + }, + "executeOutstandingNextPriceSettlementsUserMulti(address,uint32[])": { + "params": { + "marketIndexes": "An array of int32s which each uniquely identify a market.", + "user": "The address of the user for whom to execute the function." + } + }, + "getAmountSyntheticTokenToMintOnTargetSide(uint32,uint256,bool,uint256)": { + "details": "Intended for use primarily by Staker.sol", + "params": { + "amountSyntheticToken_redeemOnOriginSide": "Amount of synth token in wei.", + "isShiftFromLong": "Whether the token shift is from long to short (true), or short to long (false).", + "marketIndex": "An uint32 which uniquely identifies a market.", + "priceSnapshotIndex": "Index which identifies which synth prices to use." + }, + "returns": { + "amountSyntheticTokensToMintOnTargetSide": "The amount in wei of tokens for the other side that the shift was worth." + } + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "getUsersConfirmedButNotSettledSynthBalance(address,uint32,bool)": { + "details": "Used in SyntheticToken.sol balanceOf to allow for automatic reflection of next price actions.", + "params": { + "isLong": "Whether it is for the long synthetic asset or the short synthetic asset.", + "marketIndex": "An uint32 which uniquely identifies a market.", + "user": "The address of the user for whom to execute the function for." + }, + "returns": { + "confirmedButNotSettledBalance": "The amount in wei of tokens that the user is owed." + } + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,address,address,address)": { + "details": "Calls OpenZeppelin's initializer modifier.", + "params": { + "_admin": "Address of the admin role.", + "_staker": "Address of the contract which handles synthetic asset stakes.", + "_tokenFactory": "Address of the contract which creates synthetic asset tokens." + } + }, + "initializeMarket(uint32,uint256,uint256,uint256,uint256,uint256,int256,uint256,uint256)": { + "details": "Seperated from createNewSyntheticMarket due to gas considerations.", + "params": { + "balanceIncentiveCurve_equilibriumOffset": "An offset to account for naturally imbalanced markets when Float token issuance should differ for market sides. See Staker.sol", + "balanceIncentiveCurve_exponent": "Sets the degree to which Float token issuance differs for market sides in unbalanced markets. See Staker.sol", + "initialMarketSeedForEachMarketSide": "Amount of payment token that will be deposited in each market side to seed the market.", + "kInitialMultiplier": "Linearly decreasing multiplier for Float token issuance for the market when staking synths.", + "kPeriod": "Time which kInitialMultiplier will last", + "marketIndex": "An int32 which uniquely identifies the market.", + "unstakeFee_e18": "Base 1e18 percentage fee levied when unstaking for the market." + } + }, + "mintLongNextPrice(uint32,uint256)": { + "params": { + "amount": "Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.", + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "mintShortNextPrice(uint32,uint256)": { + "params": { + "amount": "Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.", + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "redeemLongNextPrice(uint32,uint256)": { + "params": { + "marketIndex": "An uint32 which uniquely identifies a market.", + "tokens_redeem": "Amount in wei of synth tokens to redeem at the next oracle price." + } + }, + "redeemShortNextPrice(uint32,uint256)": { + "params": { + "marketIndex": "An uint32 which uniquely identifies a market.", + "tokens_redeem": "Amount in wei of synth tokens to redeem at the next oracle price." + } + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "shiftPositionFromLongNextPrice(uint32,uint256)": { + "params": { + "amountSyntheticTokensToShift": "Amount in wei of synthetic tokens to shift from long to short the next oracle price update.", + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "shiftPositionFromShortNextPrice(uint32,uint256)": { + "params": { + "amountSyntheticTokensToShift": "Amount in wei of synthetic tokens to shift from the short to long at the next oracle price update.", + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "shiftPositionNextPrice(uint32,uint256,bool)": { + "details": "Called by external functions to shift either way. Intended for primary use by Staker.sol", + "params": { + "amountSyntheticTokensToShift": "Amount in wei of synthetic tokens to shift from the one side to the other at the next oracle price update.", + "isShiftFromLong": "Whether the token shift is from long to short (true), or short to long (false).", + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "updateMarketOracle(uint32,address)": { + "details": "Can only be called by the current admin.", + "params": { + "_newOracleManager": "Address of the replacement oracle manager.", + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "updateSystemState(uint32)": { + "params": { + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "updateSystemStateMulti(uint32[])": { + "params": { + "marketIndexes": "An array of int32s which uniquely identify markets." + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "stateVariables": { + "PERMANENT_INITIAL_LIQUIDITY_HOLDER": { + "details": "f10a7 spells float in hex - for fun - important part is that the private key for this address in not known." + }, + "__constantsGap": { + "details": "an empty allocation of storage for use in future upgrades - inspiration from OZ: https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/10f0f1a95b1b0fd5520351886bae7a03490f1056/contracts/token/ERC20/ERC20Upgradeable.sol#L361" + } + }, + "title": "Core logic of Float Protocal markets", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "PERMANENT_INITIAL_LIQUIDITY_HOLDER()": { + "notice": "this is the address that permanently locked initial liquidity for markets is held by. These tokens will never move so market can never have zero liquidity on a side." + }, + "changeMarketTreasurySplitGradient(uint32,uint256)": { + "notice": "changes the gradient of the line for determining the yield split between market and treasury." + }, + "createNewSyntheticMarket(string,string,address,address,address)": { + "notice": "Creates an entirely new long/short market tracking an underlying oracle price. Make sure the synthetic names/symbols are unique." + }, + "createNewSyntheticMarketExternalSyntheticTokens(string,string,address,address,address,address,address)": { + "notice": "Creates an entirely new long/short market tracking an underlying oracle price. Uses already created synthetic tokens." + }, + "executeOutstandingNextPriceSettlementsUser(address,uint32)": { + "notice": "After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user." + }, + "executeOutstandingNextPriceSettlementsUserMulti(address,uint32[])": { + "notice": "Executes outstanding next price settlements for a user for multiple markets." + }, + "getAmountSyntheticTokenToMintOnTargetSide(uint32,uint256,bool,uint256)": { + "notice": "Given an executed next price shift from tokens on one market side to the other, determines how many other side tokens the shift was worth." + }, + "getUsersConfirmedButNotSettledSynthBalance(address,uint32,bool)": { + "notice": "The amount of a synth token a user is owed following a batch execution. 4 possible states for next price actions: - \"Pending\" - means the next price update hasn't happened or been enacted on by the updateSystemState function. - \"Confirmed\" - means the next price has been updated by the updateSystemState function. There is still - outstanding (lazy) computation that needs to be executed per user in the batch. - \"Settled\" - there is no more computation left for the user. - \"Non-existent\" - user has no next price actions. This function returns a calculated value only in the case of 'confirmed' next price actions. It should return zero for all other types of next price actions." + }, + "initialize(address,address,address,address)": { + "notice": "Initializes the contract." + }, + "initializeMarket(uint32,uint256,uint256,uint256,uint256,uint256,int256,uint256,uint256)": { + "notice": "Sets a market as active once it has already been setup by createNewSyntheticMarket." + }, + "mintLongNextPrice(uint32,uint256)": { + "notice": "Allows users to mint long synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle." + }, + "mintShortNextPrice(uint32,uint256)": { + "notice": "Allows users to mint short synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle." + }, + "redeemLongNextPrice(uint32,uint256)": { + "notice": "Allows users to redeem long synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle." + }, + "redeemShortNextPrice(uint32,uint256)": { + "notice": "Allows users to redeem short synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle." + }, + "shiftPositionFromLongNextPrice(uint32,uint256)": { + "notice": "Allows users to shift their position from long to short in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle." + }, + "shiftPositionFromShortNextPrice(uint32,uint256)": { + "notice": "Allows users to shift their position from short to long in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle." + }, + "shiftPositionNextPrice(uint32,uint256,bool)": { + "notice": "Allows users to shift their position from one side of the market to the other in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle." + }, + "syntheticToken_priceSnapshot(uint32,bool,uint256)": { + "notice": "synthetic token prices of a given market of a (long/short) at every previous price update" + }, + "updateMarketOracle(uint32,address)": { + "notice": "Update oracle for a market" + }, + "updateSystemState(uint32)": { + "notice": "Updates the state of a market to account for the latest oracle price update." + }, + "updateSystemStateMulti(uint32[])": { + "notice": "Updates the state of multiples markets to account for their latest oracle price updates." + } + }, + "notice": "visit https://float.capital for more info", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/LongShort.sol:LongShort", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/LongShort.sol:LongShort", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/LongShort.sol:LongShort", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 10694, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__constantsGap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 10696, + "contract": "contracts/LongShort.sol:LongShort", + "label": "latestMarket", + "offset": 0, + "slot": "296", + "type": "t_uint32" + }, + { + "astId": 10698, + "contract": "contracts/LongShort.sol:LongShort", + "label": "staker", + "offset": 4, + "slot": "296", + "type": "t_address" + }, + { + "astId": 10700, + "contract": "contracts/LongShort.sol:LongShort", + "label": "tokenFactory", + "offset": 0, + "slot": "297", + "type": "t_address" + }, + { + "astId": 10702, + "contract": "contracts/LongShort.sol:LongShort", + "label": "gems", + "offset": 0, + "slot": "298", + "type": "t_address" + }, + { + "astId": 10706, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__globalStateGap", + "offset": 0, + "slot": "299", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 10710, + "contract": "contracts/LongShort.sol:LongShort", + "label": "marketExists", + "offset": 0, + "slot": "344", + "type": "t_mapping(t_uint32,t_bool)" + }, + { + "astId": 10714, + "contract": "contracts/LongShort.sol:LongShort", + "label": "assetPrice", + "offset": 0, + "slot": "345", + "type": "t_mapping(t_uint32,t_int256)" + }, + { + "astId": 10719, + "contract": "contracts/LongShort.sol:LongShort", + "label": "marketUpdateIndex", + "offset": 0, + "slot": "346", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 10723, + "contract": "contracts/LongShort.sol:LongShort", + "label": "marketTreasurySplitGradient_e18", + "offset": 0, + "slot": "347", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 10727, + "contract": "contracts/LongShort.sol:LongShort", + "label": "marketLeverage_e18", + "offset": 0, + "slot": "348", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 10731, + "contract": "contracts/LongShort.sol:LongShort", + "label": "paymentTokens", + "offset": 0, + "slot": "349", + "type": "t_mapping(t_uint32,t_address)" + }, + { + "astId": 10735, + "contract": "contracts/LongShort.sol:LongShort", + "label": "yieldManagers", + "offset": 0, + "slot": "350", + "type": "t_mapping(t_uint32,t_address)" + }, + { + "astId": 10739, + "contract": "contracts/LongShort.sol:LongShort", + "label": "oracleManagers", + "offset": 0, + "slot": "351", + "type": "t_mapping(t_uint32,t_address)" + }, + { + "astId": 10743, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__marketStateGap", + "offset": 0, + "slot": "352", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 10750, + "contract": "contracts/LongShort.sol:LongShort", + "label": "syntheticTokens", + "offset": 0, + "slot": "397", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_address))" + }, + { + "astId": 10757, + "contract": "contracts/LongShort.sol:LongShort", + "label": "marketSideValueInPaymentToken", + "offset": 0, + "slot": "398", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_uint256))" + }, + { + "astId": 10767, + "contract": "contracts/LongShort.sol:LongShort", + "label": "syntheticToken_priceSnapshot", + "offset": 0, + "slot": "399", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_uint256,t_uint256)))" + }, + { + "astId": 10773, + "contract": "contracts/LongShort.sol:LongShort", + "label": "batched_amountPaymentToken_deposit", + "offset": 0, + "slot": "400", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_uint256))" + }, + { + "astId": 10779, + "contract": "contracts/LongShort.sol:LongShort", + "label": "batched_amountSyntheticToken_redeem", + "offset": 0, + "slot": "401", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_uint256))" + }, + { + "astId": 10785, + "contract": "contracts/LongShort.sol:LongShort", + "label": "batched_amountSyntheticToken_toShiftAwayFrom_marketSide", + "offset": 0, + "slot": "402", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_uint256))" + }, + { + "astId": 10789, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__marketPositonStateGap", + "offset": 0, + "slot": "403", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 10795, + "contract": "contracts/LongShort.sol:LongShort", + "label": "userNextPrice_currentUpdateIndex", + "offset": 0, + "slot": "448", + "type": "t_mapping(t_uint32,t_mapping(t_address,t_uint256))" + }, + { + "astId": 10803, + "contract": "contracts/LongShort.sol:LongShort", + "label": "userNextPrice_paymentToken_depositAmount", + "offset": 0, + "slot": "449", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))" + }, + { + "astId": 10811, + "contract": "contracts/LongShort.sol:LongShort", + "label": "userNextPrice_syntheticToken_redeemAmount", + "offset": 0, + "slot": "450", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))" + }, + { + "astId": 10819, + "contract": "contracts/LongShort.sol:LongShort", + "label": "userNextPrice_syntheticToken_toShiftAwayFrom_marketSide", + "offset": 0, + "slot": "451", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_int256": { + "encoding": "inplace", + "label": "int256", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bool,t_address)": { + "encoding": "mapping", + "key": "t_bool", + "label": "mapping(bool => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bool,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_bool", + "label": "mapping(bool => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_bool,t_mapping(t_uint256,t_uint256))": { + "encoding": "mapping", + "key": "t_bool", + "label": "mapping(bool => mapping(uint256 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_uint256)" + }, + "t_mapping(t_bool,t_uint256)": { + "encoding": "mapping", + "key": "t_bool", + "label": "mapping(bool => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint32,t_address)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint32,t_bool)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint32,t_int256)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => int256)", + "numberOfBytes": "32", + "value": "t_int256" + }, + "t_mapping(t_uint32,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_uint32,t_mapping(t_bool,t_address))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(bool => address))", + "numberOfBytes": "32", + "value": "t_mapping(t_bool,t_address)" + }, + "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(bool => mapping(address => uint256)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bool,t_mapping(t_address,t_uint256))" + }, + "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_uint256,t_uint256)))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(bool => mapping(uint256 => uint256)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bool,t_mapping(t_uint256,t_uint256))" + }, + "t_mapping(t_uint32,t_mapping(t_bool,t_uint256))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(bool => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_bool,t_uint256)" + }, + "t_mapping(t_uint32,t_uint256)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/LongShort.sol:LongShort", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/LongShort.sol:LongShort", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/LongShort_Proxy.json b/deployments/mumbai/LongShort_Proxy.json new file mode 100644 index 0000000..093e8ee --- /dev/null +++ b/deployments/mumbai/LongShort_Proxy.json @@ -0,0 +1,147 @@ +{ + "address": "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x41e573a052c097340fd3ab32c8263f323a0e1f04b1d2ba75f631f72d5580dd01", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "transactionIndex": 3, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000410000000000000000000000000000000000040000000000000000000000010000008000002010000000000000000000000000000000000000000000000002800000000000000000040100000000000000000000000000000000000000000000000000000000000080000000000000000000040000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000000004000000020000000000001000000000000000000000000008000500200000000000000400000000000000000000000000000000000000000000000000000100000", + "blockHash": "0xf846a0e2f7dddf40c460353e23dfe32ec88cfa486e2cf68011df28975196b521", + "transactionHash": "0x41e573a052c097340fd3ab32c8263f323a0e1f04b1d2ba75f631f72d5580dd01", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 18868848, + "transactionHash": "0x41e573a052c097340fd3ab32c8263f323a0e1f04b1d2ba75f631f72d5580dd01", + "address": "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000018e94eb6e6c35e2827386646ee2b53ea1eceac73" + ], + "data": "0x", + "logIndex": 10, + "blockHash": "0xf846a0e2f7dddf40c460353e23dfe32ec88cfa486e2cf68011df28975196b521" + }, + { + "transactionIndex": 3, + "blockNumber": 18868848, + "transactionHash": "0x41e573a052c097340fd3ab32c8263f323a0e1f04b1d2ba75f631f72d5580dd01", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000002a41c347bf6000000000000000000000000000000000000000000000000000824fae5db01becd000000000000000000000000000000000000000000000168e6dda93298cdf4a3000000000000000000000000000000000000000000000000082256c9a685c8cd000000000000000000000000000000000000000000000168e6e04d4ecd49eaa3", + "logIndex": 11, + "blockHash": "0xf846a0e2f7dddf40c460353e23dfe32ec88cfa486e2cf68011df28975196b521" + } + ], + "blockNumber": 18868848, + "cumulativeGasUsed": "1827159", + "status": 1, + "byzantium": true + }, + "args": [ + "0x18e94eb6E6C35E2827386646ee2b53eA1ECeAC73", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/OracleManagerBTC.json b/deployments/mumbai/OracleManagerBTC.json new file mode 100644 index 0000000..2beba42 --- /dev/null +++ b/deployments/mumbai/OracleManagerBTC.json @@ -0,0 +1,251 @@ +{ + "address": "0x41e3d5b198fd4fF2B392Fcc421e3A9D6f4b3B526", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_chainlinkOracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxUpdateIntervalSeconds", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "chainlinkOracle", + "outputs": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getLatestPrice", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracleDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newMaxUpdateIntervalSeconds", + "type": "uint256" + } + ], + "name": "setMaxUpdateInterval", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updatePrice", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x99ab572b7b94afa4f674d00e4d75ae5607618b6ababff01ff1540c9b8d0944b9", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x41e3d5b198fd4fF2B392Fcc421e3A9D6f4b3B526", + "transactionIndex": 1, + "gasUsed": "380214", + "logsBloom": "0x00000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000018020000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000024000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x1d497defafa6bfb6958947fb553e1496a3f5060235ea71cdc6ab26f8afba63d4", + "transactionHash": "0x99ab572b7b94afa4f674d00e4d75ae5607618b6ababff01ff1540c9b8d0944b9", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 18869328, + "transactionHash": "0x99ab572b7b94afa4f674d00e4d75ae5607618b6ababff01ff1540c9b8d0944b9", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" + ], + "data": "0x00000000000000000000000000000000000000000000000000040d686939d4000000000000000000000000000000000000000000000000000707e134023106cd0000000000000000000000000000000000000000000000000dad46abcee0e8340000000000000000000000000000000000000000000000000703d3cb98f732cd0000000000000000000000000000000000000000000000000db15414381abc34", + "logIndex": 2, + "blockHash": "0x1d497defafa6bfb6958947fb553e1496a3f5060235ea71cdc6ab26f8afba63d4" + } + ], + "blockNumber": 18869328, + "cumulativeGasUsed": "401214", + "status": 1, + "byzantium": true + }, + "args": [ + "0x2740EA9F72B23372621D8D718F52609b80c24E61", + "0x007A22900a3B98143368Bd5906f8E17e9867581b", + "27" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_chainlinkOracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxUpdateIntervalSeconds\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainlinkOracle\",\"outputs\":[{\"internalType\":\"contract AggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestPrice\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMaxUpdateIntervalSeconds\",\"type\":\"uint256\"}],\"name\":\"setMaxUpdateInterval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatePrice\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"changeAdmin(address)\":{\"notice\":\"MULTISIG ADMIN FUNCTIONS ///////\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/oracles/OracleManagerChainlinkTestnet.sol\":\"OracleManagerChainlinkTestnet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface AggregatorV3Interface {\\n\\n function decimals()\\n external\\n view\\n returns (\\n uint8\\n );\\n\\n function description()\\n external\\n view\\n returns (\\n string memory\\n );\\n\\n function version()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(\\n uint80 _roundId\\n )\\n external\\n view\\n returns (\\n uint80 roundId,\\n int256 answer,\\n uint256 startedAt,\\n uint256 updatedAt,\\n uint80 answeredInRound\\n );\\n\\n function latestRoundData()\\n external\\n view\\n returns (\\n uint80 roundId,\\n int256 answer,\\n uint256 startedAt,\\n uint256 updatedAt,\\n uint80 answeredInRound\\n );\\n\\n}\\n\",\"keccak256\":\"0xe6f5ac8c47f3b9b6135051efb9216f9ba5b312a6ecc20209b4f66a780443c328\",\"license\":\"MIT\"},\"contracts/interfaces/IOracleManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/*\\n * Manages price feeds from different oracle implementations.\\n */\\ninterface IOracleManager {\\n function updatePrice() external returns (int256);\\n\\n /*\\n *Returns the latest price from the oracle feed.\\n */\\n function getLatestPrice() external view returns (int256);\\n}\\n\",\"keccak256\":\"0x257b71cc5a9394ba0ea022556bf1f38012046c5ca568ff0d73ce6cf95c278376\",\"license\":\"BUSL-1.1\"},\"contracts/oracles/OracleManagerChainlink.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"../interfaces/IOracleManager.sol\\\";\\nimport \\\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\\\";\\n\\n/*\\n * Implementation of an OracleManager that fetches prices from a Chainlink aggregate price feed.\\n */\\ncontract OracleManagerChainlink is IOracleManager {\\n // Admin addresses.\\n address public admin;\\n // Global state.\\n AggregatorV3Interface public chainlinkOracle;\\n uint8 public oracleDecimals;\\n\\n ////////////////////////////////////\\n /////////// MODIFIERS //////////////\\n ////////////////////////////////////\\n\\n modifier adminOnly() {\\n require(msg.sender == admin, \\\"Not admin\\\");\\n _;\\n }\\n\\n ////////////////////////////////////\\n ///// CONTRACT SET-UP //////////////\\n ////////////////////////////////////\\n constructor(address _admin, address _chainlinkOracle) {\\n admin = _admin;\\n chainlinkOracle = AggregatorV3Interface(_chainlinkOracle);\\n oracleDecimals = chainlinkOracle.decimals();\\n }\\n\\n ////////////////////////////////////\\n /// MULTISIG ADMIN FUNCTIONS ///////\\n ////////////////////////////////////\\n\\n function changeAdmin(address _admin) external adminOnly {\\n admin = _admin;\\n }\\n\\n ////////////////////////////////////\\n ///// IMPLEMENTATION ///////////////\\n ////////////////////////////////////\\n function _getLatestPrice() internal view returns (int256) {\\n (, int256 price, , , ) = chainlinkOracle.latestRoundData();\\n return price;\\n }\\n\\n function getLatestPrice() external view override returns (int256) {\\n return _getLatestPrice();\\n }\\n\\n function updatePrice() external virtual override returns (int256) {\\n return _getLatestPrice();\\n }\\n}\\n\",\"keccak256\":\"0x4ac751034f39a9b1ba36e2bbecf0c737bddd256f53303df4da235fdc688bf1cb\",\"license\":\"BUSL-1.1\"},\"contracts/oracles/OracleManagerChainlinkTestnet.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./OracleManagerChainlink.sol\\\";\\n\\ncontract OracleManagerChainlinkTestnet is OracleManagerChainlink {\\n uint256 lastUpdate;\\n uint256 maxUpdateIntervalSeconds;\\n int256 forcedPriceAdjustment;\\n\\n constructor(\\n address _admin,\\n address _chainlinkOracle,\\n uint256 _maxUpdateIntervalSeconds\\n ) OracleManagerChainlink(_admin, _chainlinkOracle) {\\n maxUpdateIntervalSeconds = _maxUpdateIntervalSeconds;\\n }\\n\\n function setMaxUpdateInterval(uint256 newMaxUpdateIntervalSeconds) external adminOnly {\\n maxUpdateIntervalSeconds = newMaxUpdateIntervalSeconds;\\n }\\n\\n function updatePrice() external override returns (int256) {\\n int256 latestPrice = super._getLatestPrice();\\n\\n int256 priceAdjustment = forcedPriceAdjustment;\\n if (lastUpdate + maxUpdateIntervalSeconds < block.timestamp) {\\n priceAdjustment = (priceAdjustment + 1) % 2;\\n forcedPriceAdjustment = priceAdjustment;\\n lastUpdate = block.timestamp;\\n }\\n\\n return latestPrice + priceAdjustment;\\n }\\n}\\n\",\"keccak256\":\"0x3a4c6ec918e141a4e09771470877b60eca9ad3dd1ec43bb0e182d83b88541290\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516105ef3803806105ef83398101604081905261002f91610119565b600080546001600160a01b038086166001600160a01b0319928316179092556001805492851692909116821790556040805163313ce56760e01b8152905185928592909163313ce56791600480820192602092909190829003018186803b15801561009957600080fd5b505afa1580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610154565b6001805460ff92909216600160a01b0260ff60a01b1990921691909117905550506003555061017c9050565b80516001600160a01b038116811461011457600080fd5b919050565b60008060006060848603121561012d578283fd5b610136846100fd565b9250610144602085016100fd565b9150604084015190509250925092565b600060208284031215610165578081fd5b815160ff81168114610175578182fd5b9392505050565b6104648061018b6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638f2839701161005b5780638f283970146100ba578063e68b52e7146100cd578063ef06e72c146100f3578063f851a4401461011e5761007d565b80635babb13214610082578063673a7e28146100975780638e15f473146100b2575b600080fd5b610095610090366004610338565b610131565b005b61009f610181565b6040519081526020015b60405180910390f35b61009f6101e0565b6100956100c836600461030a565b6101ef565b6001546100e190600160a01b900460ff1681565b60405160ff90911681526020016100a9565b600154610106906001600160a01b031681565b6040516001600160a01b0390911681526020016100a9565b600054610106906001600160a01b031681565b6000546001600160a01b0316331461017c5760405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b60448201526064015b60405180910390fd5b600355565b60008061018c610257565b905060006004549050426003546002546101a691906103e0565b10156101cf5760026101b982600161039f565b6101c391906103f8565b60048190554260025590505b6101d9818361039f565b9250505090565b60006101ea610257565b905090565b6000546001600160a01b031633146102355760405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b6044820152606401610173565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600160009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156102a857600080fd5b505afa1580156102bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e09190610350565b509194505050505090565b805169ffffffffffffffffffff8116811461030557600080fd5b919050565b60006020828403121561031b578081fd5b81356001600160a01b0381168114610331578182fd5b9392505050565b600060208284031215610349578081fd5b5035919050565b600080600080600060a08688031215610367578081fd5b610370866102eb565b9450602086015193506040860151925060608601519150610393608087016102eb565b90509295509295909350565b600080821280156001600160ff1b03849003851316156103c1576103c1610418565b600160ff1b83900384128116156103da576103da610418565b50500190565b600082198211156103f3576103f3610418565b500190565b60008261041357634e487b7160e01b81526012600452602481fd5b500790565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220bb95385226c02418a765cfd0adf9555a26ad1da701bbf9026bcd2f06edd1688464736f6c63430008030033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638f2839701161005b5780638f283970146100ba578063e68b52e7146100cd578063ef06e72c146100f3578063f851a4401461011e5761007d565b80635babb13214610082578063673a7e28146100975780638e15f473146100b2575b600080fd5b610095610090366004610338565b610131565b005b61009f610181565b6040519081526020015b60405180910390f35b61009f6101e0565b6100956100c836600461030a565b6101ef565b6001546100e190600160a01b900460ff1681565b60405160ff90911681526020016100a9565b600154610106906001600160a01b031681565b6040516001600160a01b0390911681526020016100a9565b600054610106906001600160a01b031681565b6000546001600160a01b0316331461017c5760405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b60448201526064015b60405180910390fd5b600355565b60008061018c610257565b905060006004549050426003546002546101a691906103e0565b10156101cf5760026101b982600161039f565b6101c391906103f8565b60048190554260025590505b6101d9818361039f565b9250505090565b60006101ea610257565b905090565b6000546001600160a01b031633146102355760405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b6044820152606401610173565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600160009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156102a857600080fd5b505afa1580156102bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e09190610350565b509194505050505090565b805169ffffffffffffffffffff8116811461030557600080fd5b919050565b60006020828403121561031b578081fd5b81356001600160a01b0381168114610331578182fd5b9392505050565b600060208284031215610349578081fd5b5035919050565b600080600080600060a08688031215610367578081fd5b610370866102eb565b9450602086015193506040860151925060608601519150610393608087016102eb565b90509295509295909350565b600080821280156001600160ff1b03849003851316156103c1576103c1610418565b600160ff1b83900384128116156103da576103da610418565b50500190565b600082198211156103f3576103f3610418565b500190565b60008261041357634e487b7160e01b81526012600452602481fd5b500790565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220bb95385226c02418a765cfd0adf9555a26ad1da701bbf9026bcd2f06edd1688464736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "changeAdmin(address)": { + "notice": "MULTISIG ADMIN FUNCTIONS ///////" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 19622, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "admin", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 19625, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "chainlinkOracle", + "offset": 0, + "slot": "1", + "type": "t_contract(AggregatorV3Interface)45" + }, + { + "astId": 19627, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "oracleDecimals", + "offset": 20, + "slot": "1", + "type": "t_uint8" + }, + { + "astId": 19718, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "lastUpdate", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 19720, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "maxUpdateIntervalSeconds", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 19722, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "forcedPriceAdjustment", + "offset": 0, + "slot": "4", + "type": "t_int256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(AggregatorV3Interface)45": { + "encoding": "inplace", + "label": "contract AggregatorV3Interface", + "numberOfBytes": "20" + }, + "t_int256": { + "encoding": "inplace", + "label": "int256", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/OracleManagerETH.json b/deployments/mumbai/OracleManagerETH.json new file mode 100644 index 0000000..671bb2e --- /dev/null +++ b/deployments/mumbai/OracleManagerETH.json @@ -0,0 +1,251 @@ +{ + "address": "0x5E14F89E1420F9C52cC22AB5bF207E2354C527B3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_chainlinkOracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxUpdateIntervalSeconds", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "chainlinkOracle", + "outputs": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getLatestPrice", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracleDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newMaxUpdateIntervalSeconds", + "type": "uint256" + } + ], + "name": "setMaxUpdateInterval", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updatePrice", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xde1b1dd347e0b66b78c804c2bd368288c1fc70ef75a7eaf60b639f2e1eec2607", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x5E14F89E1420F9C52cC22AB5bF207E2354C527B3", + "transactionIndex": 1, + "gasUsed": "380226", + "logsBloom": "0x00000000000000020000000000000000010000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x834abb6601fad8b99db89b68b2582abc85960456f76d198431cf01cc2e459019", + "transactionHash": "0xde1b1dd347e0b66b78c804c2bd368288c1fc70ef75a7eaf60b639f2e1eec2607", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 18869016, + "transactionHash": "0xde1b1dd347e0b66b78c804c2bd368288c1fc70ef75a7eaf60b639f2e1eec2607", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000040d70cafe3c0000000000000000000000000000000000000000000000000007c456266463b6cd0000000000000000000000000000000000000000000001668663a30aa24240ad00000000000000000000000000000000000000000000000007c048b599657acd0000000000000000000000000000000000000000000001668667b07b6d407cad", + "logIndex": 2, + "blockHash": "0x834abb6601fad8b99db89b68b2582abc85960456f76d198431cf01cc2e459019" + } + ], + "blockNumber": 18869016, + "cumulativeGasUsed": "488792", + "status": 1, + "byzantium": true + }, + "args": [ + "0x2740EA9F72B23372621D8D718F52609b80c24E61", + "0x0715A7794a1dc8e42615F059dD6e406A6594651A", + "27" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_chainlinkOracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxUpdateIntervalSeconds\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainlinkOracle\",\"outputs\":[{\"internalType\":\"contract AggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestPrice\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMaxUpdateIntervalSeconds\",\"type\":\"uint256\"}],\"name\":\"setMaxUpdateInterval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatePrice\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"changeAdmin(address)\":{\"notice\":\"MULTISIG ADMIN FUNCTIONS ///////\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/oracles/OracleManagerChainlinkTestnet.sol\":\"OracleManagerChainlinkTestnet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface AggregatorV3Interface {\\n\\n function decimals()\\n external\\n view\\n returns (\\n uint8\\n );\\n\\n function description()\\n external\\n view\\n returns (\\n string memory\\n );\\n\\n function version()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(\\n uint80 _roundId\\n )\\n external\\n view\\n returns (\\n uint80 roundId,\\n int256 answer,\\n uint256 startedAt,\\n uint256 updatedAt,\\n uint80 answeredInRound\\n );\\n\\n function latestRoundData()\\n external\\n view\\n returns (\\n uint80 roundId,\\n int256 answer,\\n uint256 startedAt,\\n uint256 updatedAt,\\n uint80 answeredInRound\\n );\\n\\n}\\n\",\"keccak256\":\"0xe6f5ac8c47f3b9b6135051efb9216f9ba5b312a6ecc20209b4f66a780443c328\",\"license\":\"MIT\"},\"contracts/interfaces/IOracleManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/*\\n * Manages price feeds from different oracle implementations.\\n */\\ninterface IOracleManager {\\n function updatePrice() external returns (int256);\\n\\n /*\\n *Returns the latest price from the oracle feed.\\n */\\n function getLatestPrice() external view returns (int256);\\n}\\n\",\"keccak256\":\"0x257b71cc5a9394ba0ea022556bf1f38012046c5ca568ff0d73ce6cf95c278376\",\"license\":\"BUSL-1.1\"},\"contracts/oracles/OracleManagerChainlink.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"../interfaces/IOracleManager.sol\\\";\\nimport \\\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\\\";\\n\\n/*\\n * Implementation of an OracleManager that fetches prices from a Chainlink aggregate price feed.\\n */\\ncontract OracleManagerChainlink is IOracleManager {\\n // Admin addresses.\\n address public admin;\\n // Global state.\\n AggregatorV3Interface public chainlinkOracle;\\n uint8 public oracleDecimals;\\n\\n ////////////////////////////////////\\n /////////// MODIFIERS //////////////\\n ////////////////////////////////////\\n\\n modifier adminOnly() {\\n require(msg.sender == admin, \\\"Not admin\\\");\\n _;\\n }\\n\\n ////////////////////////////////////\\n ///// CONTRACT SET-UP //////////////\\n ////////////////////////////////////\\n constructor(address _admin, address _chainlinkOracle) {\\n admin = _admin;\\n chainlinkOracle = AggregatorV3Interface(_chainlinkOracle);\\n oracleDecimals = chainlinkOracle.decimals();\\n }\\n\\n ////////////////////////////////////\\n /// MULTISIG ADMIN FUNCTIONS ///////\\n ////////////////////////////////////\\n\\n function changeAdmin(address _admin) external adminOnly {\\n admin = _admin;\\n }\\n\\n ////////////////////////////////////\\n ///// IMPLEMENTATION ///////////////\\n ////////////////////////////////////\\n function _getLatestPrice() internal view returns (int256) {\\n (, int256 price, , , ) = chainlinkOracle.latestRoundData();\\n return price;\\n }\\n\\n function getLatestPrice() external view override returns (int256) {\\n return _getLatestPrice();\\n }\\n\\n function updatePrice() external virtual override returns (int256) {\\n return _getLatestPrice();\\n }\\n}\\n\",\"keccak256\":\"0x4ac751034f39a9b1ba36e2bbecf0c737bddd256f53303df4da235fdc688bf1cb\",\"license\":\"BUSL-1.1\"},\"contracts/oracles/OracleManagerChainlinkTestnet.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./OracleManagerChainlink.sol\\\";\\n\\ncontract OracleManagerChainlinkTestnet is OracleManagerChainlink {\\n uint256 lastUpdate;\\n uint256 maxUpdateIntervalSeconds;\\n int256 forcedPriceAdjustment;\\n\\n constructor(\\n address _admin,\\n address _chainlinkOracle,\\n uint256 _maxUpdateIntervalSeconds\\n ) OracleManagerChainlink(_admin, _chainlinkOracle) {\\n maxUpdateIntervalSeconds = _maxUpdateIntervalSeconds;\\n }\\n\\n function setMaxUpdateInterval(uint256 newMaxUpdateIntervalSeconds) external adminOnly {\\n maxUpdateIntervalSeconds = newMaxUpdateIntervalSeconds;\\n }\\n\\n function updatePrice() external override returns (int256) {\\n int256 latestPrice = super._getLatestPrice();\\n\\n int256 priceAdjustment = forcedPriceAdjustment;\\n if (lastUpdate + maxUpdateIntervalSeconds < block.timestamp) {\\n priceAdjustment = (priceAdjustment + 1) % 2;\\n forcedPriceAdjustment = priceAdjustment;\\n lastUpdate = block.timestamp;\\n }\\n\\n return latestPrice + priceAdjustment;\\n }\\n}\\n\",\"keccak256\":\"0x3a4c6ec918e141a4e09771470877b60eca9ad3dd1ec43bb0e182d83b88541290\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516105ef3803806105ef83398101604081905261002f91610119565b600080546001600160a01b038086166001600160a01b0319928316179092556001805492851692909116821790556040805163313ce56760e01b8152905185928592909163313ce56791600480820192602092909190829003018186803b15801561009957600080fd5b505afa1580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610154565b6001805460ff92909216600160a01b0260ff60a01b1990921691909117905550506003555061017c9050565b80516001600160a01b038116811461011457600080fd5b919050565b60008060006060848603121561012d578283fd5b610136846100fd565b9250610144602085016100fd565b9150604084015190509250925092565b600060208284031215610165578081fd5b815160ff81168114610175578182fd5b9392505050565b6104648061018b6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638f2839701161005b5780638f283970146100ba578063e68b52e7146100cd578063ef06e72c146100f3578063f851a4401461011e5761007d565b80635babb13214610082578063673a7e28146100975780638e15f473146100b2575b600080fd5b610095610090366004610338565b610131565b005b61009f610181565b6040519081526020015b60405180910390f35b61009f6101e0565b6100956100c836600461030a565b6101ef565b6001546100e190600160a01b900460ff1681565b60405160ff90911681526020016100a9565b600154610106906001600160a01b031681565b6040516001600160a01b0390911681526020016100a9565b600054610106906001600160a01b031681565b6000546001600160a01b0316331461017c5760405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b60448201526064015b60405180910390fd5b600355565b60008061018c610257565b905060006004549050426003546002546101a691906103e0565b10156101cf5760026101b982600161039f565b6101c391906103f8565b60048190554260025590505b6101d9818361039f565b9250505090565b60006101ea610257565b905090565b6000546001600160a01b031633146102355760405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b6044820152606401610173565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600160009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156102a857600080fd5b505afa1580156102bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e09190610350565b509194505050505090565b805169ffffffffffffffffffff8116811461030557600080fd5b919050565b60006020828403121561031b578081fd5b81356001600160a01b0381168114610331578182fd5b9392505050565b600060208284031215610349578081fd5b5035919050565b600080600080600060a08688031215610367578081fd5b610370866102eb565b9450602086015193506040860151925060608601519150610393608087016102eb565b90509295509295909350565b600080821280156001600160ff1b03849003851316156103c1576103c1610418565b600160ff1b83900384128116156103da576103da610418565b50500190565b600082198211156103f3576103f3610418565b500190565b60008261041357634e487b7160e01b81526012600452602481fd5b500790565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220bb95385226c02418a765cfd0adf9555a26ad1da701bbf9026bcd2f06edd1688464736f6c63430008030033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638f2839701161005b5780638f283970146100ba578063e68b52e7146100cd578063ef06e72c146100f3578063f851a4401461011e5761007d565b80635babb13214610082578063673a7e28146100975780638e15f473146100b2575b600080fd5b610095610090366004610338565b610131565b005b61009f610181565b6040519081526020015b60405180910390f35b61009f6101e0565b6100956100c836600461030a565b6101ef565b6001546100e190600160a01b900460ff1681565b60405160ff90911681526020016100a9565b600154610106906001600160a01b031681565b6040516001600160a01b0390911681526020016100a9565b600054610106906001600160a01b031681565b6000546001600160a01b0316331461017c5760405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b60448201526064015b60405180910390fd5b600355565b60008061018c610257565b905060006004549050426003546002546101a691906103e0565b10156101cf5760026101b982600161039f565b6101c391906103f8565b60048190554260025590505b6101d9818361039f565b9250505090565b60006101ea610257565b905090565b6000546001600160a01b031633146102355760405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b6044820152606401610173565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600160009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156102a857600080fd5b505afa1580156102bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e09190610350565b509194505050505090565b805169ffffffffffffffffffff8116811461030557600080fd5b919050565b60006020828403121561031b578081fd5b81356001600160a01b0381168114610331578182fd5b9392505050565b600060208284031215610349578081fd5b5035919050565b600080600080600060a08688031215610367578081fd5b610370866102eb565b9450602086015193506040860151925060608601519150610393608087016102eb565b90509295509295909350565b600080821280156001600160ff1b03849003851316156103c1576103c1610418565b600160ff1b83900384128116156103da576103da610418565b50500190565b600082198211156103f3576103f3610418565b500190565b60008261041357634e487b7160e01b81526012600452602481fd5b500790565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220bb95385226c02418a765cfd0adf9555a26ad1da701bbf9026bcd2f06edd1688464736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "changeAdmin(address)": { + "notice": "MULTISIG ADMIN FUNCTIONS ///////" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 19622, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "admin", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 19625, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "chainlinkOracle", + "offset": 0, + "slot": "1", + "type": "t_contract(AggregatorV3Interface)45" + }, + { + "astId": 19627, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "oracleDecimals", + "offset": 20, + "slot": "1", + "type": "t_uint8" + }, + { + "astId": 19718, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "lastUpdate", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 19720, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "maxUpdateIntervalSeconds", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 19722, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "forcedPriceAdjustment", + "offset": 0, + "slot": "4", + "type": "t_int256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(AggregatorV3Interface)45": { + "encoding": "inplace", + "label": "contract AggregatorV3Interface", + "numberOfBytes": "20" + }, + "t_int256": { + "encoding": "inplace", + "label": "int256", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/OracleManagerMATIC.json b/deployments/mumbai/OracleManagerMATIC.json new file mode 100644 index 0000000..ff0329c --- /dev/null +++ b/deployments/mumbai/OracleManagerMATIC.json @@ -0,0 +1,251 @@ +{ + "address": "0xcED789d13CECD8a8318F8135c4D74728a8eaF8aF", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_chainlinkOracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxUpdateIntervalSeconds", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "chainlinkOracle", + "outputs": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getLatestPrice", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracleDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newMaxUpdateIntervalSeconds", + "type": "uint256" + } + ], + "name": "setMaxUpdateInterval", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updatePrice", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x3a21b7d3c0ef074a304b1329b42c2705cc44542064a608ed9545d01a8503b595", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xcED789d13CECD8a8318F8135c4D74728a8eaF8aF", + "transactionIndex": 0, + "gasUsed": "380226", + "logsBloom": "0x00000000000000020000000000000000010000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x46e097706a05ba67d4241285e123bf00e02812ef0967b4f9ce26a6b3b5a80589", + "transactionHash": "0x3a21b7d3c0ef074a304b1329b42c2705cc44542064a608ed9545d01a8503b595", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869280, + "transactionHash": "0x3a21b7d3c0ef074a304b1329b42c2705cc44542064a608ed9545d01a8503b595", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000040d70cafe3c0000000000000000000000000000000000000000000000000007661b8bac38becd000000000000000000000000000000000000000000000166885d41295989acad00000000000000000000000000000000000000000000000007620e1ae13a82cd00000000000000000000000000000000000000000000016688614e9a2487e8ad", + "logIndex": 0, + "blockHash": "0x46e097706a05ba67d4241285e123bf00e02812ef0967b4f9ce26a6b3b5a80589" + } + ], + "blockNumber": 18869280, + "cumulativeGasUsed": "380226", + "status": 1, + "byzantium": true + }, + "args": [ + "0x2740EA9F72B23372621D8D718F52609b80c24E61", + "0xd0D5e3DB44DE05E9F294BB0a3bEEaF030DE24Ada", + "27" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_chainlinkOracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxUpdateIntervalSeconds\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainlinkOracle\",\"outputs\":[{\"internalType\":\"contract AggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestPrice\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMaxUpdateIntervalSeconds\",\"type\":\"uint256\"}],\"name\":\"setMaxUpdateInterval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatePrice\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"changeAdmin(address)\":{\"notice\":\"MULTISIG ADMIN FUNCTIONS ///////\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/oracles/OracleManagerChainlinkTestnet.sol\":\"OracleManagerChainlinkTestnet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface AggregatorV3Interface {\\n\\n function decimals()\\n external\\n view\\n returns (\\n uint8\\n );\\n\\n function description()\\n external\\n view\\n returns (\\n string memory\\n );\\n\\n function version()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(\\n uint80 _roundId\\n )\\n external\\n view\\n returns (\\n uint80 roundId,\\n int256 answer,\\n uint256 startedAt,\\n uint256 updatedAt,\\n uint80 answeredInRound\\n );\\n\\n function latestRoundData()\\n external\\n view\\n returns (\\n uint80 roundId,\\n int256 answer,\\n uint256 startedAt,\\n uint256 updatedAt,\\n uint80 answeredInRound\\n );\\n\\n}\\n\",\"keccak256\":\"0xe6f5ac8c47f3b9b6135051efb9216f9ba5b312a6ecc20209b4f66a780443c328\",\"license\":\"MIT\"},\"contracts/interfaces/IOracleManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/*\\n * Manages price feeds from different oracle implementations.\\n */\\ninterface IOracleManager {\\n function updatePrice() external returns (int256);\\n\\n /*\\n *Returns the latest price from the oracle feed.\\n */\\n function getLatestPrice() external view returns (int256);\\n}\\n\",\"keccak256\":\"0x257b71cc5a9394ba0ea022556bf1f38012046c5ca568ff0d73ce6cf95c278376\",\"license\":\"BUSL-1.1\"},\"contracts/oracles/OracleManagerChainlink.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"../interfaces/IOracleManager.sol\\\";\\nimport \\\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\\\";\\n\\n/*\\n * Implementation of an OracleManager that fetches prices from a Chainlink aggregate price feed.\\n */\\ncontract OracleManagerChainlink is IOracleManager {\\n // Admin addresses.\\n address public admin;\\n // Global state.\\n AggregatorV3Interface public chainlinkOracle;\\n uint8 public oracleDecimals;\\n\\n ////////////////////////////////////\\n /////////// MODIFIERS //////////////\\n ////////////////////////////////////\\n\\n modifier adminOnly() {\\n require(msg.sender == admin, \\\"Not admin\\\");\\n _;\\n }\\n\\n ////////////////////////////////////\\n ///// CONTRACT SET-UP //////////////\\n ////////////////////////////////////\\n constructor(address _admin, address _chainlinkOracle) {\\n admin = _admin;\\n chainlinkOracle = AggregatorV3Interface(_chainlinkOracle);\\n oracleDecimals = chainlinkOracle.decimals();\\n }\\n\\n ////////////////////////////////////\\n /// MULTISIG ADMIN FUNCTIONS ///////\\n ////////////////////////////////////\\n\\n function changeAdmin(address _admin) external adminOnly {\\n admin = _admin;\\n }\\n\\n ////////////////////////////////////\\n ///// IMPLEMENTATION ///////////////\\n ////////////////////////////////////\\n function _getLatestPrice() internal view returns (int256) {\\n (, int256 price, , , ) = chainlinkOracle.latestRoundData();\\n return price;\\n }\\n\\n function getLatestPrice() external view override returns (int256) {\\n return _getLatestPrice();\\n }\\n\\n function updatePrice() external virtual override returns (int256) {\\n return _getLatestPrice();\\n }\\n}\\n\",\"keccak256\":\"0x4ac751034f39a9b1ba36e2bbecf0c737bddd256f53303df4da235fdc688bf1cb\",\"license\":\"BUSL-1.1\"},\"contracts/oracles/OracleManagerChainlinkTestnet.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./OracleManagerChainlink.sol\\\";\\n\\ncontract OracleManagerChainlinkTestnet is OracleManagerChainlink {\\n uint256 lastUpdate;\\n uint256 maxUpdateIntervalSeconds;\\n int256 forcedPriceAdjustment;\\n\\n constructor(\\n address _admin,\\n address _chainlinkOracle,\\n uint256 _maxUpdateIntervalSeconds\\n ) OracleManagerChainlink(_admin, _chainlinkOracle) {\\n maxUpdateIntervalSeconds = _maxUpdateIntervalSeconds;\\n }\\n\\n function setMaxUpdateInterval(uint256 newMaxUpdateIntervalSeconds) external adminOnly {\\n maxUpdateIntervalSeconds = newMaxUpdateIntervalSeconds;\\n }\\n\\n function updatePrice() external override returns (int256) {\\n int256 latestPrice = super._getLatestPrice();\\n\\n int256 priceAdjustment = forcedPriceAdjustment;\\n if (lastUpdate + maxUpdateIntervalSeconds < block.timestamp) {\\n priceAdjustment = (priceAdjustment + 1) % 2;\\n forcedPriceAdjustment = priceAdjustment;\\n lastUpdate = block.timestamp;\\n }\\n\\n return latestPrice + priceAdjustment;\\n }\\n}\\n\",\"keccak256\":\"0x3a4c6ec918e141a4e09771470877b60eca9ad3dd1ec43bb0e182d83b88541290\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516105ef3803806105ef83398101604081905261002f91610119565b600080546001600160a01b038086166001600160a01b0319928316179092556001805492851692909116821790556040805163313ce56760e01b8152905185928592909163313ce56791600480820192602092909190829003018186803b15801561009957600080fd5b505afa1580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610154565b6001805460ff92909216600160a01b0260ff60a01b1990921691909117905550506003555061017c9050565b80516001600160a01b038116811461011457600080fd5b919050565b60008060006060848603121561012d578283fd5b610136846100fd565b9250610144602085016100fd565b9150604084015190509250925092565b600060208284031215610165578081fd5b815160ff81168114610175578182fd5b9392505050565b6104648061018b6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638f2839701161005b5780638f283970146100ba578063e68b52e7146100cd578063ef06e72c146100f3578063f851a4401461011e5761007d565b80635babb13214610082578063673a7e28146100975780638e15f473146100b2575b600080fd5b610095610090366004610338565b610131565b005b61009f610181565b6040519081526020015b60405180910390f35b61009f6101e0565b6100956100c836600461030a565b6101ef565b6001546100e190600160a01b900460ff1681565b60405160ff90911681526020016100a9565b600154610106906001600160a01b031681565b6040516001600160a01b0390911681526020016100a9565b600054610106906001600160a01b031681565b6000546001600160a01b0316331461017c5760405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b60448201526064015b60405180910390fd5b600355565b60008061018c610257565b905060006004549050426003546002546101a691906103e0565b10156101cf5760026101b982600161039f565b6101c391906103f8565b60048190554260025590505b6101d9818361039f565b9250505090565b60006101ea610257565b905090565b6000546001600160a01b031633146102355760405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b6044820152606401610173565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600160009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156102a857600080fd5b505afa1580156102bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e09190610350565b509194505050505090565b805169ffffffffffffffffffff8116811461030557600080fd5b919050565b60006020828403121561031b578081fd5b81356001600160a01b0381168114610331578182fd5b9392505050565b600060208284031215610349578081fd5b5035919050565b600080600080600060a08688031215610367578081fd5b610370866102eb565b9450602086015193506040860151925060608601519150610393608087016102eb565b90509295509295909350565b600080821280156001600160ff1b03849003851316156103c1576103c1610418565b600160ff1b83900384128116156103da576103da610418565b50500190565b600082198211156103f3576103f3610418565b500190565b60008261041357634e487b7160e01b81526012600452602481fd5b500790565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220bb95385226c02418a765cfd0adf9555a26ad1da701bbf9026bcd2f06edd1688464736f6c63430008030033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638f2839701161005b5780638f283970146100ba578063e68b52e7146100cd578063ef06e72c146100f3578063f851a4401461011e5761007d565b80635babb13214610082578063673a7e28146100975780638e15f473146100b2575b600080fd5b610095610090366004610338565b610131565b005b61009f610181565b6040519081526020015b60405180910390f35b61009f6101e0565b6100956100c836600461030a565b6101ef565b6001546100e190600160a01b900460ff1681565b60405160ff90911681526020016100a9565b600154610106906001600160a01b031681565b6040516001600160a01b0390911681526020016100a9565b600054610106906001600160a01b031681565b6000546001600160a01b0316331461017c5760405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b60448201526064015b60405180910390fd5b600355565b60008061018c610257565b905060006004549050426003546002546101a691906103e0565b10156101cf5760026101b982600161039f565b6101c391906103f8565b60048190554260025590505b6101d9818361039f565b9250505090565b60006101ea610257565b905090565b6000546001600160a01b031633146102355760405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b6044820152606401610173565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600160009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156102a857600080fd5b505afa1580156102bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e09190610350565b509194505050505090565b805169ffffffffffffffffffff8116811461030557600080fd5b919050565b60006020828403121561031b578081fd5b81356001600160a01b0381168114610331578182fd5b9392505050565b600060208284031215610349578081fd5b5035919050565b600080600080600060a08688031215610367578081fd5b610370866102eb565b9450602086015193506040860151925060608601519150610393608087016102eb565b90509295509295909350565b600080821280156001600160ff1b03849003851316156103c1576103c1610418565b600160ff1b83900384128116156103da576103da610418565b50500190565b600082198211156103f3576103f3610418565b500190565b60008261041357634e487b7160e01b81526012600452602481fd5b500790565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220bb95385226c02418a765cfd0adf9555a26ad1da701bbf9026bcd2f06edd1688464736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "changeAdmin(address)": { + "notice": "MULTISIG ADMIN FUNCTIONS ///////" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 19622, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "admin", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 19625, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "chainlinkOracle", + "offset": 0, + "slot": "1", + "type": "t_contract(AggregatorV3Interface)45" + }, + { + "astId": 19627, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "oracleDecimals", + "offset": 20, + "slot": "1", + "type": "t_uint8" + }, + { + "astId": 19718, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "lastUpdate", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 19720, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "maxUpdateIntervalSeconds", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 19722, + "contract": "contracts/oracles/OracleManagerChainlinkTestnet.sol:OracleManagerChainlinkTestnet", + "label": "forcedPriceAdjustment", + "offset": 0, + "slot": "4", + "type": "t_int256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(AggregatorV3Interface)45": { + "encoding": "inplace", + "label": "contract AggregatorV3Interface", + "numberOfBytes": "20" + }, + "t_int256": { + "encoding": "inplace", + "label": "int256", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/SLBTC.json b/deployments/mumbai/SLBTC.json new file mode 100644 index 0000000..c9b35b1 --- /dev/null +++ b/deployments/mumbai/SLBTC.json @@ -0,0 +1,962 @@ +{ + "address": "0xC021Fe1Da2eBFff9cf97f8b321f05c9Db0121320", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xC021Fe1Da2eBFff9cf97f8b321f05c9Db0121320", + "transactionIndex": 2, + "gasUsed": "517450", + "logsBloom": "0x00000004000000000000002000000000410000000000000000000000000000000000000000000000000000008000004000018020000000000000000000000000000000000000000000000000004002800000400000000000000100000000000000000000020000000000000000000800000000000000000080010000001000000000010000000000000000000000000008000000000000000000000000000000200000000000000000800000200000000000000000000000001000000000024000000020000000002001000000000000001000000000008100500000000020010080000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x24d549698b6f38a9f0ce8126c5735425a1ccfdbb9af26a3e625f8f1dd95058f7", + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 18869324, + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "address": "0xC021Fe1Da2eBFff9cf97f8b321f05c9Db0121320", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000004d7471bbc672698b278a9f6a225d16a3ffd15e9b" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0x24d549698b6f38a9f0ce8126c5735425a1ccfdbb9af26a3e625f8f1dd95058f7" + }, + { + "transactionIndex": 2, + "blockNumber": 18869324, + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "address": "0xC021Fe1Da2eBFff9cf97f8b321f05c9Db0121320", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0x24d549698b6f38a9f0ce8126c5735425a1ccfdbb9af26a3e625f8f1dd95058f7" + }, + { + "transactionIndex": 2, + "blockNumber": 18869324, + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "address": "0xC021Fe1Da2eBFff9cf97f8b321f05c9Db0121320", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0x24d549698b6f38a9f0ce8126c5735425a1ccfdbb9af26a3e625f8f1dd95058f7" + }, + { + "transactionIndex": 2, + "blockNumber": 18869324, + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "address": "0xC021Fe1Da2eBFff9cf97f8b321f05c9Db0121320", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0x24d549698b6f38a9f0ce8126c5735425a1ccfdbb9af26a3e625f8f1dd95058f7" + }, + { + "transactionIndex": 2, + "blockNumber": 18869324, + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" + ], + "data": "0x000000000000000000000000000000000000000000000000000583daa6512c00000000000000000000000000000000000000000000000000070d650ea88232cd0000000000000000000000000000000000000000000000000d995d529465f4340000000000000000000000000000000000000000000000000707e134023106cd0000000000000000000000000000000000000000000000000d9ee12d3ab72034", + "logIndex": 10, + "blockHash": "0x24d549698b6f38a9f0ce8126c5735425a1ccfdbb9af26a3e625f8f1dd95058f7" + } + ], + "blockNumber": 18869324, + "cumulativeGasUsed": "1429859", + "status": 1, + "byzantium": true + }, + "args": [ + "0x4D7471bbC672698B278A9F6a225D16A3fFd15E9B", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000e058c1679d34fd291b06124f16af70e88dfb8422000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000015466c6f6174204c6f6e6720425443204d61726b65740000000000000000000000000000000000000000000000000000000000000000000000000000000000001066c3a2c286c298c3afc2b8c28f42544300000000000000000000000000000000" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "Float Long BTC Market", + "f↘️BTC", + "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "0xe058C1679D34fd291B06124F16AF70e88dFB8422", + 3, + true + ] + }, + "implementation": "0x4D7471bbC672698B278A9F6a225D16A3fFd15E9B", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/SLBTC_Implementation.json b/deployments/mumbai/SLBTC_Implementation.json new file mode 100644 index 0000000..dd67799 --- /dev/null +++ b/deployments/mumbai/SLBTC_Implementation.json @@ -0,0 +1,1318 @@ +{ + "address": "0x4D7471bbC672698B278A9F6a225D16A3fFd15E9B", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x68be7e773408f553d723858da4afa427243a0b87e7fc744f95098072c6f277cd", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x4D7471bbC672698B278A9F6a225D16A3fFd15E9B", + "transactionIndex": 1, + "gasUsed": "2450492", + "logsBloom": "0x00000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000018020000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000024000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x71237956b3dfd2dcdea6e9d18b89a593caa6f349c84c8898020aefb8165dd36b", + "transactionHash": "0x68be7e773408f553d723858da4afa427243a0b87e7fc744f95098072c6f277cd", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 18869321, + "transactionHash": "0x68be7e773408f553d723858da4afa427243a0b87e7fc744f95098072c6f277cd", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" + ], + "data": "0x000000000000000000000000000000000000000000000000001a1e20e38e08000000000000000000000000000000000000000000000000000727832f8c103acd0000000000000000000000000000000000000000000000000d7585b35dd6be34000000000000000000000000000000000000000000000000070d650ea88232cd0000000000000000000000000000000000000000000000000d8fa3d44164c634", + "logIndex": 1, + "blockHash": "0x71237956b3dfd2dcdea6e9d18b89a593caa6f349c84c8898020aefb8165dd36b" + } + ], + "blockNumber": 18869321, + "cumulativeGasUsed": "2471698", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staker\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"_isLong\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isLong\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staker\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.\",\"params\":{\"account\":\"The address for which to get the balance of.\"}},\"burn(uint256)\":{\"details\":\"Modified to only allow Long Short to burn tokens on redeem.\",\"params\":{\"amount\":\"The amount of tokens to burn in wei.\"}},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"details\":\"Should only be called by TokenFactory.sol for our system.\",\"params\":{\"_isLong\":\"Whether the token is long or short for its market.\",\"_longShort\":\"Address of the core LongShort contract.\",\"_marketIndex\":\"Which market the token is for.\",\"_staker\":\"Address of the staker contract.\",\"name\":\"The name of the token.\",\"symbol\":\"The symbol for the token.\"}},\"mint(address,uint256)\":{\"details\":\"Can only be called by addresses with a minter role. This should correspond to the Long Short contract.\",\"params\":{\"amount\":\"Amount of synthetic tokens to mint in wei.\",\"to\":\"The address for which to mint the tokens for.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"stake(uint256)\":{\"details\":\"Core staking logic contained in Staker.sol\",\"params\":{\"amount\":\"Amount to stake in wei.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.\",\"params\":{\"amount\":\"Amount of tokens to transfer in wei.\",\"recipient\":\"Recipient of the transferred tokens.\",\"sender\":\"User for which to transfer tokens.\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"SyntheticTokenUpgradeable\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"balanceOf(address)\":{\"notice\":\"Gets the synthetic token balance of the user in wei.\"},\"burn(uint256)\":{\"notice\":\"Burns or destroys a number of held synthetic tokens for an address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"notice\":\"Creates an instance of the contract.\"},\"isLong()\":{\"notice\":\"Whether the token is a long token or short token for its market.\"},\"longShort()\":{\"notice\":\"Address of the LongShort contract, a deployed LongShort.sol\"},\"marketIndex()\":{\"notice\":\"Identifies which market in longShort the token is for.\"},\"mint(address,uint256)\":{\"notice\":\"Mints a number of synthetic tokens for an address.\"},\"stake(uint256)\":{\"notice\":\"Allows users to stake their synthetic tokens to earn Float.\"},\"staker()\":{\"notice\":\"Address of the Staker contract, a deployed Staker.sol\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Overrides the default ERC20 transferFrom.\"}},\"notice\":\"An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SyntheticTokenUpgradeable.sol\":\"SyntheticTokenUpgradeable\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\\n function __ERC20Burnable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC20Burnable_init_unchained();\\n }\\n\\n function __ERC20Burnable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5321bbe08dd6e82e85222024dc300d4959ff8615742ad63135759883a19e02a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation 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 *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal initializer {\\n __Context_init_unchained();\\n __EIP712_init_unchained(name, \\\"1\\\");\\n __ERC20Permit_init_unchained(name);\\n }\\n\\n function __ERC20Permit_init_unchained(string memory name) internal initializer {\\n _PERMIT_TYPEHASH = keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\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 ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xf07c1013d0ecf7a80ff5bf8f59105fc0acc5bf83aa4196b409d9ac3666d37cc6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e321ee7110594e92c1c834d7de2fbdfd01fbed6c06127fe75c5836fe80a24a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x00c96e792d367a436015f12ce2665aa8e2a0d61d2c6045a82cbb37da20e5a042\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x07411372282794f7ecde69a1065e5d20441abe7c9f8861437b4d45c9a4712fa6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal initializer {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal initializer {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x30f3940c119b4d93578bac394f43ee9b0b8465ea1e60b316244183be2983a5ed\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"contracts/SyntheticTokenUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\n/**\\n@title SyntheticTokenUpgradeable\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n@dev Logic for price tracking contained in LongShort.sol. \\n The contract inherits from ERC20PresetMinterPauser.sol\\n*/\\ncontract SyntheticTokenUpgradeable is\\n ISyntheticToken,\\n Initializable,\\n ERC20Upgradeable,\\n ERC20BurnableUpgradeable,\\n AccessControlUpgradeable,\\n ERC20PermitUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n\\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\\n address public longShort;\\n /// @notice Address of the Staker contract, a deployed Staker.sol\\n address public staker;\\n /// @notice Identifies which market in longShort the token is for.\\n uint32 public marketIndex;\\n /// @notice Whether the token is a long token or short token for its market.\\n bool public isLong;\\n\\n /// @notice Creates an instance of the contract.\\n /// @dev Should only be called by TokenFactory.sol for our system.\\n /// @param name The name of the token.\\n /// @param symbol The symbol for the token.\\n /// @param _longShort Address of the core LongShort contract.\\n /// @param _staker Address of the staker contract.\\n /// @param _marketIndex Which market the token is for.\\n /// @param _isLong Whether the token is long or short for its market.\\n function initialize(\\n string memory name,\\n string memory symbol,\\n address _longShort,\\n address _staker,\\n uint32 _marketIndex,\\n bool _isLong\\n ) external initializer {\\n __ERC20_init(name, symbol);\\n __ERC20Burnable_init();\\n __AccessControl_init();\\n __ERC20Permit_init(name);\\n __UUPSUpgradeable_init();\\n\\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n renounceRole(MINTER_ROLE, msg.sender);\\n\\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\\n _setupRole(MINTER_ROLE, _longShort);\\n _setupRole(UPGRADER_ROLE, msg.sender);\\n\\n longShort = _longShort;\\n staker = _staker;\\n marketIndex = _marketIndex;\\n isLong = _isLong;\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by the current admin.\\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\\n\\n // TODO - look at some way of not duplicating implementation logic between this and SyntheticToken.sol\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n /// @dev Core staking logic contained in Staker.sol\\n /// @param amount Amount to stake in wei.\\n function stake(uint256 amount) external override {\\n // NOTE: this is safe, this function will throw \\\"ERC20: transfer\\n // amount exceeds balance\\\" if amount exceeds users balance.\\n super._transfer(msg.sender, address(staker), amount);\\n\\n IStaker(staker).stakeFromUser(msg.sender, amount);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 FUNCTIONS INHERITED BY ERC20PresetMinterPauser \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function totalSupply()\\n public\\n view\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (uint256)\\n {\\n return ERC20Upgradeable.totalSupply();\\n }\\n\\n /** \\n @notice Mints a number of synthetic tokens for an address.\\n @dev Can only be called by addresses with a minter role. \\n This should correspond to the Long Short contract.\\n @param to The address for which to mint the tokens for.\\n @param amount Amount of synthetic tokens to mint in wei.\\n */\\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\\n /// @param amount The amount of tokens to burn in wei.\\n function burn(uint256 amount) public override(ERC20BurnableUpgradeable, ISyntheticToken) {\\n require(msg.sender == longShort, \\\"Only LongShort contract\\\");\\n super._burn(_msgSender(), amount);\\n }\\n\\n /** \\n @notice Overrides the default ERC20 transferFrom.\\n @dev To allow users to avoid approving LongShort when redeeming tokens,\\n longShort has a virtual infinite allowance.\\n @param sender User for which to transfer tokens.\\n @param recipient Recipient of the transferred tokens.\\n @param amount Amount of tokens to transfer in wei.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public override(ERC20Upgradeable, ISyntheticToken) returns (bool) {\\n if (recipient == longShort && msg.sender == longShort) {\\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\\n ERC20Upgradeable._transfer(sender, recipient, amount);\\n return true;\\n } else {\\n return ERC20Upgradeable.transferFrom(sender, recipient, amount);\\n }\\n }\\n\\n function transfer(address recipient, uint256 amount)\\n public\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (bool)\\n {\\n return ERC20Upgradeable.transfer(recipient, amount);\\n }\\n\\n /** \\n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\\n tokens from next price actions before any token transfer occurs.\\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\\n @param sender User for which tokens are to be transferred for.\\n */\\n function _beforeTokenTransfer(\\n address sender,\\n address to,\\n uint256 amount\\n ) internal override {\\n if (sender != longShort) {\\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\\n }\\n super._beforeTokenTransfer(sender, to, amount);\\n }\\n\\n /** \\n @notice Gets the synthetic token balance of the user in wei.\\n @dev To automatically account for next price actions which have been confirmed but not settled,\\n includes any outstanding tokens owed by longShort.\\n @param account The address for which to get the balance of.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return\\n ERC20Upgradeable.balanceOf(account) +\\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\\n account,\\n marketIndex,\\n isLong\\n );\\n }\\n}\\n\",\"keccak256\":\"0x9c9c854d549d24c0e0915a2083fa5da69f3227d98469a0c8516e309b23b361ce\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612b5f806100206000396000f3fe6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "devdoc": { + "details": "Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol", + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.", + "params": { + "account": "The address for which to get the balance of." + } + }, + "burn(uint256)": { + "details": "Modified to only allow Long Short to burn tokens on redeem.", + "params": { + "amount": "The amount of tokens to burn in wei." + } + }, + "burnFrom(address,uint256)": { + "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "details": "Should only be called by TokenFactory.sol for our system.", + "params": { + "_isLong": "Whether the token is long or short for its market.", + "_longShort": "Address of the core LongShort contract.", + "_marketIndex": "Which market the token is for.", + "_staker": "Address of the staker contract.", + "name": "The name of the token.", + "symbol": "The symbol for the token." + } + }, + "mint(address,uint256)": { + "details": "Can only be called by addresses with a minter role. This should correspond to the Long Short contract.", + "params": { + "amount": "Amount of synthetic tokens to mint in wei.", + "to": "The address for which to mint the tokens for." + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "stake(uint256)": { + "details": "Core staking logic contained in Staker.sol", + "params": { + "amount": "Amount to stake in wei." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "transferFrom(address,address,uint256)": { + "details": "To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.", + "params": { + "amount": "Amount of tokens to transfer in wei.", + "recipient": "Recipient of the transferred tokens.", + "sender": "User for which to transfer tokens." + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "SyntheticTokenUpgradeable", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "balanceOf(address)": { + "notice": "Gets the synthetic token balance of the user in wei." + }, + "burn(uint256)": { + "notice": "Burns or destroys a number of held synthetic tokens for an address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "notice": "Creates an instance of the contract." + }, + "isLong()": { + "notice": "Whether the token is a long token or short token for its market." + }, + "longShort()": { + "notice": "Address of the LongShort contract, a deployed LongShort.sol" + }, + "marketIndex()": { + "notice": "Identifies which market in longShort the token is for." + }, + "mint(address,uint256)": { + "notice": "Mints a number of synthetic tokens for an address." + }, + "stake(uint256)": { + "notice": "Allows users to stake their synthetic tokens to earn Float." + }, + "staker()": { + "notice": "Address of the Staker contract, a deployed Staker.sol" + }, + "transferFrom(address,address,uint256)": { + "notice": "Overrides the default ERC20 transferFrom." + } + }, + "notice": "An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1351, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1357, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1359, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 1361, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 1363, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 1904, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 2069, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_roles", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4251, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "251", + "type": "t_bytes32" + }, + { + "astId": 4253, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "252", + "type": "t_bytes32" + }, + { + "astId": 4390, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "253", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2845, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_nonces", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_address,t_struct(Counter)3544_storage)" + }, + { + "astId": 2847, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_PERMIT_TYPEHASH", + "offset": 0, + "slot": "304", + "type": "t_bytes32" + }, + { + "astId": 3015, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "354", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "404", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 16544, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "longShort", + "offset": 0, + "slot": "454", + "type": "t_address" + }, + { + "astId": 16547, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "staker", + "offset": 0, + "slot": "455", + "type": "t_address" + }, + { + "astId": 16550, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "marketIndex", + "offset": 20, + "slot": "455", + "type": "t_uint32" + }, + { + "astId": 16553, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "isLong", + "offset": 24, + "slot": "455", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)3544_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)3544_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3544_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 3543, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/SLBTC_Proxy.json b/deployments/mumbai/SLBTC_Proxy.json new file mode 100644 index 0000000..3a76446 --- /dev/null +++ b/deployments/mumbai/SLBTC_Proxy.json @@ -0,0 +1,192 @@ +{ + "address": "0xC021Fe1Da2eBFff9cf97f8b321f05c9Db0121320", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xC021Fe1Da2eBFff9cf97f8b321f05c9Db0121320", + "transactionIndex": 2, + "gasUsed": "517450", + "logsBloom": "0x00000004000000000000002000000000410000000000000000000000000000000000000000000000000000008000004000018020000000000000000000000000000000000000000000000000004002800000400000000000000100000000000000000000020000000000000000000800000000000000000080010000001000000000010000000000000000000000000008000000000000000000000000000000200000000000000000800000200000000000000000000000001000000000024000000020000000002001000000000000001000000000008100500000000020010080000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x24d549698b6f38a9f0ce8126c5735425a1ccfdbb9af26a3e625f8f1dd95058f7", + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 18869324, + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "address": "0xC021Fe1Da2eBFff9cf97f8b321f05c9Db0121320", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000004d7471bbc672698b278a9f6a225d16a3ffd15e9b" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0x24d549698b6f38a9f0ce8126c5735425a1ccfdbb9af26a3e625f8f1dd95058f7" + }, + { + "transactionIndex": 2, + "blockNumber": 18869324, + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "address": "0xC021Fe1Da2eBFff9cf97f8b321f05c9Db0121320", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0x24d549698b6f38a9f0ce8126c5735425a1ccfdbb9af26a3e625f8f1dd95058f7" + }, + { + "transactionIndex": 2, + "blockNumber": 18869324, + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "address": "0xC021Fe1Da2eBFff9cf97f8b321f05c9Db0121320", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0x24d549698b6f38a9f0ce8126c5735425a1ccfdbb9af26a3e625f8f1dd95058f7" + }, + { + "transactionIndex": 2, + "blockNumber": 18869324, + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "address": "0xC021Fe1Da2eBFff9cf97f8b321f05c9Db0121320", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0x24d549698b6f38a9f0ce8126c5735425a1ccfdbb9af26a3e625f8f1dd95058f7" + }, + { + "transactionIndex": 2, + "blockNumber": 18869324, + "transactionHash": "0xc6968fd3160007c90947139084e332195bf8d100398f80ad64efaf135e3ebf58", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" + ], + "data": "0x000000000000000000000000000000000000000000000000000583daa6512c00000000000000000000000000000000000000000000000000070d650ea88232cd0000000000000000000000000000000000000000000000000d995d529465f4340000000000000000000000000000000000000000000000000707e134023106cd0000000000000000000000000000000000000000000000000d9ee12d3ab72034", + "logIndex": 10, + "blockHash": "0x24d549698b6f38a9f0ce8126c5735425a1ccfdbb9af26a3e625f8f1dd95058f7" + } + ], + "blockNumber": 18869324, + "cumulativeGasUsed": "1429859", + "status": 1, + "byzantium": true + }, + "args": [ + "0x4D7471bbC672698B278A9F6a225D16A3fFd15E9B", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000e058c1679d34fd291b06124f16af70e88dfb8422000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000015466c6f6174204c6f6e6720425443204d61726b65740000000000000000000000000000000000000000000000000000000000000000000000000000000000001066c3a2c286c298c3afc2b8c28f42544300000000000000000000000000000000" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/SLETH.json b/deployments/mumbai/SLETH.json new file mode 100644 index 0000000..97db69d --- /dev/null +++ b/deployments/mumbai/SLETH.json @@ -0,0 +1,962 @@ +{ + "address": "0x99f06f3E871E18F35b9a504F672bDa47D0380E23", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x99f06f3E871E18F35b9a504F672bDa47D0380E23", + "transactionIndex": 2, + "gasUsed": "517450", + "logsBloom": "0x00000004000000020000002000000000410000000000000000000000000000000000000000000000000000008000004000008000000000000000000000080000000000200000100000000000004002800000000000000000000100000000000000000000020000000000000000000800000000000000008080010000001000000000000000000000000000000000000000000000400000000000000000000000200000000000000020000000000000000001000000000000001000000000004000000020020000002001000000000000001000000000008100500000000020000080000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0xa5bb28c01e91d204ce14489aa1dbbe92c6c395d3bb1cd40db08c2330d4f4aea4", + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 18869012, + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "address": "0x99f06f3E871E18F35b9a504F672bDa47D0380E23", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000002ea79523d9aab5e601523922e1972f18de844f99" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xa5bb28c01e91d204ce14489aa1dbbe92c6c395d3bb1cd40db08c2330d4f4aea4" + }, + { + "transactionIndex": 2, + "blockNumber": 18869012, + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "address": "0x99f06f3E871E18F35b9a504F672bDa47D0380E23", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0xa5bb28c01e91d204ce14489aa1dbbe92c6c395d3bb1cd40db08c2330d4f4aea4" + }, + { + "transactionIndex": 2, + "blockNumber": 18869012, + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "address": "0x99f06f3E871E18F35b9a504F672bDa47D0380E23", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0xa5bb28c01e91d204ce14489aa1dbbe92c6c395d3bb1cd40db08c2330d4f4aea4" + }, + { + "transactionIndex": 2, + "blockNumber": 18869012, + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "address": "0x99f06f3E871E18F35b9a504F672bDa47D0380E23", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0xa5bb28c01e91d204ce14489aa1dbbe92c6c395d3bb1cd40db08c2330d4f4aea4" + }, + { + "transactionIndex": 2, + "blockNumber": 18869012, + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000000583daa6512c0000000000000000000000000000000000000000000000000007c9da010ab4e2cd00000000000000000000000000000000000000000000016686513c38cc9356ad00000000000000000000000000000000000000000000000007c456266463b6cd0000000000000000000000000000000000000000000001668656c01372e482ad", + "logIndex": 7, + "blockHash": "0xa5bb28c01e91d204ce14489aa1dbbe92c6c395d3bb1cd40db08c2330d4f4aea4" + } + ], + "blockNumber": 18869012, + "cumulativeGasUsed": "602942", + "status": 1, + "byzantium": true + }, + "args": [ + "0x2eA79523d9aAB5e601523922E1972F18De844F99", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000e058c1679d34fd291b06124f16af70e88dfb8422000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000015466c6f6174204c6f6e6720455448204d61726b65740000000000000000000000000000000000000000000000000000000000000000000000000000000000001066c3a2c286c298c3afc2b8c28f45544800000000000000000000000000000000" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "Float Long ETH Market", + "f↘️ETH", + "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "0xe058C1679D34fd291B06124F16AF70e88dFB8422", + 1, + true + ] + }, + "implementation": "0x2eA79523d9aAB5e601523922E1972F18De844F99", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/SLETH_Implementation.json b/deployments/mumbai/SLETH_Implementation.json new file mode 100644 index 0000000..f142b13 --- /dev/null +++ b/deployments/mumbai/SLETH_Implementation.json @@ -0,0 +1,1318 @@ +{ + "address": "0x2eA79523d9aAB5e601523922E1972F18De844F99", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x3951a4ad49c247d1cc88e5981b07d61a48b04c1e7ad15e60fcac1810c6a9d503", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x2eA79523d9aAB5e601523922E1972F18De844F99", + "transactionIndex": 0, + "gasUsed": "2450492", + "logsBloom": "0x00000000000000020000000000000000010000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x71c5f19a4bc111bfee4d78815ced954be441c7b8da90eedb970627e25bb0ce33", + "transactionHash": "0x3951a4ad49c247d1cc88e5981b07d61a48b04c1e7ad15e60fcac1810c6a9d503", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869008, + "transactionHash": "0x3951a4ad49c247d1cc88e5981b07d61a48b04c1e7ad15e60fcac1810c6a9d503", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000001a1e20e38e080000000000000000000000000000000000000000000000000007e3f821ee42eacd0000000000000000000000000000000000000000000001668630bf96720d9ead00000000000000000000000000000000000000000000000007c9da010ab4e2cd000000000000000000000000000000000000000000000166864addb7559ba6ad", + "logIndex": 0, + "blockHash": "0x71c5f19a4bc111bfee4d78815ced954be441c7b8da90eedb970627e25bb0ce33" + } + ], + "blockNumber": 18869008, + "cumulativeGasUsed": "2450492", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staker\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"_isLong\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isLong\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staker\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.\",\"params\":{\"account\":\"The address for which to get the balance of.\"}},\"burn(uint256)\":{\"details\":\"Modified to only allow Long Short to burn tokens on redeem.\",\"params\":{\"amount\":\"The amount of tokens to burn in wei.\"}},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"details\":\"Should only be called by TokenFactory.sol for our system.\",\"params\":{\"_isLong\":\"Whether the token is long or short for its market.\",\"_longShort\":\"Address of the core LongShort contract.\",\"_marketIndex\":\"Which market the token is for.\",\"_staker\":\"Address of the staker contract.\",\"name\":\"The name of the token.\",\"symbol\":\"The symbol for the token.\"}},\"mint(address,uint256)\":{\"details\":\"Can only be called by addresses with a minter role. This should correspond to the Long Short contract.\",\"params\":{\"amount\":\"Amount of synthetic tokens to mint in wei.\",\"to\":\"The address for which to mint the tokens for.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"stake(uint256)\":{\"details\":\"Core staking logic contained in Staker.sol\",\"params\":{\"amount\":\"Amount to stake in wei.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.\",\"params\":{\"amount\":\"Amount of tokens to transfer in wei.\",\"recipient\":\"Recipient of the transferred tokens.\",\"sender\":\"User for which to transfer tokens.\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"SyntheticTokenUpgradeable\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"balanceOf(address)\":{\"notice\":\"Gets the synthetic token balance of the user in wei.\"},\"burn(uint256)\":{\"notice\":\"Burns or destroys a number of held synthetic tokens for an address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"notice\":\"Creates an instance of the contract.\"},\"isLong()\":{\"notice\":\"Whether the token is a long token or short token for its market.\"},\"longShort()\":{\"notice\":\"Address of the LongShort contract, a deployed LongShort.sol\"},\"marketIndex()\":{\"notice\":\"Identifies which market in longShort the token is for.\"},\"mint(address,uint256)\":{\"notice\":\"Mints a number of synthetic tokens for an address.\"},\"stake(uint256)\":{\"notice\":\"Allows users to stake their synthetic tokens to earn Float.\"},\"staker()\":{\"notice\":\"Address of the Staker contract, a deployed Staker.sol\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Overrides the default ERC20 transferFrom.\"}},\"notice\":\"An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SyntheticTokenUpgradeable.sol\":\"SyntheticTokenUpgradeable\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\\n function __ERC20Burnable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC20Burnable_init_unchained();\\n }\\n\\n function __ERC20Burnable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5321bbe08dd6e82e85222024dc300d4959ff8615742ad63135759883a19e02a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation 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 *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal initializer {\\n __Context_init_unchained();\\n __EIP712_init_unchained(name, \\\"1\\\");\\n __ERC20Permit_init_unchained(name);\\n }\\n\\n function __ERC20Permit_init_unchained(string memory name) internal initializer {\\n _PERMIT_TYPEHASH = keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\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 ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xf07c1013d0ecf7a80ff5bf8f59105fc0acc5bf83aa4196b409d9ac3666d37cc6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e321ee7110594e92c1c834d7de2fbdfd01fbed6c06127fe75c5836fe80a24a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x00c96e792d367a436015f12ce2665aa8e2a0d61d2c6045a82cbb37da20e5a042\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x07411372282794f7ecde69a1065e5d20441abe7c9f8861437b4d45c9a4712fa6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal initializer {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal initializer {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x30f3940c119b4d93578bac394f43ee9b0b8465ea1e60b316244183be2983a5ed\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"contracts/SyntheticTokenUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\n/**\\n@title SyntheticTokenUpgradeable\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n@dev Logic for price tracking contained in LongShort.sol. \\n The contract inherits from ERC20PresetMinterPauser.sol\\n*/\\ncontract SyntheticTokenUpgradeable is\\n ISyntheticToken,\\n Initializable,\\n ERC20Upgradeable,\\n ERC20BurnableUpgradeable,\\n AccessControlUpgradeable,\\n ERC20PermitUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n\\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\\n address public longShort;\\n /// @notice Address of the Staker contract, a deployed Staker.sol\\n address public staker;\\n /// @notice Identifies which market in longShort the token is for.\\n uint32 public marketIndex;\\n /// @notice Whether the token is a long token or short token for its market.\\n bool public isLong;\\n\\n /// @notice Creates an instance of the contract.\\n /// @dev Should only be called by TokenFactory.sol for our system.\\n /// @param name The name of the token.\\n /// @param symbol The symbol for the token.\\n /// @param _longShort Address of the core LongShort contract.\\n /// @param _staker Address of the staker contract.\\n /// @param _marketIndex Which market the token is for.\\n /// @param _isLong Whether the token is long or short for its market.\\n function initialize(\\n string memory name,\\n string memory symbol,\\n address _longShort,\\n address _staker,\\n uint32 _marketIndex,\\n bool _isLong\\n ) external initializer {\\n __ERC20_init(name, symbol);\\n __ERC20Burnable_init();\\n __AccessControl_init();\\n __ERC20Permit_init(name);\\n __UUPSUpgradeable_init();\\n\\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n renounceRole(MINTER_ROLE, msg.sender);\\n\\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\\n _setupRole(MINTER_ROLE, _longShort);\\n _setupRole(UPGRADER_ROLE, msg.sender);\\n\\n longShort = _longShort;\\n staker = _staker;\\n marketIndex = _marketIndex;\\n isLong = _isLong;\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by the current admin.\\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\\n\\n // TODO - look at some way of not duplicating implementation logic between this and SyntheticToken.sol\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n /// @dev Core staking logic contained in Staker.sol\\n /// @param amount Amount to stake in wei.\\n function stake(uint256 amount) external override {\\n // NOTE: this is safe, this function will throw \\\"ERC20: transfer\\n // amount exceeds balance\\\" if amount exceeds users balance.\\n super._transfer(msg.sender, address(staker), amount);\\n\\n IStaker(staker).stakeFromUser(msg.sender, amount);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 FUNCTIONS INHERITED BY ERC20PresetMinterPauser \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function totalSupply()\\n public\\n view\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (uint256)\\n {\\n return ERC20Upgradeable.totalSupply();\\n }\\n\\n /** \\n @notice Mints a number of synthetic tokens for an address.\\n @dev Can only be called by addresses with a minter role. \\n This should correspond to the Long Short contract.\\n @param to The address for which to mint the tokens for.\\n @param amount Amount of synthetic tokens to mint in wei.\\n */\\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\\n /// @param amount The amount of tokens to burn in wei.\\n function burn(uint256 amount) public override(ERC20BurnableUpgradeable, ISyntheticToken) {\\n require(msg.sender == longShort, \\\"Only LongShort contract\\\");\\n super._burn(_msgSender(), amount);\\n }\\n\\n /** \\n @notice Overrides the default ERC20 transferFrom.\\n @dev To allow users to avoid approving LongShort when redeeming tokens,\\n longShort has a virtual infinite allowance.\\n @param sender User for which to transfer tokens.\\n @param recipient Recipient of the transferred tokens.\\n @param amount Amount of tokens to transfer in wei.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public override(ERC20Upgradeable, ISyntheticToken) returns (bool) {\\n if (recipient == longShort && msg.sender == longShort) {\\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\\n ERC20Upgradeable._transfer(sender, recipient, amount);\\n return true;\\n } else {\\n return ERC20Upgradeable.transferFrom(sender, recipient, amount);\\n }\\n }\\n\\n function transfer(address recipient, uint256 amount)\\n public\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (bool)\\n {\\n return ERC20Upgradeable.transfer(recipient, amount);\\n }\\n\\n /** \\n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\\n tokens from next price actions before any token transfer occurs.\\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\\n @param sender User for which tokens are to be transferred for.\\n */\\n function _beforeTokenTransfer(\\n address sender,\\n address to,\\n uint256 amount\\n ) internal override {\\n if (sender != longShort) {\\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\\n }\\n super._beforeTokenTransfer(sender, to, amount);\\n }\\n\\n /** \\n @notice Gets the synthetic token balance of the user in wei.\\n @dev To automatically account for next price actions which have been confirmed but not settled,\\n includes any outstanding tokens owed by longShort.\\n @param account The address for which to get the balance of.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return\\n ERC20Upgradeable.balanceOf(account) +\\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\\n account,\\n marketIndex,\\n isLong\\n );\\n }\\n}\\n\",\"keccak256\":\"0x9c9c854d549d24c0e0915a2083fa5da69f3227d98469a0c8516e309b23b361ce\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612b5f806100206000396000f3fe6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "devdoc": { + "details": "Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol", + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.", + "params": { + "account": "The address for which to get the balance of." + } + }, + "burn(uint256)": { + "details": "Modified to only allow Long Short to burn tokens on redeem.", + "params": { + "amount": "The amount of tokens to burn in wei." + } + }, + "burnFrom(address,uint256)": { + "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "details": "Should only be called by TokenFactory.sol for our system.", + "params": { + "_isLong": "Whether the token is long or short for its market.", + "_longShort": "Address of the core LongShort contract.", + "_marketIndex": "Which market the token is for.", + "_staker": "Address of the staker contract.", + "name": "The name of the token.", + "symbol": "The symbol for the token." + } + }, + "mint(address,uint256)": { + "details": "Can only be called by addresses with a minter role. This should correspond to the Long Short contract.", + "params": { + "amount": "Amount of synthetic tokens to mint in wei.", + "to": "The address for which to mint the tokens for." + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "stake(uint256)": { + "details": "Core staking logic contained in Staker.sol", + "params": { + "amount": "Amount to stake in wei." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "transferFrom(address,address,uint256)": { + "details": "To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.", + "params": { + "amount": "Amount of tokens to transfer in wei.", + "recipient": "Recipient of the transferred tokens.", + "sender": "User for which to transfer tokens." + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "SyntheticTokenUpgradeable", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "balanceOf(address)": { + "notice": "Gets the synthetic token balance of the user in wei." + }, + "burn(uint256)": { + "notice": "Burns or destroys a number of held synthetic tokens for an address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "notice": "Creates an instance of the contract." + }, + "isLong()": { + "notice": "Whether the token is a long token or short token for its market." + }, + "longShort()": { + "notice": "Address of the LongShort contract, a deployed LongShort.sol" + }, + "marketIndex()": { + "notice": "Identifies which market in longShort the token is for." + }, + "mint(address,uint256)": { + "notice": "Mints a number of synthetic tokens for an address." + }, + "stake(uint256)": { + "notice": "Allows users to stake their synthetic tokens to earn Float." + }, + "staker()": { + "notice": "Address of the Staker contract, a deployed Staker.sol" + }, + "transferFrom(address,address,uint256)": { + "notice": "Overrides the default ERC20 transferFrom." + } + }, + "notice": "An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1351, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1357, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1359, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 1361, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 1363, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 1904, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 2069, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_roles", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4251, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "251", + "type": "t_bytes32" + }, + { + "astId": 4253, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "252", + "type": "t_bytes32" + }, + { + "astId": 4390, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "253", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2845, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_nonces", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_address,t_struct(Counter)3544_storage)" + }, + { + "astId": 2847, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_PERMIT_TYPEHASH", + "offset": 0, + "slot": "304", + "type": "t_bytes32" + }, + { + "astId": 3015, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "354", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "404", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 16544, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "longShort", + "offset": 0, + "slot": "454", + "type": "t_address" + }, + { + "astId": 16547, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "staker", + "offset": 0, + "slot": "455", + "type": "t_address" + }, + { + "astId": 16550, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "marketIndex", + "offset": 20, + "slot": "455", + "type": "t_uint32" + }, + { + "astId": 16553, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "isLong", + "offset": 24, + "slot": "455", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)3544_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)3544_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3544_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 3543, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/SLETH_Proxy.json b/deployments/mumbai/SLETH_Proxy.json new file mode 100644 index 0000000..545ccc6 --- /dev/null +++ b/deployments/mumbai/SLETH_Proxy.json @@ -0,0 +1,192 @@ +{ + "address": "0x99f06f3E871E18F35b9a504F672bDa47D0380E23", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x99f06f3E871E18F35b9a504F672bDa47D0380E23", + "transactionIndex": 2, + "gasUsed": "517450", + "logsBloom": "0x00000004000000020000002000000000410000000000000000000000000000000000000000000000000000008000004000008000000000000000000000080000000000200000100000000000004002800000000000000000000100000000000000000000020000000000000000000800000000000000008080010000001000000000000000000000000000000000000000000000400000000000000000000000200000000000000020000000000000000001000000000000001000000000004000000020020000002001000000000000001000000000008100500000000020000080000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0xa5bb28c01e91d204ce14489aa1dbbe92c6c395d3bb1cd40db08c2330d4f4aea4", + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 18869012, + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "address": "0x99f06f3E871E18F35b9a504F672bDa47D0380E23", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000002ea79523d9aab5e601523922e1972f18de844f99" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xa5bb28c01e91d204ce14489aa1dbbe92c6c395d3bb1cd40db08c2330d4f4aea4" + }, + { + "transactionIndex": 2, + "blockNumber": 18869012, + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "address": "0x99f06f3E871E18F35b9a504F672bDa47D0380E23", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0xa5bb28c01e91d204ce14489aa1dbbe92c6c395d3bb1cd40db08c2330d4f4aea4" + }, + { + "transactionIndex": 2, + "blockNumber": 18869012, + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "address": "0x99f06f3E871E18F35b9a504F672bDa47D0380E23", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0xa5bb28c01e91d204ce14489aa1dbbe92c6c395d3bb1cd40db08c2330d4f4aea4" + }, + { + "transactionIndex": 2, + "blockNumber": 18869012, + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "address": "0x99f06f3E871E18F35b9a504F672bDa47D0380E23", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0xa5bb28c01e91d204ce14489aa1dbbe92c6c395d3bb1cd40db08c2330d4f4aea4" + }, + { + "transactionIndex": 2, + "blockNumber": 18869012, + "transactionHash": "0xa77f50808d6d085650c96e01c35e8ed30eff2a2dd133ead09ecb083ed72eb71d", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000000583daa6512c0000000000000000000000000000000000000000000000000007c9da010ab4e2cd00000000000000000000000000000000000000000000016686513c38cc9356ad00000000000000000000000000000000000000000000000007c456266463b6cd0000000000000000000000000000000000000000000001668656c01372e482ad", + "logIndex": 7, + "blockHash": "0xa5bb28c01e91d204ce14489aa1dbbe92c6c395d3bb1cd40db08c2330d4f4aea4" + } + ], + "blockNumber": 18869012, + "cumulativeGasUsed": "602942", + "status": 1, + "byzantium": true + }, + "args": [ + "0x2eA79523d9aAB5e601523922E1972F18De844F99", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000e058c1679d34fd291b06124f16af70e88dfb8422000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000015466c6f6174204c6f6e6720455448204d61726b65740000000000000000000000000000000000000000000000000000000000000000000000000000000000001066c3a2c286c298c3afc2b8c28f45544800000000000000000000000000000000" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/SLMATIC.json b/deployments/mumbai/SLMATIC.json new file mode 100644 index 0000000..4b8f44a --- /dev/null +++ b/deployments/mumbai/SLMATIC.json @@ -0,0 +1,962 @@ +{ + "address": "0x3329c91bD5118F83F5794ffa2c55b1d88eC49aC5", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x3329c91bD5118F83F5794ffa2c55b1d88eC49aC5", + "transactionIndex": 3, + "gasUsed": "517498", + "logsBloom": "0x00000004000080020000002000000000410000000000000000000000000000000000000000000000000000008000004000008000000000000000000000000000000000000000000000000000004002800000000000000000000100000000000000000000020000000000002000000800000000000000000080010000001000000000000000000000000000000000000000000000000000000000000000000000200000400000000020000000000000000001000000000000001000000000004000000020000000002001000000000000001000100000008100500000000020000080000000000400000000000000000200000000000000000000000000100000", + "blockHash": "0x004b4448e772e9fc7670423aa02cec08e411cf80a3b4d11a9a50340b4e51b16c", + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 18869276, + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "address": "0x3329c91bD5118F83F5794ffa2c55b1d88eC49aC5", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000003d747ff51930c910f1fc67f0417389f0dfbf38ec" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0x004b4448e772e9fc7670423aa02cec08e411cf80a3b4d11a9a50340b4e51b16c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869276, + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "address": "0x3329c91bD5118F83F5794ffa2c55b1d88eC49aC5", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0x004b4448e772e9fc7670423aa02cec08e411cf80a3b4d11a9a50340b4e51b16c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869276, + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "address": "0x3329c91bD5118F83F5794ffa2c55b1d88eC49aC5", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0x004b4448e772e9fc7670423aa02cec08e411cf80a3b4d11a9a50340b4e51b16c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869276, + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "address": "0x3329c91bD5118F83F5794ffa2c55b1d88eC49aC5", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0x004b4448e772e9fc7670423aa02cec08e411cf80a3b4d11a9a50340b4e51b16c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869276, + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000000583fc2d62cc00000000000000000000000000000000000000000000000000076b9f87d99b8acd00000000000000000000000000000000000000000000016688349ddcdb4064ad00000000000000000000000000000000000000000000000007661b8bac38becd000000000000000000000000000000000000000000000166883a21d908a330ad", + "logIndex": 10, + "blockHash": "0x004b4448e772e9fc7670423aa02cec08e411cf80a3b4d11a9a50340b4e51b16c" + } + ], + "blockNumber": 18869276, + "cumulativeGasUsed": "1026053", + "status": 1, + "byzantium": true + }, + "args": [ + "0x3D747FF51930c910F1Fc67F0417389f0DfbF38eC", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000e058c1679d34fd291b06124f16af70e88dfb8422000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000017466c6f6174204c6f6e67204d41544943204d61726b6574000000000000000000000000000000000000000000000000000000000000000000000000000000001266c3a2c286c298c3afc2b8c28f4d415449430000000000000000000000000000" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "Float Long MATIC Market", + "f↘️MATIC", + "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "0xe058C1679D34fd291B06124F16AF70e88dFB8422", + 2, + true + ] + }, + "implementation": "0x3D747FF51930c910F1Fc67F0417389f0DfbF38eC", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/SLMATIC_Implementation.json b/deployments/mumbai/SLMATIC_Implementation.json new file mode 100644 index 0000000..ae2db9a --- /dev/null +++ b/deployments/mumbai/SLMATIC_Implementation.json @@ -0,0 +1,1318 @@ +{ + "address": "0x3D747FF51930c910F1Fc67F0417389f0DfbF38eC", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0xba47a98a9afdf40f5159b312ea3d5f62646146c816b22de9363cb329282260ef", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x3D747FF51930c910F1Fc67F0417389f0DfbF38eC", + "transactionIndex": 2, + "gasUsed": "2450492", + "logsBloom": "0x00000000000000020000000000000000010000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x9d5452558071f195a8b66b96a130c41163f636417bd5cb60cc461773ab6abfcf", + "transactionHash": "0xba47a98a9afdf40f5159b312ea3d5f62646146c816b22de9363cb329282260ef", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 18869272, + "transactionHash": "0xba47a98a9afdf40f5159b312ea3d5f62646146c816b22de9363cb329282260ef", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000001a1e20e38e08000000000000000000000000000000000000000000000000000785bda8bd2992cd00000000000000000000000000000000000000000000016687f0cfdf25759aad000000000000000000000000000000000000000000000000076b9f87d99b8acd000000000000000000000000000000000000000000000166880aee000903a2ad", + "logIndex": 4, + "blockHash": "0x9d5452558071f195a8b66b96a130c41163f636417bd5cb60cc461773ab6abfcf" + } + ], + "blockNumber": 18869272, + "cumulativeGasUsed": "2580094", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staker\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"_isLong\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isLong\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staker\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.\",\"params\":{\"account\":\"The address for which to get the balance of.\"}},\"burn(uint256)\":{\"details\":\"Modified to only allow Long Short to burn tokens on redeem.\",\"params\":{\"amount\":\"The amount of tokens to burn in wei.\"}},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"details\":\"Should only be called by TokenFactory.sol for our system.\",\"params\":{\"_isLong\":\"Whether the token is long or short for its market.\",\"_longShort\":\"Address of the core LongShort contract.\",\"_marketIndex\":\"Which market the token is for.\",\"_staker\":\"Address of the staker contract.\",\"name\":\"The name of the token.\",\"symbol\":\"The symbol for the token.\"}},\"mint(address,uint256)\":{\"details\":\"Can only be called by addresses with a minter role. This should correspond to the Long Short contract.\",\"params\":{\"amount\":\"Amount of synthetic tokens to mint in wei.\",\"to\":\"The address for which to mint the tokens for.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"stake(uint256)\":{\"details\":\"Core staking logic contained in Staker.sol\",\"params\":{\"amount\":\"Amount to stake in wei.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.\",\"params\":{\"amount\":\"Amount of tokens to transfer in wei.\",\"recipient\":\"Recipient of the transferred tokens.\",\"sender\":\"User for which to transfer tokens.\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"SyntheticTokenUpgradeable\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"balanceOf(address)\":{\"notice\":\"Gets the synthetic token balance of the user in wei.\"},\"burn(uint256)\":{\"notice\":\"Burns or destroys a number of held synthetic tokens for an address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"notice\":\"Creates an instance of the contract.\"},\"isLong()\":{\"notice\":\"Whether the token is a long token or short token for its market.\"},\"longShort()\":{\"notice\":\"Address of the LongShort contract, a deployed LongShort.sol\"},\"marketIndex()\":{\"notice\":\"Identifies which market in longShort the token is for.\"},\"mint(address,uint256)\":{\"notice\":\"Mints a number of synthetic tokens for an address.\"},\"stake(uint256)\":{\"notice\":\"Allows users to stake their synthetic tokens to earn Float.\"},\"staker()\":{\"notice\":\"Address of the Staker contract, a deployed Staker.sol\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Overrides the default ERC20 transferFrom.\"}},\"notice\":\"An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SyntheticTokenUpgradeable.sol\":\"SyntheticTokenUpgradeable\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\\n function __ERC20Burnable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC20Burnable_init_unchained();\\n }\\n\\n function __ERC20Burnable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5321bbe08dd6e82e85222024dc300d4959ff8615742ad63135759883a19e02a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation 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 *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal initializer {\\n __Context_init_unchained();\\n __EIP712_init_unchained(name, \\\"1\\\");\\n __ERC20Permit_init_unchained(name);\\n }\\n\\n function __ERC20Permit_init_unchained(string memory name) internal initializer {\\n _PERMIT_TYPEHASH = keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\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 ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xf07c1013d0ecf7a80ff5bf8f59105fc0acc5bf83aa4196b409d9ac3666d37cc6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e321ee7110594e92c1c834d7de2fbdfd01fbed6c06127fe75c5836fe80a24a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x00c96e792d367a436015f12ce2665aa8e2a0d61d2c6045a82cbb37da20e5a042\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x07411372282794f7ecde69a1065e5d20441abe7c9f8861437b4d45c9a4712fa6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal initializer {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal initializer {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x30f3940c119b4d93578bac394f43ee9b0b8465ea1e60b316244183be2983a5ed\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"contracts/SyntheticTokenUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\n/**\\n@title SyntheticTokenUpgradeable\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n@dev Logic for price tracking contained in LongShort.sol. \\n The contract inherits from ERC20PresetMinterPauser.sol\\n*/\\ncontract SyntheticTokenUpgradeable is\\n ISyntheticToken,\\n Initializable,\\n ERC20Upgradeable,\\n ERC20BurnableUpgradeable,\\n AccessControlUpgradeable,\\n ERC20PermitUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n\\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\\n address public longShort;\\n /// @notice Address of the Staker contract, a deployed Staker.sol\\n address public staker;\\n /// @notice Identifies which market in longShort the token is for.\\n uint32 public marketIndex;\\n /// @notice Whether the token is a long token or short token for its market.\\n bool public isLong;\\n\\n /// @notice Creates an instance of the contract.\\n /// @dev Should only be called by TokenFactory.sol for our system.\\n /// @param name The name of the token.\\n /// @param symbol The symbol for the token.\\n /// @param _longShort Address of the core LongShort contract.\\n /// @param _staker Address of the staker contract.\\n /// @param _marketIndex Which market the token is for.\\n /// @param _isLong Whether the token is long or short for its market.\\n function initialize(\\n string memory name,\\n string memory symbol,\\n address _longShort,\\n address _staker,\\n uint32 _marketIndex,\\n bool _isLong\\n ) external initializer {\\n __ERC20_init(name, symbol);\\n __ERC20Burnable_init();\\n __AccessControl_init();\\n __ERC20Permit_init(name);\\n __UUPSUpgradeable_init();\\n\\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n renounceRole(MINTER_ROLE, msg.sender);\\n\\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\\n _setupRole(MINTER_ROLE, _longShort);\\n _setupRole(UPGRADER_ROLE, msg.sender);\\n\\n longShort = _longShort;\\n staker = _staker;\\n marketIndex = _marketIndex;\\n isLong = _isLong;\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by the current admin.\\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\\n\\n // TODO - look at some way of not duplicating implementation logic between this and SyntheticToken.sol\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n /// @dev Core staking logic contained in Staker.sol\\n /// @param amount Amount to stake in wei.\\n function stake(uint256 amount) external override {\\n // NOTE: this is safe, this function will throw \\\"ERC20: transfer\\n // amount exceeds balance\\\" if amount exceeds users balance.\\n super._transfer(msg.sender, address(staker), amount);\\n\\n IStaker(staker).stakeFromUser(msg.sender, amount);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 FUNCTIONS INHERITED BY ERC20PresetMinterPauser \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function totalSupply()\\n public\\n view\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (uint256)\\n {\\n return ERC20Upgradeable.totalSupply();\\n }\\n\\n /** \\n @notice Mints a number of synthetic tokens for an address.\\n @dev Can only be called by addresses with a minter role. \\n This should correspond to the Long Short contract.\\n @param to The address for which to mint the tokens for.\\n @param amount Amount of synthetic tokens to mint in wei.\\n */\\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\\n /// @param amount The amount of tokens to burn in wei.\\n function burn(uint256 amount) public override(ERC20BurnableUpgradeable, ISyntheticToken) {\\n require(msg.sender == longShort, \\\"Only LongShort contract\\\");\\n super._burn(_msgSender(), amount);\\n }\\n\\n /** \\n @notice Overrides the default ERC20 transferFrom.\\n @dev To allow users to avoid approving LongShort when redeeming tokens,\\n longShort has a virtual infinite allowance.\\n @param sender User for which to transfer tokens.\\n @param recipient Recipient of the transferred tokens.\\n @param amount Amount of tokens to transfer in wei.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public override(ERC20Upgradeable, ISyntheticToken) returns (bool) {\\n if (recipient == longShort && msg.sender == longShort) {\\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\\n ERC20Upgradeable._transfer(sender, recipient, amount);\\n return true;\\n } else {\\n return ERC20Upgradeable.transferFrom(sender, recipient, amount);\\n }\\n }\\n\\n function transfer(address recipient, uint256 amount)\\n public\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (bool)\\n {\\n return ERC20Upgradeable.transfer(recipient, amount);\\n }\\n\\n /** \\n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\\n tokens from next price actions before any token transfer occurs.\\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\\n @param sender User for which tokens are to be transferred for.\\n */\\n function _beforeTokenTransfer(\\n address sender,\\n address to,\\n uint256 amount\\n ) internal override {\\n if (sender != longShort) {\\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\\n }\\n super._beforeTokenTransfer(sender, to, amount);\\n }\\n\\n /** \\n @notice Gets the synthetic token balance of the user in wei.\\n @dev To automatically account for next price actions which have been confirmed but not settled,\\n includes any outstanding tokens owed by longShort.\\n @param account The address for which to get the balance of.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return\\n ERC20Upgradeable.balanceOf(account) +\\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\\n account,\\n marketIndex,\\n isLong\\n );\\n }\\n}\\n\",\"keccak256\":\"0x9c9c854d549d24c0e0915a2083fa5da69f3227d98469a0c8516e309b23b361ce\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612b5f806100206000396000f3fe6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "devdoc": { + "details": "Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol", + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.", + "params": { + "account": "The address for which to get the balance of." + } + }, + "burn(uint256)": { + "details": "Modified to only allow Long Short to burn tokens on redeem.", + "params": { + "amount": "The amount of tokens to burn in wei." + } + }, + "burnFrom(address,uint256)": { + "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "details": "Should only be called by TokenFactory.sol for our system.", + "params": { + "_isLong": "Whether the token is long or short for its market.", + "_longShort": "Address of the core LongShort contract.", + "_marketIndex": "Which market the token is for.", + "_staker": "Address of the staker contract.", + "name": "The name of the token.", + "symbol": "The symbol for the token." + } + }, + "mint(address,uint256)": { + "details": "Can only be called by addresses with a minter role. This should correspond to the Long Short contract.", + "params": { + "amount": "Amount of synthetic tokens to mint in wei.", + "to": "The address for which to mint the tokens for." + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "stake(uint256)": { + "details": "Core staking logic contained in Staker.sol", + "params": { + "amount": "Amount to stake in wei." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "transferFrom(address,address,uint256)": { + "details": "To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.", + "params": { + "amount": "Amount of tokens to transfer in wei.", + "recipient": "Recipient of the transferred tokens.", + "sender": "User for which to transfer tokens." + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "SyntheticTokenUpgradeable", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "balanceOf(address)": { + "notice": "Gets the synthetic token balance of the user in wei." + }, + "burn(uint256)": { + "notice": "Burns or destroys a number of held synthetic tokens for an address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "notice": "Creates an instance of the contract." + }, + "isLong()": { + "notice": "Whether the token is a long token or short token for its market." + }, + "longShort()": { + "notice": "Address of the LongShort contract, a deployed LongShort.sol" + }, + "marketIndex()": { + "notice": "Identifies which market in longShort the token is for." + }, + "mint(address,uint256)": { + "notice": "Mints a number of synthetic tokens for an address." + }, + "stake(uint256)": { + "notice": "Allows users to stake their synthetic tokens to earn Float." + }, + "staker()": { + "notice": "Address of the Staker contract, a deployed Staker.sol" + }, + "transferFrom(address,address,uint256)": { + "notice": "Overrides the default ERC20 transferFrom." + } + }, + "notice": "An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1351, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1357, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1359, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 1361, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 1363, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 1904, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 2069, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_roles", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4251, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "251", + "type": "t_bytes32" + }, + { + "astId": 4253, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "252", + "type": "t_bytes32" + }, + { + "astId": 4390, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "253", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2845, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_nonces", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_address,t_struct(Counter)3544_storage)" + }, + { + "astId": 2847, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_PERMIT_TYPEHASH", + "offset": 0, + "slot": "304", + "type": "t_bytes32" + }, + { + "astId": 3015, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "354", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "404", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 16544, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "longShort", + "offset": 0, + "slot": "454", + "type": "t_address" + }, + { + "astId": 16547, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "staker", + "offset": 0, + "slot": "455", + "type": "t_address" + }, + { + "astId": 16550, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "marketIndex", + "offset": 20, + "slot": "455", + "type": "t_uint32" + }, + { + "astId": 16553, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "isLong", + "offset": 24, + "slot": "455", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)3544_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)3544_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3544_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 3543, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/SLMATIC_Proxy.json b/deployments/mumbai/SLMATIC_Proxy.json new file mode 100644 index 0000000..dc78ccb --- /dev/null +++ b/deployments/mumbai/SLMATIC_Proxy.json @@ -0,0 +1,192 @@ +{ + "address": "0x3329c91bD5118F83F5794ffa2c55b1d88eC49aC5", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x3329c91bD5118F83F5794ffa2c55b1d88eC49aC5", + "transactionIndex": 3, + "gasUsed": "517498", + "logsBloom": "0x00000004000080020000002000000000410000000000000000000000000000000000000000000000000000008000004000008000000000000000000000000000000000000000000000000000004002800000000000000000000100000000000000000000020000000000002000000800000000000000000080010000001000000000000000000000000000000000000000000000000000000000000000000000200000400000000020000000000000000001000000000000001000000000004000000020000000002001000000000000001000100000008100500000000020000080000000000400000000000000000200000000000000000000000000100000", + "blockHash": "0x004b4448e772e9fc7670423aa02cec08e411cf80a3b4d11a9a50340b4e51b16c", + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 18869276, + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "address": "0x3329c91bD5118F83F5794ffa2c55b1d88eC49aC5", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000003d747ff51930c910f1fc67f0417389f0dfbf38ec" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0x004b4448e772e9fc7670423aa02cec08e411cf80a3b4d11a9a50340b4e51b16c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869276, + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "address": "0x3329c91bD5118F83F5794ffa2c55b1d88eC49aC5", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0x004b4448e772e9fc7670423aa02cec08e411cf80a3b4d11a9a50340b4e51b16c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869276, + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "address": "0x3329c91bD5118F83F5794ffa2c55b1d88eC49aC5", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0x004b4448e772e9fc7670423aa02cec08e411cf80a3b4d11a9a50340b4e51b16c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869276, + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "address": "0x3329c91bD5118F83F5794ffa2c55b1d88eC49aC5", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0x004b4448e772e9fc7670423aa02cec08e411cf80a3b4d11a9a50340b4e51b16c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869276, + "transactionHash": "0x990ca3c9eff36fb464725fe240d226147c81eb520936b2d384c4cf676b722d28", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000000583fc2d62cc00000000000000000000000000000000000000000000000000076b9f87d99b8acd00000000000000000000000000000000000000000000016688349ddcdb4064ad00000000000000000000000000000000000000000000000007661b8bac38becd000000000000000000000000000000000000000000000166883a21d908a330ad", + "logIndex": 10, + "blockHash": "0x004b4448e772e9fc7670423aa02cec08e411cf80a3b4d11a9a50340b4e51b16c" + } + ], + "blockNumber": 18869276, + "cumulativeGasUsed": "1026053", + "status": 1, + "byzantium": true + }, + "args": [ + "0x3D747FF51930c910F1Fc67F0417389f0DfbF38eC", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000e058c1679d34fd291b06124f16af70e88dfb8422000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000017466c6f6174204c6f6e67204d41544943204d61726b6574000000000000000000000000000000000000000000000000000000000000000000000000000000001266c3a2c286c298c3afc2b8c28f4d415449430000000000000000000000000000" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/SSBTC.json b/deployments/mumbai/SSBTC.json new file mode 100644 index 0000000..aaaed8a --- /dev/null +++ b/deployments/mumbai/SSBTC.json @@ -0,0 +1,962 @@ +{ + "address": "0x19184023E3ea735aB27662cF7188CFc586E2d028", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x19184023E3ea735aB27662cF7188CFc586E2d028", + "transactionIndex": 2, + "gasUsed": "517450", + "logsBloom": "0x00000004000000000000002400000000410000000000000000000000000000000000000000000000000000008000004000018020000000000000000000000000080000000000000000000000004002800000000000000000000100000000000000000000020000000000000000000800000000000000000080010000001000000000000000000000000000000000000000000000000000000000004000000000200000000000000000000000000000000000000000000000001000000000024000000020080000002001000000000000001200000000018100500000000020000080000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x624d232f898b9dc49aa58e5541986e928240a42ce9a7cc8f24d2cf2910b1a63b", + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 18869316, + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "address": "0x19184023E3ea735aB27662cF7188CFc586E2d028", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000002fec785ff6c0eb8217baecef329b1dfabeac65c4" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x624d232f898b9dc49aa58e5541986e928240a42ce9a7cc8f24d2cf2910b1a63b" + }, + { + "transactionIndex": 2, + "blockNumber": 18869316, + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "address": "0x19184023E3ea735aB27662cF7188CFc586E2d028", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x624d232f898b9dc49aa58e5541986e928240a42ce9a7cc8f24d2cf2910b1a63b" + }, + { + "transactionIndex": 2, + "blockNumber": 18869316, + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "address": "0x19184023E3ea735aB27662cF7188CFc586E2d028", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x624d232f898b9dc49aa58e5541986e928240a42ce9a7cc8f24d2cf2910b1a63b" + }, + { + "transactionIndex": 2, + "blockNumber": 18869316, + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "address": "0x19184023E3ea735aB27662cF7188CFc586E2d028", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0x624d232f898b9dc49aa58e5541986e928240a42ce9a7cc8f24d2cf2910b1a63b" + }, + { + "transactionIndex": 2, + "blockNumber": 18869316, + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" + ], + "data": "0x000000000000000000000000000000000000000000000000000583daa6512c00000000000000000000000000000000000000000000000000072d070a326166cd0000000000000000000000000000000000000000000000000d62544869170e340000000000000000000000000000000000000000000000000727832f8c103acd0000000000000000000000000000000000000000000000000d67d8230f683a34", + "logIndex": 7, + "blockHash": "0x624d232f898b9dc49aa58e5541986e928240a42ce9a7cc8f24d2cf2910b1a63b" + } + ], + "blockNumber": 18869316, + "cumulativeGasUsed": "4922081", + "status": 1, + "byzantium": true + }, + "args": [ + "0x2FeC785Ff6c0eB8217baeCEF329B1dFabEaC65c4", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000e058c1679d34fd291b06124f16af70e88dfb8422000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016466c6f61742053686f727420425443204d61726b657400000000000000000000000000000000000000000000000000000000000000000000000000000000001066c3a2c286c297c3afc2b8c28f42544300000000000000000000000000000000" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "Float Short BTC Market", + "f↗️BTC", + "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "0xe058C1679D34fd291B06124F16AF70e88dFB8422", + 3, + false + ] + }, + "implementation": "0x2FeC785Ff6c0eB8217baeCEF329B1dFabEaC65c4", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/SSBTC_Implementation.json b/deployments/mumbai/SSBTC_Implementation.json new file mode 100644 index 0000000..5c39dbf --- /dev/null +++ b/deployments/mumbai/SSBTC_Implementation.json @@ -0,0 +1,1318 @@ +{ + "address": "0x2FeC785Ff6c0eB8217baeCEF329B1dFabEaC65c4", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x99b7a12d977574c4369d62500a16793170f91a1fcdafa1139ab9e095fe1683e0", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x2FeC785Ff6c0eB8217baeCEF329B1dFabEaC65c4", + "transactionIndex": 0, + "gasUsed": "2450492", + "logsBloom": "0x00000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000018020000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000024000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0xb261bd343c829edf9e7fe723ba3852086ca2e5a87dabdc46da8c87458d1a71c5", + "transactionHash": "0x99b7a12d977574c4369d62500a16793170f91a1fcdafa1139ab9e095fe1683e0", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869313, + "transactionHash": "0x99b7a12d977574c4369d62500a16793170f91a1fcdafa1139ab9e095fe1683e0", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" + ], + "data": "0x000000000000000000000000000000000000000000000000001a1e20e38e08000000000000000000000000000000000000000000000000000747252b15ef6ecd0000000000000000000000000000000000000000000000000d0be4290c4f6e34000000000000000000000000000000000000000000000000072d070a326166cd0000000000000000000000000000000000000000000000000d260249efdd7634", + "logIndex": 0, + "blockHash": "0xb261bd343c829edf9e7fe723ba3852086ca2e5a87dabdc46da8c87458d1a71c5" + } + ], + "blockNumber": 18869313, + "cumulativeGasUsed": "2450492", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staker\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"_isLong\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isLong\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staker\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.\",\"params\":{\"account\":\"The address for which to get the balance of.\"}},\"burn(uint256)\":{\"details\":\"Modified to only allow Long Short to burn tokens on redeem.\",\"params\":{\"amount\":\"The amount of tokens to burn in wei.\"}},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"details\":\"Should only be called by TokenFactory.sol for our system.\",\"params\":{\"_isLong\":\"Whether the token is long or short for its market.\",\"_longShort\":\"Address of the core LongShort contract.\",\"_marketIndex\":\"Which market the token is for.\",\"_staker\":\"Address of the staker contract.\",\"name\":\"The name of the token.\",\"symbol\":\"The symbol for the token.\"}},\"mint(address,uint256)\":{\"details\":\"Can only be called by addresses with a minter role. This should correspond to the Long Short contract.\",\"params\":{\"amount\":\"Amount of synthetic tokens to mint in wei.\",\"to\":\"The address for which to mint the tokens for.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"stake(uint256)\":{\"details\":\"Core staking logic contained in Staker.sol\",\"params\":{\"amount\":\"Amount to stake in wei.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.\",\"params\":{\"amount\":\"Amount of tokens to transfer in wei.\",\"recipient\":\"Recipient of the transferred tokens.\",\"sender\":\"User for which to transfer tokens.\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"SyntheticTokenUpgradeable\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"balanceOf(address)\":{\"notice\":\"Gets the synthetic token balance of the user in wei.\"},\"burn(uint256)\":{\"notice\":\"Burns or destroys a number of held synthetic tokens for an address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"notice\":\"Creates an instance of the contract.\"},\"isLong()\":{\"notice\":\"Whether the token is a long token or short token for its market.\"},\"longShort()\":{\"notice\":\"Address of the LongShort contract, a deployed LongShort.sol\"},\"marketIndex()\":{\"notice\":\"Identifies which market in longShort the token is for.\"},\"mint(address,uint256)\":{\"notice\":\"Mints a number of synthetic tokens for an address.\"},\"stake(uint256)\":{\"notice\":\"Allows users to stake their synthetic tokens to earn Float.\"},\"staker()\":{\"notice\":\"Address of the Staker contract, a deployed Staker.sol\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Overrides the default ERC20 transferFrom.\"}},\"notice\":\"An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SyntheticTokenUpgradeable.sol\":\"SyntheticTokenUpgradeable\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\\n function __ERC20Burnable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC20Burnable_init_unchained();\\n }\\n\\n function __ERC20Burnable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5321bbe08dd6e82e85222024dc300d4959ff8615742ad63135759883a19e02a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation 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 *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal initializer {\\n __Context_init_unchained();\\n __EIP712_init_unchained(name, \\\"1\\\");\\n __ERC20Permit_init_unchained(name);\\n }\\n\\n function __ERC20Permit_init_unchained(string memory name) internal initializer {\\n _PERMIT_TYPEHASH = keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\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 ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xf07c1013d0ecf7a80ff5bf8f59105fc0acc5bf83aa4196b409d9ac3666d37cc6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e321ee7110594e92c1c834d7de2fbdfd01fbed6c06127fe75c5836fe80a24a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x00c96e792d367a436015f12ce2665aa8e2a0d61d2c6045a82cbb37da20e5a042\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x07411372282794f7ecde69a1065e5d20441abe7c9f8861437b4d45c9a4712fa6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal initializer {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal initializer {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x30f3940c119b4d93578bac394f43ee9b0b8465ea1e60b316244183be2983a5ed\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"contracts/SyntheticTokenUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\n/**\\n@title SyntheticTokenUpgradeable\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n@dev Logic for price tracking contained in LongShort.sol. \\n The contract inherits from ERC20PresetMinterPauser.sol\\n*/\\ncontract SyntheticTokenUpgradeable is\\n ISyntheticToken,\\n Initializable,\\n ERC20Upgradeable,\\n ERC20BurnableUpgradeable,\\n AccessControlUpgradeable,\\n ERC20PermitUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n\\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\\n address public longShort;\\n /// @notice Address of the Staker contract, a deployed Staker.sol\\n address public staker;\\n /// @notice Identifies which market in longShort the token is for.\\n uint32 public marketIndex;\\n /// @notice Whether the token is a long token or short token for its market.\\n bool public isLong;\\n\\n /// @notice Creates an instance of the contract.\\n /// @dev Should only be called by TokenFactory.sol for our system.\\n /// @param name The name of the token.\\n /// @param symbol The symbol for the token.\\n /// @param _longShort Address of the core LongShort contract.\\n /// @param _staker Address of the staker contract.\\n /// @param _marketIndex Which market the token is for.\\n /// @param _isLong Whether the token is long or short for its market.\\n function initialize(\\n string memory name,\\n string memory symbol,\\n address _longShort,\\n address _staker,\\n uint32 _marketIndex,\\n bool _isLong\\n ) external initializer {\\n __ERC20_init(name, symbol);\\n __ERC20Burnable_init();\\n __AccessControl_init();\\n __ERC20Permit_init(name);\\n __UUPSUpgradeable_init();\\n\\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n renounceRole(MINTER_ROLE, msg.sender);\\n\\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\\n _setupRole(MINTER_ROLE, _longShort);\\n _setupRole(UPGRADER_ROLE, msg.sender);\\n\\n longShort = _longShort;\\n staker = _staker;\\n marketIndex = _marketIndex;\\n isLong = _isLong;\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by the current admin.\\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\\n\\n // TODO - look at some way of not duplicating implementation logic between this and SyntheticToken.sol\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n /// @dev Core staking logic contained in Staker.sol\\n /// @param amount Amount to stake in wei.\\n function stake(uint256 amount) external override {\\n // NOTE: this is safe, this function will throw \\\"ERC20: transfer\\n // amount exceeds balance\\\" if amount exceeds users balance.\\n super._transfer(msg.sender, address(staker), amount);\\n\\n IStaker(staker).stakeFromUser(msg.sender, amount);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 FUNCTIONS INHERITED BY ERC20PresetMinterPauser \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function totalSupply()\\n public\\n view\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (uint256)\\n {\\n return ERC20Upgradeable.totalSupply();\\n }\\n\\n /** \\n @notice Mints a number of synthetic tokens for an address.\\n @dev Can only be called by addresses with a minter role. \\n This should correspond to the Long Short contract.\\n @param to The address for which to mint the tokens for.\\n @param amount Amount of synthetic tokens to mint in wei.\\n */\\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\\n /// @param amount The amount of tokens to burn in wei.\\n function burn(uint256 amount) public override(ERC20BurnableUpgradeable, ISyntheticToken) {\\n require(msg.sender == longShort, \\\"Only LongShort contract\\\");\\n super._burn(_msgSender(), amount);\\n }\\n\\n /** \\n @notice Overrides the default ERC20 transferFrom.\\n @dev To allow users to avoid approving LongShort when redeeming tokens,\\n longShort has a virtual infinite allowance.\\n @param sender User for which to transfer tokens.\\n @param recipient Recipient of the transferred tokens.\\n @param amount Amount of tokens to transfer in wei.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public override(ERC20Upgradeable, ISyntheticToken) returns (bool) {\\n if (recipient == longShort && msg.sender == longShort) {\\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\\n ERC20Upgradeable._transfer(sender, recipient, amount);\\n return true;\\n } else {\\n return ERC20Upgradeable.transferFrom(sender, recipient, amount);\\n }\\n }\\n\\n function transfer(address recipient, uint256 amount)\\n public\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (bool)\\n {\\n return ERC20Upgradeable.transfer(recipient, amount);\\n }\\n\\n /** \\n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\\n tokens from next price actions before any token transfer occurs.\\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\\n @param sender User for which tokens are to be transferred for.\\n */\\n function _beforeTokenTransfer(\\n address sender,\\n address to,\\n uint256 amount\\n ) internal override {\\n if (sender != longShort) {\\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\\n }\\n super._beforeTokenTransfer(sender, to, amount);\\n }\\n\\n /** \\n @notice Gets the synthetic token balance of the user in wei.\\n @dev To automatically account for next price actions which have been confirmed but not settled,\\n includes any outstanding tokens owed by longShort.\\n @param account The address for which to get the balance of.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return\\n ERC20Upgradeable.balanceOf(account) +\\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\\n account,\\n marketIndex,\\n isLong\\n );\\n }\\n}\\n\",\"keccak256\":\"0x9c9c854d549d24c0e0915a2083fa5da69f3227d98469a0c8516e309b23b361ce\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612b5f806100206000396000f3fe6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "devdoc": { + "details": "Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol", + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.", + "params": { + "account": "The address for which to get the balance of." + } + }, + "burn(uint256)": { + "details": "Modified to only allow Long Short to burn tokens on redeem.", + "params": { + "amount": "The amount of tokens to burn in wei." + } + }, + "burnFrom(address,uint256)": { + "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "details": "Should only be called by TokenFactory.sol for our system.", + "params": { + "_isLong": "Whether the token is long or short for its market.", + "_longShort": "Address of the core LongShort contract.", + "_marketIndex": "Which market the token is for.", + "_staker": "Address of the staker contract.", + "name": "The name of the token.", + "symbol": "The symbol for the token." + } + }, + "mint(address,uint256)": { + "details": "Can only be called by addresses with a minter role. This should correspond to the Long Short contract.", + "params": { + "amount": "Amount of synthetic tokens to mint in wei.", + "to": "The address for which to mint the tokens for." + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "stake(uint256)": { + "details": "Core staking logic contained in Staker.sol", + "params": { + "amount": "Amount to stake in wei." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "transferFrom(address,address,uint256)": { + "details": "To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.", + "params": { + "amount": "Amount of tokens to transfer in wei.", + "recipient": "Recipient of the transferred tokens.", + "sender": "User for which to transfer tokens." + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "SyntheticTokenUpgradeable", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "balanceOf(address)": { + "notice": "Gets the synthetic token balance of the user in wei." + }, + "burn(uint256)": { + "notice": "Burns or destroys a number of held synthetic tokens for an address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "notice": "Creates an instance of the contract." + }, + "isLong()": { + "notice": "Whether the token is a long token or short token for its market." + }, + "longShort()": { + "notice": "Address of the LongShort contract, a deployed LongShort.sol" + }, + "marketIndex()": { + "notice": "Identifies which market in longShort the token is for." + }, + "mint(address,uint256)": { + "notice": "Mints a number of synthetic tokens for an address." + }, + "stake(uint256)": { + "notice": "Allows users to stake their synthetic tokens to earn Float." + }, + "staker()": { + "notice": "Address of the Staker contract, a deployed Staker.sol" + }, + "transferFrom(address,address,uint256)": { + "notice": "Overrides the default ERC20 transferFrom." + } + }, + "notice": "An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1351, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1357, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1359, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 1361, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 1363, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 1904, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 2069, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_roles", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4251, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "251", + "type": "t_bytes32" + }, + { + "astId": 4253, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "252", + "type": "t_bytes32" + }, + { + "astId": 4390, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "253", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2845, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_nonces", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_address,t_struct(Counter)3544_storage)" + }, + { + "astId": 2847, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_PERMIT_TYPEHASH", + "offset": 0, + "slot": "304", + "type": "t_bytes32" + }, + { + "astId": 3015, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "354", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "404", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 16544, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "longShort", + "offset": 0, + "slot": "454", + "type": "t_address" + }, + { + "astId": 16547, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "staker", + "offset": 0, + "slot": "455", + "type": "t_address" + }, + { + "astId": 16550, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "marketIndex", + "offset": 20, + "slot": "455", + "type": "t_uint32" + }, + { + "astId": 16553, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "isLong", + "offset": 24, + "slot": "455", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)3544_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)3544_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3544_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 3543, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/SSBTC_Proxy.json b/deployments/mumbai/SSBTC_Proxy.json new file mode 100644 index 0000000..dfb4d99 --- /dev/null +++ b/deployments/mumbai/SSBTC_Proxy.json @@ -0,0 +1,192 @@ +{ + "address": "0x19184023E3ea735aB27662cF7188CFc586E2d028", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x19184023E3ea735aB27662cF7188CFc586E2d028", + "transactionIndex": 2, + "gasUsed": "517450", + "logsBloom": "0x00000004000000000000002400000000410000000000000000000000000000000000000000000000000000008000004000018020000000000000000000000000080000000000000000000000004002800000000000000000000100000000000000000000020000000000000000000800000000000000000080010000001000000000000000000000000000000000000000000000000000000000004000000000200000000000000000000000000000000000000000000000001000000000024000000020080000002001000000000000001200000000018100500000000020000080000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x624d232f898b9dc49aa58e5541986e928240a42ce9a7cc8f24d2cf2910b1a63b", + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 18869316, + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "address": "0x19184023E3ea735aB27662cF7188CFc586E2d028", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000002fec785ff6c0eb8217baecef329b1dfabeac65c4" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x624d232f898b9dc49aa58e5541986e928240a42ce9a7cc8f24d2cf2910b1a63b" + }, + { + "transactionIndex": 2, + "blockNumber": 18869316, + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "address": "0x19184023E3ea735aB27662cF7188CFc586E2d028", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x624d232f898b9dc49aa58e5541986e928240a42ce9a7cc8f24d2cf2910b1a63b" + }, + { + "transactionIndex": 2, + "blockNumber": 18869316, + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "address": "0x19184023E3ea735aB27662cF7188CFc586E2d028", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x624d232f898b9dc49aa58e5541986e928240a42ce9a7cc8f24d2cf2910b1a63b" + }, + { + "transactionIndex": 2, + "blockNumber": 18869316, + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "address": "0x19184023E3ea735aB27662cF7188CFc586E2d028", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0x624d232f898b9dc49aa58e5541986e928240a42ce9a7cc8f24d2cf2910b1a63b" + }, + { + "transactionIndex": 2, + "blockNumber": 18869316, + "transactionHash": "0x976f470ad988eb95800ec1fa83ed0b543e49b6b8cde046df642213ead9396cf7", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" + ], + "data": "0x000000000000000000000000000000000000000000000000000583daa6512c00000000000000000000000000000000000000000000000000072d070a326166cd0000000000000000000000000000000000000000000000000d62544869170e340000000000000000000000000000000000000000000000000727832f8c103acd0000000000000000000000000000000000000000000000000d67d8230f683a34", + "logIndex": 7, + "blockHash": "0x624d232f898b9dc49aa58e5541986e928240a42ce9a7cc8f24d2cf2910b1a63b" + } + ], + "blockNumber": 18869316, + "cumulativeGasUsed": "4922081", + "status": 1, + "byzantium": true + }, + "args": [ + "0x2FeC785Ff6c0eB8217baeCEF329B1dFabEaC65c4", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000e058c1679d34fd291b06124f16af70e88dfb8422000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016466c6f61742053686f727420425443204d61726b657400000000000000000000000000000000000000000000000000000000000000000000000000000000001066c3a2c286c297c3afc2b8c28f42544300000000000000000000000000000000" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/SSETH.json b/deployments/mumbai/SSETH.json new file mode 100644 index 0000000..20e92e4 --- /dev/null +++ b/deployments/mumbai/SSETH.json @@ -0,0 +1,962 @@ +{ + "address": "0xf7Bfa8bD974011657E87ab453FF978156482C783", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xf7Bfa8bD974011657E87ab453FF978156482C783", + "transactionIndex": 1, + "gasUsed": "517450", + "logsBloom": "0x00000004000000020000002000000000410000000000000000000000000000000000000000000000000000008000004000008080000000000000000000000000000000000000000000000000004002800000000000000200000100000000000000000000060000000000000000000800000000000000000080010000001000000000000000000000000000000000000000000000000000040000000000000000200000000000000020000000000000000001000000000000001000000000004000000020000000002001000000000000001000000000018100500000000020000080000000000000000000000000000000008000000000000000000000100000", + "blockHash": "0x42011896f34d548144e9ae56c2c41b00d6c9ae6caf63c5943736098858badf4f", + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 18869004, + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "address": "0xf7Bfa8bD974011657E87ab453FF978156482C783", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000ce7c329ca35a6fffd94723621f74358f41c3cc44" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x42011896f34d548144e9ae56c2c41b00d6c9ae6caf63c5943736098858badf4f" + }, + { + "transactionIndex": 1, + "blockNumber": 18869004, + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "address": "0xf7Bfa8bD974011657E87ab453FF978156482C783", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x42011896f34d548144e9ae56c2c41b00d6c9ae6caf63c5943736098858badf4f" + }, + { + "transactionIndex": 1, + "blockNumber": 18869004, + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "address": "0xf7Bfa8bD974011657E87ab453FF978156482C783", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0x42011896f34d548144e9ae56c2c41b00d6c9ae6caf63c5943736098858badf4f" + }, + { + "transactionIndex": 1, + "blockNumber": 18869004, + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "address": "0xf7Bfa8bD974011657E87ab453FF978156482C783", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0x42011896f34d548144e9ae56c2c41b00d6c9ae6caf63c5943736098858badf4f" + }, + { + "transactionIndex": 1, + "blockNumber": 18869004, + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000000583daa6512c0000000000000000000000000000000000000000000000000007e97bfc949416cd00000000000000000000000000000000000000000000016686175953ff1d32ad00000000000000000000000000000000000000000000000007e3f821ee42eacd000000000000000000000000000000000000000000000166861cdd2ea56e5ead", + "logIndex": 8, + "blockHash": "0x42011896f34d548144e9ae56c2c41b00d6c9ae6caf63c5943736098858badf4f" + } + ], + "blockNumber": 18869004, + "cumulativeGasUsed": "610121", + "status": 1, + "byzantium": true + }, + "args": [ + "0xcE7c329cA35a6fFfd94723621f74358F41C3CC44", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000e058c1679d34fd291b06124f16af70e88dfb8422000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016466c6f61742053686f727420455448204d61726b657400000000000000000000000000000000000000000000000000000000000000000000000000000000001066c3a2c286c297c3afc2b8c28f45544800000000000000000000000000000000" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "Float Short ETH Market", + "f↗️ETH", + "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "0xe058C1679D34fd291B06124F16AF70e88dFB8422", + 1, + false + ] + }, + "implementation": "0xcE7c329cA35a6fFfd94723621f74358F41C3CC44", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/SSETH_Implementation.json b/deployments/mumbai/SSETH_Implementation.json new file mode 100644 index 0000000..73a83b0 --- /dev/null +++ b/deployments/mumbai/SSETH_Implementation.json @@ -0,0 +1,1318 @@ +{ + "address": "0xcE7c329cA35a6fFfd94723621f74358F41C3CC44", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0xde11ac936cbe5221ec11dabb8f2afa2a5cf3d2f42b4e104957c292b3e4ce7da7", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xcE7c329cA35a6fFfd94723621f74358F41C3CC44", + "transactionIndex": 0, + "gasUsed": "2450492", + "logsBloom": "0x00000000000000020000000000000000010000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0xbc554d783a0104b3cb58dca5795443afd5d443210f9147b23965927d0fc93830", + "transactionHash": "0xde11ac936cbe5221ec11dabb8f2afa2a5cf3d2f42b4e104957c292b3e4ce7da7", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869000, + "transactionHash": "0xde11ac936cbe5221ec11dabb8f2afa2a5cf3d2f42b4e104957c292b3e4ce7da7", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000001a1e20e38e080000000000000000000000000000000000000000000000000008039a1d78221ecd00000000000000000000000000000000000000000000016685f4657cfc3be6ad00000000000000000000000000000000000000000000000007e97bfc949416cd000000000000000000000000000000000000000000000166860e839ddfc9eead", + "logIndex": 0, + "blockHash": "0xbc554d783a0104b3cb58dca5795443afd5d443210f9147b23965927d0fc93830" + } + ], + "blockNumber": 18869000, + "cumulativeGasUsed": "2450492", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staker\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"_isLong\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isLong\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staker\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.\",\"params\":{\"account\":\"The address for which to get the balance of.\"}},\"burn(uint256)\":{\"details\":\"Modified to only allow Long Short to burn tokens on redeem.\",\"params\":{\"amount\":\"The amount of tokens to burn in wei.\"}},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"details\":\"Should only be called by TokenFactory.sol for our system.\",\"params\":{\"_isLong\":\"Whether the token is long or short for its market.\",\"_longShort\":\"Address of the core LongShort contract.\",\"_marketIndex\":\"Which market the token is for.\",\"_staker\":\"Address of the staker contract.\",\"name\":\"The name of the token.\",\"symbol\":\"The symbol for the token.\"}},\"mint(address,uint256)\":{\"details\":\"Can only be called by addresses with a minter role. This should correspond to the Long Short contract.\",\"params\":{\"amount\":\"Amount of synthetic tokens to mint in wei.\",\"to\":\"The address for which to mint the tokens for.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"stake(uint256)\":{\"details\":\"Core staking logic contained in Staker.sol\",\"params\":{\"amount\":\"Amount to stake in wei.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.\",\"params\":{\"amount\":\"Amount of tokens to transfer in wei.\",\"recipient\":\"Recipient of the transferred tokens.\",\"sender\":\"User for which to transfer tokens.\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"SyntheticTokenUpgradeable\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"balanceOf(address)\":{\"notice\":\"Gets the synthetic token balance of the user in wei.\"},\"burn(uint256)\":{\"notice\":\"Burns or destroys a number of held synthetic tokens for an address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"notice\":\"Creates an instance of the contract.\"},\"isLong()\":{\"notice\":\"Whether the token is a long token or short token for its market.\"},\"longShort()\":{\"notice\":\"Address of the LongShort contract, a deployed LongShort.sol\"},\"marketIndex()\":{\"notice\":\"Identifies which market in longShort the token is for.\"},\"mint(address,uint256)\":{\"notice\":\"Mints a number of synthetic tokens for an address.\"},\"stake(uint256)\":{\"notice\":\"Allows users to stake their synthetic tokens to earn Float.\"},\"staker()\":{\"notice\":\"Address of the Staker contract, a deployed Staker.sol\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Overrides the default ERC20 transferFrom.\"}},\"notice\":\"An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SyntheticTokenUpgradeable.sol\":\"SyntheticTokenUpgradeable\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\\n function __ERC20Burnable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC20Burnable_init_unchained();\\n }\\n\\n function __ERC20Burnable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5321bbe08dd6e82e85222024dc300d4959ff8615742ad63135759883a19e02a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation 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 *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal initializer {\\n __Context_init_unchained();\\n __EIP712_init_unchained(name, \\\"1\\\");\\n __ERC20Permit_init_unchained(name);\\n }\\n\\n function __ERC20Permit_init_unchained(string memory name) internal initializer {\\n _PERMIT_TYPEHASH = keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\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 ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xf07c1013d0ecf7a80ff5bf8f59105fc0acc5bf83aa4196b409d9ac3666d37cc6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e321ee7110594e92c1c834d7de2fbdfd01fbed6c06127fe75c5836fe80a24a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x00c96e792d367a436015f12ce2665aa8e2a0d61d2c6045a82cbb37da20e5a042\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x07411372282794f7ecde69a1065e5d20441abe7c9f8861437b4d45c9a4712fa6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal initializer {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal initializer {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x30f3940c119b4d93578bac394f43ee9b0b8465ea1e60b316244183be2983a5ed\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"contracts/SyntheticTokenUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\n/**\\n@title SyntheticTokenUpgradeable\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n@dev Logic for price tracking contained in LongShort.sol. \\n The contract inherits from ERC20PresetMinterPauser.sol\\n*/\\ncontract SyntheticTokenUpgradeable is\\n ISyntheticToken,\\n Initializable,\\n ERC20Upgradeable,\\n ERC20BurnableUpgradeable,\\n AccessControlUpgradeable,\\n ERC20PermitUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n\\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\\n address public longShort;\\n /// @notice Address of the Staker contract, a deployed Staker.sol\\n address public staker;\\n /// @notice Identifies which market in longShort the token is for.\\n uint32 public marketIndex;\\n /// @notice Whether the token is a long token or short token for its market.\\n bool public isLong;\\n\\n /// @notice Creates an instance of the contract.\\n /// @dev Should only be called by TokenFactory.sol for our system.\\n /// @param name The name of the token.\\n /// @param symbol The symbol for the token.\\n /// @param _longShort Address of the core LongShort contract.\\n /// @param _staker Address of the staker contract.\\n /// @param _marketIndex Which market the token is for.\\n /// @param _isLong Whether the token is long or short for its market.\\n function initialize(\\n string memory name,\\n string memory symbol,\\n address _longShort,\\n address _staker,\\n uint32 _marketIndex,\\n bool _isLong\\n ) external initializer {\\n __ERC20_init(name, symbol);\\n __ERC20Burnable_init();\\n __AccessControl_init();\\n __ERC20Permit_init(name);\\n __UUPSUpgradeable_init();\\n\\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n renounceRole(MINTER_ROLE, msg.sender);\\n\\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\\n _setupRole(MINTER_ROLE, _longShort);\\n _setupRole(UPGRADER_ROLE, msg.sender);\\n\\n longShort = _longShort;\\n staker = _staker;\\n marketIndex = _marketIndex;\\n isLong = _isLong;\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by the current admin.\\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\\n\\n // TODO - look at some way of not duplicating implementation logic between this and SyntheticToken.sol\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n /// @dev Core staking logic contained in Staker.sol\\n /// @param amount Amount to stake in wei.\\n function stake(uint256 amount) external override {\\n // NOTE: this is safe, this function will throw \\\"ERC20: transfer\\n // amount exceeds balance\\\" if amount exceeds users balance.\\n super._transfer(msg.sender, address(staker), amount);\\n\\n IStaker(staker).stakeFromUser(msg.sender, amount);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 FUNCTIONS INHERITED BY ERC20PresetMinterPauser \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function totalSupply()\\n public\\n view\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (uint256)\\n {\\n return ERC20Upgradeable.totalSupply();\\n }\\n\\n /** \\n @notice Mints a number of synthetic tokens for an address.\\n @dev Can only be called by addresses with a minter role. \\n This should correspond to the Long Short contract.\\n @param to The address for which to mint the tokens for.\\n @param amount Amount of synthetic tokens to mint in wei.\\n */\\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\\n /// @param amount The amount of tokens to burn in wei.\\n function burn(uint256 amount) public override(ERC20BurnableUpgradeable, ISyntheticToken) {\\n require(msg.sender == longShort, \\\"Only LongShort contract\\\");\\n super._burn(_msgSender(), amount);\\n }\\n\\n /** \\n @notice Overrides the default ERC20 transferFrom.\\n @dev To allow users to avoid approving LongShort when redeeming tokens,\\n longShort has a virtual infinite allowance.\\n @param sender User for which to transfer tokens.\\n @param recipient Recipient of the transferred tokens.\\n @param amount Amount of tokens to transfer in wei.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public override(ERC20Upgradeable, ISyntheticToken) returns (bool) {\\n if (recipient == longShort && msg.sender == longShort) {\\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\\n ERC20Upgradeable._transfer(sender, recipient, amount);\\n return true;\\n } else {\\n return ERC20Upgradeable.transferFrom(sender, recipient, amount);\\n }\\n }\\n\\n function transfer(address recipient, uint256 amount)\\n public\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (bool)\\n {\\n return ERC20Upgradeable.transfer(recipient, amount);\\n }\\n\\n /** \\n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\\n tokens from next price actions before any token transfer occurs.\\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\\n @param sender User for which tokens are to be transferred for.\\n */\\n function _beforeTokenTransfer(\\n address sender,\\n address to,\\n uint256 amount\\n ) internal override {\\n if (sender != longShort) {\\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\\n }\\n super._beforeTokenTransfer(sender, to, amount);\\n }\\n\\n /** \\n @notice Gets the synthetic token balance of the user in wei.\\n @dev To automatically account for next price actions which have been confirmed but not settled,\\n includes any outstanding tokens owed by longShort.\\n @param account The address for which to get the balance of.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return\\n ERC20Upgradeable.balanceOf(account) +\\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\\n account,\\n marketIndex,\\n isLong\\n );\\n }\\n}\\n\",\"keccak256\":\"0x9c9c854d549d24c0e0915a2083fa5da69f3227d98469a0c8516e309b23b361ce\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612b5f806100206000396000f3fe6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "devdoc": { + "details": "Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol", + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.", + "params": { + "account": "The address for which to get the balance of." + } + }, + "burn(uint256)": { + "details": "Modified to only allow Long Short to burn tokens on redeem.", + "params": { + "amount": "The amount of tokens to burn in wei." + } + }, + "burnFrom(address,uint256)": { + "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "details": "Should only be called by TokenFactory.sol for our system.", + "params": { + "_isLong": "Whether the token is long or short for its market.", + "_longShort": "Address of the core LongShort contract.", + "_marketIndex": "Which market the token is for.", + "_staker": "Address of the staker contract.", + "name": "The name of the token.", + "symbol": "The symbol for the token." + } + }, + "mint(address,uint256)": { + "details": "Can only be called by addresses with a minter role. This should correspond to the Long Short contract.", + "params": { + "amount": "Amount of synthetic tokens to mint in wei.", + "to": "The address for which to mint the tokens for." + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "stake(uint256)": { + "details": "Core staking logic contained in Staker.sol", + "params": { + "amount": "Amount to stake in wei." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "transferFrom(address,address,uint256)": { + "details": "To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.", + "params": { + "amount": "Amount of tokens to transfer in wei.", + "recipient": "Recipient of the transferred tokens.", + "sender": "User for which to transfer tokens." + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "SyntheticTokenUpgradeable", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "balanceOf(address)": { + "notice": "Gets the synthetic token balance of the user in wei." + }, + "burn(uint256)": { + "notice": "Burns or destroys a number of held synthetic tokens for an address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "notice": "Creates an instance of the contract." + }, + "isLong()": { + "notice": "Whether the token is a long token or short token for its market." + }, + "longShort()": { + "notice": "Address of the LongShort contract, a deployed LongShort.sol" + }, + "marketIndex()": { + "notice": "Identifies which market in longShort the token is for." + }, + "mint(address,uint256)": { + "notice": "Mints a number of synthetic tokens for an address." + }, + "stake(uint256)": { + "notice": "Allows users to stake their synthetic tokens to earn Float." + }, + "staker()": { + "notice": "Address of the Staker contract, a deployed Staker.sol" + }, + "transferFrom(address,address,uint256)": { + "notice": "Overrides the default ERC20 transferFrom." + } + }, + "notice": "An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1351, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1357, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1359, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 1361, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 1363, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 1904, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 2069, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_roles", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4251, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "251", + "type": "t_bytes32" + }, + { + "astId": 4253, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "252", + "type": "t_bytes32" + }, + { + "astId": 4390, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "253", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2845, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_nonces", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_address,t_struct(Counter)3544_storage)" + }, + { + "astId": 2847, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_PERMIT_TYPEHASH", + "offset": 0, + "slot": "304", + "type": "t_bytes32" + }, + { + "astId": 3015, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "354", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "404", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 16544, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "longShort", + "offset": 0, + "slot": "454", + "type": "t_address" + }, + { + "astId": 16547, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "staker", + "offset": 0, + "slot": "455", + "type": "t_address" + }, + { + "astId": 16550, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "marketIndex", + "offset": 20, + "slot": "455", + "type": "t_uint32" + }, + { + "astId": 16553, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "isLong", + "offset": 24, + "slot": "455", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)3544_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)3544_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3544_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 3543, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/SSETH_Proxy.json b/deployments/mumbai/SSETH_Proxy.json new file mode 100644 index 0000000..10b0bbe --- /dev/null +++ b/deployments/mumbai/SSETH_Proxy.json @@ -0,0 +1,192 @@ +{ + "address": "0xf7Bfa8bD974011657E87ab453FF978156482C783", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xf7Bfa8bD974011657E87ab453FF978156482C783", + "transactionIndex": 1, + "gasUsed": "517450", + "logsBloom": "0x00000004000000020000002000000000410000000000000000000000000000000000000000000000000000008000004000008080000000000000000000000000000000000000000000000000004002800000000000000200000100000000000000000000060000000000000000000800000000000000000080010000001000000000000000000000000000000000000000000000000000040000000000000000200000000000000020000000000000000001000000000000001000000000004000000020000000002001000000000000001000000000018100500000000020000080000000000000000000000000000000008000000000000000000000100000", + "blockHash": "0x42011896f34d548144e9ae56c2c41b00d6c9ae6caf63c5943736098858badf4f", + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 18869004, + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "address": "0xf7Bfa8bD974011657E87ab453FF978156482C783", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000ce7c329ca35a6fffd94723621f74358f41c3cc44" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x42011896f34d548144e9ae56c2c41b00d6c9ae6caf63c5943736098858badf4f" + }, + { + "transactionIndex": 1, + "blockNumber": 18869004, + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "address": "0xf7Bfa8bD974011657E87ab453FF978156482C783", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x42011896f34d548144e9ae56c2c41b00d6c9ae6caf63c5943736098858badf4f" + }, + { + "transactionIndex": 1, + "blockNumber": 18869004, + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "address": "0xf7Bfa8bD974011657E87ab453FF978156482C783", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0x42011896f34d548144e9ae56c2c41b00d6c9ae6caf63c5943736098858badf4f" + }, + { + "transactionIndex": 1, + "blockNumber": 18869004, + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "address": "0xf7Bfa8bD974011657E87ab453FF978156482C783", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0x42011896f34d548144e9ae56c2c41b00d6c9ae6caf63c5943736098858badf4f" + }, + { + "transactionIndex": 1, + "blockNumber": 18869004, + "transactionHash": "0x2c7fbfd05a9fb49a748aa10259aa72b4cd3fd39ba1dfbda64d8220ec272dd6f5", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000000583daa6512c0000000000000000000000000000000000000000000000000007e97bfc949416cd00000000000000000000000000000000000000000000016686175953ff1d32ad00000000000000000000000000000000000000000000000007e3f821ee42eacd000000000000000000000000000000000000000000000166861cdd2ea56e5ead", + "logIndex": 8, + "blockHash": "0x42011896f34d548144e9ae56c2c41b00d6c9ae6caf63c5943736098858badf4f" + } + ], + "blockNumber": 18869004, + "cumulativeGasUsed": "610121", + "status": 1, + "byzantium": true + }, + "args": [ + "0xcE7c329cA35a6fFfd94723621f74358F41C3CC44", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000e058c1679d34fd291b06124f16af70e88dfb8422000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016466c6f61742053686f727420455448204d61726b657400000000000000000000000000000000000000000000000000000000000000000000000000000000001066c3a2c286c297c3afc2b8c28f45544800000000000000000000000000000000" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/SSMATIC.json b/deployments/mumbai/SSMATIC.json new file mode 100644 index 0000000..83cb1d8 --- /dev/null +++ b/deployments/mumbai/SSMATIC.json @@ -0,0 +1,962 @@ +{ + "address": "0xcDa695e6c6257d8984D6D9864278A96d81Fdf082", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xcDa695e6c6257d8984D6D9864278A96d81Fdf082", + "transactionIndex": 0, + "gasUsed": "517498", + "logsBloom": "0x00000004000000820000002000000000410000000000000000000000000000000000000000000000000000008000004000048000000000000000000000000000000000000000000000000000004002800000000000000000000100000000000000000000020000000000000000000800000000000000000080010000001000000000000000000000000000000000000000000000000000000000000000000000200000000000000021000000000000000001000000200000001000000000004000008020000000002001000000000000001000000000008100500000000020000080000000000000000000000000000000000000000000000000000000500000", + "blockHash": "0x67f38ef609817548e93b646a2e5e50fad0ec241b7768fd7fb8fc1df6d91aba39", + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869269, + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "address": "0xcDa695e6c6257d8984D6D9864278A96d81Fdf082", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000df0bd3dd3c78993f3e3508bfc44147418a52d525" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x67f38ef609817548e93b646a2e5e50fad0ec241b7768fd7fb8fc1df6d91aba39" + }, + { + "transactionIndex": 0, + "blockNumber": 18869269, + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "address": "0xcDa695e6c6257d8984D6D9864278A96d81Fdf082", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x67f38ef609817548e93b646a2e5e50fad0ec241b7768fd7fb8fc1df6d91aba39" + }, + { + "transactionIndex": 0, + "blockNumber": 18869269, + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "address": "0xcDa695e6c6257d8984D6D9864278A96d81Fdf082", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x67f38ef609817548e93b646a2e5e50fad0ec241b7768fd7fb8fc1df6d91aba39" + }, + { + "transactionIndex": 0, + "blockNumber": 18869269, + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "address": "0xcDa695e6c6257d8984D6D9864278A96d81Fdf082", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x67f38ef609817548e93b646a2e5e50fad0ec241b7768fd7fb8fc1df6d91aba39" + }, + { + "transactionIndex": 0, + "blockNumber": 18869269, + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000000583fc2d62cc00000000000000000000000000000000000000000000000000078b41a4ea8c5ecd00000000000000000000000000000000000000000000016687ced29a9e3840ad0000000000000000000000000000000000000000000000000785bda8bd2992cd00000000000000000000000000000000000000000000016687d45696cb9b0cad", + "logIndex": 4, + "blockHash": "0x67f38ef609817548e93b646a2e5e50fad0ec241b7768fd7fb8fc1df6d91aba39" + } + ], + "blockNumber": 18869269, + "cumulativeGasUsed": "517498", + "status": 1, + "byzantium": true + }, + "args": [ + "0xDF0BD3DD3C78993f3e3508Bfc44147418a52D525", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000e058c1679d34fd291b06124f16af70e88dfb8422000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018466c6f61742053686f7274204d41544943204d61726b65740000000000000000000000000000000000000000000000000000000000000000000000000000001266c3a2c286c297c3afc2b8c28f4d415449430000000000000000000000000000" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "Float Short MATIC Market", + "f↗️MATIC", + "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "0xe058C1679D34fd291B06124F16AF70e88dFB8422", + 2, + false + ] + }, + "implementation": "0xDF0BD3DD3C78993f3e3508Bfc44147418a52D525", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/SSMATIC_Implementation.json b/deployments/mumbai/SSMATIC_Implementation.json new file mode 100644 index 0000000..6d9bb11 --- /dev/null +++ b/deployments/mumbai/SSMATIC_Implementation.json @@ -0,0 +1,1318 @@ +{ + "address": "0xDF0BD3DD3C78993f3e3508Bfc44147418a52D525", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0xfb047eafa3710d64f5333dd85e6879aa6123bb80bc75e2b56ac727d5c0390943", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xDF0BD3DD3C78993f3e3508Bfc44147418a52D525", + "transactionIndex": 0, + "gasUsed": "2450492", + "logsBloom": "0x00000000000000020000000000000000010000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x575b9d61c612f7d3917548417b95ddc70b0b2f2ccc28db643c4bfbc9256d13d0", + "transactionHash": "0xfb047eafa3710d64f5333dd85e6879aa6123bb80bc75e2b56ac727d5c0390943", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869265, + "transactionHash": "0xfb047eafa3710d64f5333dd85e6879aa6123bb80bc75e2b56ac727d5c0390943", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000001a1e20e38e080000000000000000000000000000000000000000000000000007a55fc5ce1a66cd00000000000000000000000000000000000000000000016687a94caa613d96ad000000000000000000000000000000000000000000000000078b41a4ea8c5ecd00000000000000000000000000000000000000000000016687c36acb44cb9ead", + "logIndex": 0, + "blockHash": "0x575b9d61c612f7d3917548417b95ddc70b0b2f2ccc28db643c4bfbc9256d13d0" + } + ], + "blockNumber": 18869265, + "cumulativeGasUsed": "2450492", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staker\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"_isLong\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isLong\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staker\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.\",\"params\":{\"account\":\"The address for which to get the balance of.\"}},\"burn(uint256)\":{\"details\":\"Modified to only allow Long Short to burn tokens on redeem.\",\"params\":{\"amount\":\"The amount of tokens to burn in wei.\"}},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"details\":\"Should only be called by TokenFactory.sol for our system.\",\"params\":{\"_isLong\":\"Whether the token is long or short for its market.\",\"_longShort\":\"Address of the core LongShort contract.\",\"_marketIndex\":\"Which market the token is for.\",\"_staker\":\"Address of the staker contract.\",\"name\":\"The name of the token.\",\"symbol\":\"The symbol for the token.\"}},\"mint(address,uint256)\":{\"details\":\"Can only be called by addresses with a minter role. This should correspond to the Long Short contract.\",\"params\":{\"amount\":\"Amount of synthetic tokens to mint in wei.\",\"to\":\"The address for which to mint the tokens for.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"stake(uint256)\":{\"details\":\"Core staking logic contained in Staker.sol\",\"params\":{\"amount\":\"Amount to stake in wei.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.\",\"params\":{\"amount\":\"Amount of tokens to transfer in wei.\",\"recipient\":\"Recipient of the transferred tokens.\",\"sender\":\"User for which to transfer tokens.\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"SyntheticTokenUpgradeable\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"balanceOf(address)\":{\"notice\":\"Gets the synthetic token balance of the user in wei.\"},\"burn(uint256)\":{\"notice\":\"Burns or destroys a number of held synthetic tokens for an address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"notice\":\"Creates an instance of the contract.\"},\"isLong()\":{\"notice\":\"Whether the token is a long token or short token for its market.\"},\"longShort()\":{\"notice\":\"Address of the LongShort contract, a deployed LongShort.sol\"},\"marketIndex()\":{\"notice\":\"Identifies which market in longShort the token is for.\"},\"mint(address,uint256)\":{\"notice\":\"Mints a number of synthetic tokens for an address.\"},\"stake(uint256)\":{\"notice\":\"Allows users to stake their synthetic tokens to earn Float.\"},\"staker()\":{\"notice\":\"Address of the Staker contract, a deployed Staker.sol\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Overrides the default ERC20 transferFrom.\"}},\"notice\":\"An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SyntheticTokenUpgradeable.sol\":\"SyntheticTokenUpgradeable\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\\n function __ERC20Burnable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC20Burnable_init_unchained();\\n }\\n\\n function __ERC20Burnable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5321bbe08dd6e82e85222024dc300d4959ff8615742ad63135759883a19e02a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation 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 *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal initializer {\\n __Context_init_unchained();\\n __EIP712_init_unchained(name, \\\"1\\\");\\n __ERC20Permit_init_unchained(name);\\n }\\n\\n function __ERC20Permit_init_unchained(string memory name) internal initializer {\\n _PERMIT_TYPEHASH = keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\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 ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xf07c1013d0ecf7a80ff5bf8f59105fc0acc5bf83aa4196b409d9ac3666d37cc6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e321ee7110594e92c1c834d7de2fbdfd01fbed6c06127fe75c5836fe80a24a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x00c96e792d367a436015f12ce2665aa8e2a0d61d2c6045a82cbb37da20e5a042\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x07411372282794f7ecde69a1065e5d20441abe7c9f8861437b4d45c9a4712fa6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal initializer {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal initializer {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x30f3940c119b4d93578bac394f43ee9b0b8465ea1e60b316244183be2983a5ed\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"contracts/SyntheticTokenUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\n/**\\n@title SyntheticTokenUpgradeable\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n@dev Logic for price tracking contained in LongShort.sol. \\n The contract inherits from ERC20PresetMinterPauser.sol\\n*/\\ncontract SyntheticTokenUpgradeable is\\n ISyntheticToken,\\n Initializable,\\n ERC20Upgradeable,\\n ERC20BurnableUpgradeable,\\n AccessControlUpgradeable,\\n ERC20PermitUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n\\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\\n address public longShort;\\n /// @notice Address of the Staker contract, a deployed Staker.sol\\n address public staker;\\n /// @notice Identifies which market in longShort the token is for.\\n uint32 public marketIndex;\\n /// @notice Whether the token is a long token or short token for its market.\\n bool public isLong;\\n\\n /// @notice Creates an instance of the contract.\\n /// @dev Should only be called by TokenFactory.sol for our system.\\n /// @param name The name of the token.\\n /// @param symbol The symbol for the token.\\n /// @param _longShort Address of the core LongShort contract.\\n /// @param _staker Address of the staker contract.\\n /// @param _marketIndex Which market the token is for.\\n /// @param _isLong Whether the token is long or short for its market.\\n function initialize(\\n string memory name,\\n string memory symbol,\\n address _longShort,\\n address _staker,\\n uint32 _marketIndex,\\n bool _isLong\\n ) external initializer {\\n __ERC20_init(name, symbol);\\n __ERC20Burnable_init();\\n __AccessControl_init();\\n __ERC20Permit_init(name);\\n __UUPSUpgradeable_init();\\n\\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n renounceRole(MINTER_ROLE, msg.sender);\\n\\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\\n _setupRole(MINTER_ROLE, _longShort);\\n _setupRole(UPGRADER_ROLE, msg.sender);\\n\\n longShort = _longShort;\\n staker = _staker;\\n marketIndex = _marketIndex;\\n isLong = _isLong;\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by the current admin.\\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\\n\\n // TODO - look at some way of not duplicating implementation logic between this and SyntheticToken.sol\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n /// @dev Core staking logic contained in Staker.sol\\n /// @param amount Amount to stake in wei.\\n function stake(uint256 amount) external override {\\n // NOTE: this is safe, this function will throw \\\"ERC20: transfer\\n // amount exceeds balance\\\" if amount exceeds users balance.\\n super._transfer(msg.sender, address(staker), amount);\\n\\n IStaker(staker).stakeFromUser(msg.sender, amount);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 FUNCTIONS INHERITED BY ERC20PresetMinterPauser \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function totalSupply()\\n public\\n view\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (uint256)\\n {\\n return ERC20Upgradeable.totalSupply();\\n }\\n\\n /** \\n @notice Mints a number of synthetic tokens for an address.\\n @dev Can only be called by addresses with a minter role. \\n This should correspond to the Long Short contract.\\n @param to The address for which to mint the tokens for.\\n @param amount Amount of synthetic tokens to mint in wei.\\n */\\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\\n /// @param amount The amount of tokens to burn in wei.\\n function burn(uint256 amount) public override(ERC20BurnableUpgradeable, ISyntheticToken) {\\n require(msg.sender == longShort, \\\"Only LongShort contract\\\");\\n super._burn(_msgSender(), amount);\\n }\\n\\n /** \\n @notice Overrides the default ERC20 transferFrom.\\n @dev To allow users to avoid approving LongShort when redeeming tokens,\\n longShort has a virtual infinite allowance.\\n @param sender User for which to transfer tokens.\\n @param recipient Recipient of the transferred tokens.\\n @param amount Amount of tokens to transfer in wei.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public override(ERC20Upgradeable, ISyntheticToken) returns (bool) {\\n if (recipient == longShort && msg.sender == longShort) {\\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\\n ERC20Upgradeable._transfer(sender, recipient, amount);\\n return true;\\n } else {\\n return ERC20Upgradeable.transferFrom(sender, recipient, amount);\\n }\\n }\\n\\n function transfer(address recipient, uint256 amount)\\n public\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (bool)\\n {\\n return ERC20Upgradeable.transfer(recipient, amount);\\n }\\n\\n /** \\n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\\n tokens from next price actions before any token transfer occurs.\\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\\n @param sender User for which tokens are to be transferred for.\\n */\\n function _beforeTokenTransfer(\\n address sender,\\n address to,\\n uint256 amount\\n ) internal override {\\n if (sender != longShort) {\\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\\n }\\n super._beforeTokenTransfer(sender, to, amount);\\n }\\n\\n /** \\n @notice Gets the synthetic token balance of the user in wei.\\n @dev To automatically account for next price actions which have been confirmed but not settled,\\n includes any outstanding tokens owed by longShort.\\n @param account The address for which to get the balance of.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return\\n ERC20Upgradeable.balanceOf(account) +\\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\\n account,\\n marketIndex,\\n isLong\\n );\\n }\\n}\\n\",\"keccak256\":\"0x9c9c854d549d24c0e0915a2083fa5da69f3227d98469a0c8516e309b23b361ce\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612b5f806100206000396000f3fe6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "devdoc": { + "details": "Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol", + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.", + "params": { + "account": "The address for which to get the balance of." + } + }, + "burn(uint256)": { + "details": "Modified to only allow Long Short to burn tokens on redeem.", + "params": { + "amount": "The amount of tokens to burn in wei." + } + }, + "burnFrom(address,uint256)": { + "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "details": "Should only be called by TokenFactory.sol for our system.", + "params": { + "_isLong": "Whether the token is long or short for its market.", + "_longShort": "Address of the core LongShort contract.", + "_marketIndex": "Which market the token is for.", + "_staker": "Address of the staker contract.", + "name": "The name of the token.", + "symbol": "The symbol for the token." + } + }, + "mint(address,uint256)": { + "details": "Can only be called by addresses with a minter role. This should correspond to the Long Short contract.", + "params": { + "amount": "Amount of synthetic tokens to mint in wei.", + "to": "The address for which to mint the tokens for." + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "stake(uint256)": { + "details": "Core staking logic contained in Staker.sol", + "params": { + "amount": "Amount to stake in wei." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "transferFrom(address,address,uint256)": { + "details": "To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.", + "params": { + "amount": "Amount of tokens to transfer in wei.", + "recipient": "Recipient of the transferred tokens.", + "sender": "User for which to transfer tokens." + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "SyntheticTokenUpgradeable", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "balanceOf(address)": { + "notice": "Gets the synthetic token balance of the user in wei." + }, + "burn(uint256)": { + "notice": "Burns or destroys a number of held synthetic tokens for an address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "notice": "Creates an instance of the contract." + }, + "isLong()": { + "notice": "Whether the token is a long token or short token for its market." + }, + "longShort()": { + "notice": "Address of the LongShort contract, a deployed LongShort.sol" + }, + "marketIndex()": { + "notice": "Identifies which market in longShort the token is for." + }, + "mint(address,uint256)": { + "notice": "Mints a number of synthetic tokens for an address." + }, + "stake(uint256)": { + "notice": "Allows users to stake their synthetic tokens to earn Float." + }, + "staker()": { + "notice": "Address of the Staker contract, a deployed Staker.sol" + }, + "transferFrom(address,address,uint256)": { + "notice": "Overrides the default ERC20 transferFrom." + } + }, + "notice": "An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1351, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1357, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1359, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 1361, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 1363, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 1904, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 2069, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_roles", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4251, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "251", + "type": "t_bytes32" + }, + { + "astId": 4253, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "252", + "type": "t_bytes32" + }, + { + "astId": 4390, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "253", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2845, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_nonces", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_address,t_struct(Counter)3544_storage)" + }, + { + "astId": 2847, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_PERMIT_TYPEHASH", + "offset": 0, + "slot": "304", + "type": "t_bytes32" + }, + { + "astId": 3015, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "354", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "404", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 16544, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "longShort", + "offset": 0, + "slot": "454", + "type": "t_address" + }, + { + "astId": 16547, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "staker", + "offset": 0, + "slot": "455", + "type": "t_address" + }, + { + "astId": 16550, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "marketIndex", + "offset": 20, + "slot": "455", + "type": "t_uint32" + }, + { + "astId": 16553, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "isLong", + "offset": 24, + "slot": "455", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)3544_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)3544_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3544_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 3543, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/SSMATIC_Proxy.json b/deployments/mumbai/SSMATIC_Proxy.json new file mode 100644 index 0000000..6c1729c --- /dev/null +++ b/deployments/mumbai/SSMATIC_Proxy.json @@ -0,0 +1,192 @@ +{ + "address": "0xcDa695e6c6257d8984D6D9864278A96d81Fdf082", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xcDa695e6c6257d8984D6D9864278A96d81Fdf082", + "transactionIndex": 0, + "gasUsed": "517498", + "logsBloom": "0x00000004000000820000002000000000410000000000000000000000000000000000000000000000000000008000004000048000000000000000000000000000000000000000000000000000004002800000000000000000000100000000000000000000020000000000000000000800000000000000000080010000001000000000000000000000000000000000000000000000000000000000000000000000200000000000000021000000000000000001000000200000001000000000004000008020000000002001000000000000001000000000008100500000000020000080000000000000000000000000000000000000000000000000000000500000", + "blockHash": "0x67f38ef609817548e93b646a2e5e50fad0ec241b7768fd7fb8fc1df6d91aba39", + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869269, + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "address": "0xcDa695e6c6257d8984D6D9864278A96d81Fdf082", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000df0bd3dd3c78993f3e3508bfc44147418a52d525" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x67f38ef609817548e93b646a2e5e50fad0ec241b7768fd7fb8fc1df6d91aba39" + }, + { + "transactionIndex": 0, + "blockNumber": 18869269, + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "address": "0xcDa695e6c6257d8984D6D9864278A96d81Fdf082", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x67f38ef609817548e93b646a2e5e50fad0ec241b7768fd7fb8fc1df6d91aba39" + }, + { + "transactionIndex": 0, + "blockNumber": 18869269, + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "address": "0xcDa695e6c6257d8984D6D9864278A96d81Fdf082", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x67f38ef609817548e93b646a2e5e50fad0ec241b7768fd7fb8fc1df6d91aba39" + }, + { + "transactionIndex": 0, + "blockNumber": 18869269, + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "address": "0xcDa695e6c6257d8984D6D9864278A96d81Fdf082", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x67f38ef609817548e93b646a2e5e50fad0ec241b7768fd7fb8fc1df6d91aba39" + }, + { + "transactionIndex": 0, + "blockNumber": 18869269, + "transactionHash": "0x0a6e13dfdd44c6e882bed12e4367517ab4f730dbc9f4873acf3e66bd5e7c9dae", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000000583fc2d62cc00000000000000000000000000000000000000000000000000078b41a4ea8c5ecd00000000000000000000000000000000000000000000016687ced29a9e3840ad0000000000000000000000000000000000000000000000000785bda8bd2992cd00000000000000000000000000000000000000000000016687d45696cb9b0cad", + "logIndex": 4, + "blockHash": "0x67f38ef609817548e93b646a2e5e50fad0ec241b7768fd7fb8fc1df6d91aba39" + } + ], + "blockNumber": 18869269, + "cumulativeGasUsed": "517498", + "status": 1, + "byzantium": true + }, + "args": [ + "0xDF0BD3DD3C78993f3e3508Bfc44147418a52D525", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000e058c1679d34fd291b06124f16af70e88dfb8422000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018466c6f61742053686f7274204d41544943204d61726b65740000000000000000000000000000000000000000000000000000000000000000000000000000001266c3a2c286c297c3afc2b8c28f4d415449430000000000000000000000000000" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/Staker.json b/deployments/mumbai/Staker.json new file mode 100644 index 0000000..9669517 --- /dev/null +++ b/deployments/mumbai/Staker.json @@ -0,0 +1,1585 @@ +{ + "address": "0xe058C1679D34fd291B06124F16AF70e88dFB8422", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accumulativeFloatIssuanceSnapshotIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accumulativeLong", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accumulativeShort", + "type": "uint256" + } + ], + "name": "AccumulativeIssuancePerStakedSynthSnapshotCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balanceIncentiveExponent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "safeExponentBitShifting", + "type": "uint256" + } + ], + "name": "BalanceIncentiveParamsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountFloatMinted", + "type": "uint256" + } + ], + "name": "FloatMinted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "floatPercentage", + "type": "uint256" + } + ], + "name": "FloatPercentageUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "exitFee_e18", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "period", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balanceIncentiveExponent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "balanceIncentiveEquilibriumOffset", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "safeExponentBitShifting", + "type": "uint256" + } + ], + "name": "MarketAddedToStaker", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "period", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplier", + "type": "uint256" + } + ], + "name": "MarketLaunchIncentiveParametersChanges", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "userShiftIndex", + "type": "uint256" + } + ], + "name": "NextPriceStakeShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastMintIndex", + "type": "uint256" + } + ], + "name": "StakeAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAmountStakedLong", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAmountStakedShort", + "type": "uint256" + } + ], + "name": "StakeShifted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "stakeWithdralFee", + "type": "uint256" + } + ], + "name": "StakeWithdrawalFeeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "StakeWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "floatTreasury", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "floatCapital", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "floatToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "floatPercentage", + "type": "uint256" + } + ], + "name": "StakerV1", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DISCOUNT_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FLOAT_ISSUANCE_FIXED_DECIMAL", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "accumulativeFloatPerSyntheticTokenSnapshots", + "outputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulativeFloatPerSyntheticToken_long", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulativeFloatPerSyntheticToken_short", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "address", + "name": "longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "shortToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "kInitialMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "unstakeFee_e18", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_balanceIncentiveCurve_exponent", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "_balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + } + ], + "name": "addNewStakingFund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "balanceIncentiveCurve_equilibriumOffset", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "balanceIncentiveCurve_exponent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_balanceIncentiveCurve_exponent", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "_balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "_safeExponentBitShifting", + "type": "uint256" + } + ], + "name": "changeBalanceIncentiveParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newFloatPercentage", + "type": "uint256" + } + ], + "name": "changeFloatPercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "newMarketUnstakeFee_e18", + "type": "uint256" + } + ], + "name": "changeUnstakeFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + } + ], + "name": "claimFloatCustom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimFloatCustomFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "floatCapital", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "floatPercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "floatToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "floatTreasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gems", + "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": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatTreasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatCapital", + "type": "address" + }, + { + "internalType": "address", + "name": "_discountSigner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_floatPercentage", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_gems", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "latestRewardIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "marketIndexOfToken", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketLaunchIncentive_multipliers", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketLaunchIncentive_period", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketUnstakeFee_e18", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "marketUpdateIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "longPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shortPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "longValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shortValue", + "type": "uint256" + } + ], + "name": "pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "safeExponentBitShifting", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + } + ], + "name": "shiftTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stakeFromUser", + "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": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "syntheticTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userAmountStaked", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userIndexOfLastClaimedReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_paymentToken_depositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_stakedActionIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNonce", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isWithdrawFromLong", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isWithdrawFromLong", + "type": "bool" + } + ], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isWithdrawFromLong", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "discountWithdrawFee", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "withdrawWithVoucher", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x764332345d7c427ddff739b913930aeb8b8d58ffd61c5450afd041f38b3e7569", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xe058C1679D34fd291B06124F16AF70e88dFB8422", + "transactionIndex": 0, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000410000000000000000000000000000000000000000000000000000000000000000008000002000000000000000002000000000000000000000000000000002800000200000000000040100000000000000000000000000001000000000000000000000000000000080000200000000000000000000000000000000000000000000000000000000000000000000000008200000000000000000000000000000000000000000000000000040000000004000000020000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000400000000000000000000100000", + "blockHash": "0x3ed0bf1d2ab226b2bb73e4f7b8c44ae873a8dd177f3d339234be2af40296819f", + "transactionHash": "0x764332345d7c427ddff739b913930aeb8b8d58ffd61c5450afd041f38b3e7569", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18868832, + "transactionHash": "0x764332345d7c427ddff739b913930aeb8b8d58ffd61c5450afd041f38b3e7569", + "address": "0xe058C1679D34fd291B06124F16AF70e88dFB8422", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000002c3ce1d1debb4771e3a8e824a7830fbfd6ca1b34" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x3ed0bf1d2ab226b2bb73e4f7b8c44ae873a8dd177f3d339234be2af40296819f" + }, + { + "transactionIndex": 0, + "blockNumber": 18868832, + "transactionHash": "0x764332345d7c427ddff739b913930aeb8b8d58ffd61c5450afd041f38b3e7569", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000002a41c347bf60000000000000000000000000000000000000000000000000008875d085901fecd000000000000000000000000000000000000000000000168e574f7c2a556b8a30000000000000000000000000000000000000000000000000884b8ec248608cd000000000000000000000000000000000000000000000168e5779bded9d2aea3", + "logIndex": 1, + "blockHash": "0x3ed0bf1d2ab226b2bb73e4f7b8c44ae873a8dd177f3d339234be2af40296819f" + } + ], + "blockNumber": 18868832, + "cumulativeGasUsed": "247797", + "status": 1, + "byzantium": true + }, + "args": [ + "0x2C3Ce1D1DEbb4771e3A8e824A7830fbFd6Ca1b34", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "implementation": "0x2C3Ce1D1DEbb4771e3A8e824A7830fbFd6Ca1b34", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/Staker_Implementation.json b/deployments/mumbai/Staker_Implementation.json new file mode 100644 index 0000000..2d08bd9 --- /dev/null +++ b/deployments/mumbai/Staker_Implementation.json @@ -0,0 +1,2182 @@ +{ + "address": "0x2C3Ce1D1DEbb4771e3A8e824A7830fbFd6Ca1b34", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accumulativeFloatIssuanceSnapshotIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accumulativeLong", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accumulativeShort", + "type": "uint256" + } + ], + "name": "AccumulativeIssuancePerStakedSynthSnapshotCreated", + "type": "event" + }, + { + "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": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balanceIncentiveExponent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "safeExponentBitShifting", + "type": "uint256" + } + ], + "name": "BalanceIncentiveParamsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountFloatMinted", + "type": "uint256" + } + ], + "name": "FloatMinted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "floatPercentage", + "type": "uint256" + } + ], + "name": "FloatPercentageUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "exitFee_e18", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "period", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balanceIncentiveExponent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "balanceIncentiveEquilibriumOffset", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "safeExponentBitShifting", + "type": "uint256" + } + ], + "name": "MarketAddedToStaker", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "period", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplier", + "type": "uint256" + } + ], + "name": "MarketLaunchIncentiveParametersChanges", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "userShiftIndex", + "type": "uint256" + } + ], + "name": "NextPriceStakeShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastMintIndex", + "type": "uint256" + } + ], + "name": "StakeAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAmountStakedLong", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAmountStakedShort", + "type": "uint256" + } + ], + "name": "StakeShifted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "stakeWithdralFee", + "type": "uint256" + } + ], + "name": "StakeWithdrawalFeeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "StakeWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "floatTreasury", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "floatCapital", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "floatToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "floatPercentage", + "type": "uint256" + } + ], + "name": "StakerV1", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DISCOUNT_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FLOAT_ISSUANCE_FIXED_DECIMAL", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "accumulativeFloatPerSyntheticTokenSnapshots", + "outputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulativeFloatPerSyntheticToken_long", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulativeFloatPerSyntheticToken_short", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "address", + "name": "longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "shortToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "kInitialMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "unstakeFee_e18", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_balanceIncentiveCurve_exponent", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "_balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + } + ], + "name": "addNewStakingFund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "balanceIncentiveCurve_equilibriumOffset", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "balanceIncentiveCurve_exponent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_balanceIncentiveCurve_exponent", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "_balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "_safeExponentBitShifting", + "type": "uint256" + } + ], + "name": "changeBalanceIncentiveParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newFloatPercentage", + "type": "uint256" + } + ], + "name": "changeFloatPercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "newMarketUnstakeFee_e18", + "type": "uint256" + } + ], + "name": "changeUnstakeFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + } + ], + "name": "claimFloatCustom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimFloatCustomFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "floatCapital", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "floatPercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "floatToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "floatTreasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gems", + "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": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatTreasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatCapital", + "type": "address" + }, + { + "internalType": "address", + "name": "_discountSigner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_floatPercentage", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_gems", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "latestRewardIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "marketIndexOfToken", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketLaunchIncentive_multipliers", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketLaunchIncentive_period", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketUnstakeFee_e18", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "marketUpdateIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "longPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shortPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "longValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shortValue", + "type": "uint256" + } + ], + "name": "pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "safeExponentBitShifting", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + } + ], + "name": "shiftTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stakeFromUser", + "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": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "syntheticTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userAmountStaked", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userIndexOfLastClaimedReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_paymentToken_depositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_stakedActionIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNonce", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isWithdrawFromLong", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isWithdrawFromLong", + "type": "bool" + } + ], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isWithdrawFromLong", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "discountWithdrawFee", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "withdrawWithVoucher", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x8fd0f8b7ac973e2784fca9c54fefecde0e78606fb8081081d9bae00ebec6a69d", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x2C3Ce1D1DEbb4771e3A8e824A7830fbFd6Ca1b34", + "transactionIndex": 1, + "gasUsed": "3968596", + "logsBloom": "0x00000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x008dc740fdcdd65af29e71bc121a91a2db750455aeddfbf509ae9d0aa58c0cba", + "transactionHash": "0x8fd0f8b7ac973e2784fca9c54fefecde0e78606fb8081081d9bae00ebec6a69d", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 18868829, + "transactionHash": "0x8fd0f8b7ac973e2784fca9c54fefecde0e78606fb8081081d9bae00ebec6a69d", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x000000000000000000000000000000000000000000000000002a4c404882d80000000000000000000000000000000000000000000000000008b1a948a184d6cd000000000000000000000000000000000000000000000168e53f3de49f59dea300000000000000000000000000000000000000000000000008875d085901fecd000000000000000000000000000000000000000000000168e5698a24e7dcb6a3", + "logIndex": 2, + "blockHash": "0x008dc740fdcdd65af29e71bc121a91a2db750455aeddfbf509ae9d0aa58c0cba" + } + ], + "blockNumber": 18868829, + "cumulativeGasUsed": "4196854", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accumulativeFloatIssuanceSnapshotIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accumulativeLong\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accumulativeShort\",\"type\":\"uint256\"}],\"name\":\"AccumulativeIssuancePerStakedSynthSnapshotCreated\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceIncentiveExponent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"balanceIncentiveCurve_equilibriumOffset\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"safeExponentBitShifting\",\"type\":\"uint256\"}],\"name\":\"BalanceIncentiveParamsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountFloatMinted\",\"type\":\"uint256\"}],\"name\":\"FloatMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatPercentage\",\"type\":\"uint256\"}],\"name\":\"FloatPercentageUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"exitFee_e18\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceIncentiveExponent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"balanceIncentiveEquilibriumOffset\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"safeExponentBitShifting\",\"type\":\"uint256\"}],\"name\":\"MarketAddedToStaker\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplier\",\"type\":\"uint256\"}],\"name\":\"MarketLaunchIncentiveParametersChanges\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isShiftFromLong\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"userShiftIndex\",\"type\":\"uint256\"}],\"name\":\"NextPriceStakeShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastMintIndex\",\"type\":\"uint256\"}],\"name\":\"StakeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAmountStakedLong\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAmountStakedShort\",\"type\":\"uint256\"}],\"name\":\"StakeShifted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"stakeWithdralFee\",\"type\":\"uint256\"}],\"name\":\"StakeWithdrawalFeeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"StakeWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"floatTreasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"floatCapital\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"floatToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatPercentage\",\"type\":\"uint256\"}],\"name\":\"StakerV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DISCOUNT_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FLOAT_ISSUANCE_FIXED_DECIMAL\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"accumulativeFloatPerSyntheticTokenSnapshots\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accumulativeFloatPerSyntheticToken_long\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accumulativeFloatPerSyntheticToken_short\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"longToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"shortToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"kInitialMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeFee_e18\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_balanceIncentiveCurve_exponent\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"_balanceIncentiveCurve_equilibriumOffset\",\"type\":\"int256\"}],\"name\":\"addNewStakingFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"balanceIncentiveCurve_equilibriumOffset\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"balanceIncentiveCurve_exponent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_balanceIncentiveCurve_exponent\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"_balanceIncentiveCurve_equilibriumOffset\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"_safeExponentBitShifting\",\"type\":\"uint256\"}],\"name\":\"changeBalanceIncentiveParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newFloatPercentage\",\"type\":\"uint256\"}],\"name\":\"changeFloatPercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"newMarketUnstakeFee_e18\",\"type\":\"uint256\"}],\"name\":\"changeUnstakeFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"marketIndexes\",\"type\":\"uint32[]\"}],\"name\":\"claimFloatCustom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"marketIndexes\",\"type\":\"uint32[]\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"claimFloatCustomFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatCapital\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatTreasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gems\",\"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\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_floatToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_floatTreasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_floatCapital\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_discountSigner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_floatPercentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_gems\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"latestRewardIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"marketIndexOfToken\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketLaunchIncentive_multipliers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketLaunchIncentive_period\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketUnstakeFee_e18\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"marketUpdateIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"longPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shortPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"longValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shortValue\",\"type\":\"uint256\"}],\"name\":\"pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"safeExponentBitShifting\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountSyntheticTokensToShift\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isShiftFromLong\",\"type\":\"bool\"}],\"name\":\"shiftTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stakeFromUser\",\"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\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"syntheticTokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userAmountStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userIndexOfLastClaimedReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_paymentToken_depositAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_stakedActionIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNonce\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isWithdrawFromLong\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isWithdrawFromLong\",\"type\":\"bool\"}],\"name\":\"withdrawAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isWithdrawFromLong\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"withdrawAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"discountWithdrawFee\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"withdrawWithVoucher\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addNewStakingFund(uint32,address,address,uint256,uint256,uint256,uint256,int256)\":{\"params\":{\"_balanceIncentiveCurve_equilibriumOffset\":\"Offset for balance curve (see _calculateFloatPerSecond)\",\"_balanceIncentiveCurve_exponent\":\"Exponent for balance curve (see _calculateFloatPerSecond)\",\"kInitialMultiplier\":\"Initial boost on float generation for the market.\",\"kPeriod\":\"Period which the boost should last.\",\"longToken\":\"Address of the long token for the market.\",\"marketIndex\":\"Identifies the market.\",\"shortToken\":\"Address of the short token for the market.\",\"unstakeFee_e18\":\"Percentage of tokens that are levied on unstaking in base 1e18.\"}},\"changeBalanceIncentiveParameters(uint32,uint256,int256,uint256)\":{\"params\":{\"_balanceIncentiveCurve_equilibriumOffset\":\"The new offset.\",\"_balanceIncentiveCurve_exponent\":\"The new exponent for the curve.\",\"_safeExponentBitShifting\":\"The new bitshifting applied to the curve.\",\"marketIndex\":\"Identifies the market.\"}},\"changeFloatPercentage(uint256)\":{\"params\":{\"newFloatPercentage\":\"The new float percentage in base 1e18.\"}},\"changeUnstakeFee(uint32,uint256)\":{\"params\":{\"marketIndex\":\"Identifies the market.\",\"newMarketUnstakeFee_e18\":\"The new unstake fee.\"}},\"claimFloatCustom(uint32[])\":{\"params\":{\"marketIndexes\":\"Identifiers for the markets for which to mint float.\"}},\"claimFloatCustomFor(uint32[],address)\":{\"params\":{\"marketIndexes\":\"Identifiers for the markets for which to mint float.\",\"user\":\"The address of the user.\"}},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address,address,address,address,uint256,address)\":{\"details\":\"Calls OpenZeppelin's initializer modifier.\",\"params\":{\"_admin\":\"Address of the admin role.\",\"_floatCapital\":\"Address of the contract which earns a fixed percentage of Float.\",\"_floatPercentage\":\"Determines the float percentage that gets minted for Float Capital, base 1e18.\",\"_floatToken\":\"Address of the Float token earned by staking.\",\"_floatTreasury\":\"Address of the treasury contract for managing fees.\",\"_longShort\":\"Address of the LongShort contract, a deployed LongShort.sol\"}},\"pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(uint32,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"longPrice\":\"The price of the long token as defined in LongShort.sol\",\"longValue\":\"The value locked in the long side of the market.\",\"marketIndex\":\"An identifier for the market.\",\"marketUpdateIndex\":\"Current update index in the LongShort contract for this market.\",\"shortPrice\":\"The price of the short token as defined in LongShort.sol\",\"shortValue\":\"The value locked in the short side of the market.\"}},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"shiftTokens(uint256,uint32,bool)\":{\"params\":{\"amountSyntheticTokensToShift\":\"Amount of tokens to shift.\",\"isShiftFromLong\":\"Whether the shift is from long to short or short to long.\",\"marketIndex\":\"Identifier for the market.\"}},\"stakeFromUser(address,uint256)\":{\"params\":{\"amount\":\"Amount to stake.\",\"from\":\"Address to stake for.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"withdraw(uint32,bool,uint256)\":{\"params\":{\"amount\":\"Amount to withdraw.\",\"isWithdrawFromLong\":\"is synthetic token to be withdrawn long or short\",\"marketIndex\":\"Market index of staked synthetic token\"}},\"withdrawAll(uint32,bool)\":{\"params\":{\"isWithdrawFromLong\":\"is synthetic token to be withdrawn long or short\",\"marketIndex\":\"Market index of staked synthetic token\"}}},\"stateVariables\":{\"userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom\":{\"details\":\"marketIndex => usersAddress => amountUserRequestedToShiftAwayFromLongOnNextUpdate\"},\"userNextPrice_paymentToken_depositAmount\":{\"details\":\"marketIndex => usersAddress => stakedActionIndex\"},\"userNextPrice_stakedActionIndex\":{\"details\":\"marketIndex => usersAddress => stakedActionIndex\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addNewStakingFund(uint32,address,address,uint256,uint256,uint256,uint256,int256)\":{\"notice\":\"Sets this contract to track staking for a market in LongShort.sol\"},\"changeBalanceIncentiveParameters(uint32,uint256,int256,uint256)\":{\"notice\":\"Changes the balance incentive exponent for a market\"},\"changeFloatPercentage(uint256)\":{\"notice\":\"Changes percentage of float that is minted for float capital.\"},\"changeUnstakeFee(uint32,uint256)\":{\"notice\":\"Changes unstake fee for a market\"},\"claimFloatCustom(uint32[])\":{\"notice\":\"Mints outstanding float for msg.sender.\"},\"claimFloatCustomFor(uint32[],address)\":{\"notice\":\"Mints outstanding float on behalf of another user.\"},\"initialize(address,address,address,address,address,address,uint256,address)\":{\"notice\":\"Initializes the contract.\"},\"pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(uint32,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Adds new accumulativeIssuancePerStakedSynthSnapshots for the given long/short tokens. Called by the ILongShort contract whenever there is a state change for a market.\"},\"shiftTokens(uint256,uint32,bool)\":{\"notice\":\"Allows users to shift their staked tokens from one side of the market to the other at the next price.\"},\"stakeFromUser(address,uint256)\":{\"notice\":\"A user with synthetic tokens stakes by calling stake on the token contract which calls this function. We need to first update the state of the LongShort contract for this market before staking to correctly calculate user rewards.\"},\"withdraw(uint32,bool,uint256)\":{\"notice\":\"Withdraw function. Allows users to unstake.\"},\"withdrawAll(uint32,bool)\":{\"notice\":\"Allows users to withdraw their entire stake for a token.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Staker.sol\":\"Staker\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n __AccessControlEnumerable_init_unchained();\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {grantRole} to track enumerable memberships\\n */\\n function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\\n super.grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {revokeRole} to track enumerable memberships\\n */\\n function revokeRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\\n super.revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev Overload {renounceRole} to track enumerable memberships\\n */\\n function renounceRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\\n super.renounceRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev Overload {_setupRole} to track enumerable memberships\\n */\\n function _setupRole(bytes32 role, address account) internal virtual override {\\n super._setupRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2d8b1825d587f3384d6d87655f3cb66f0d71fe8dda7d98f2f9267a4bb842927d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf87bd7a150c81aad67bb354413fe55cb005e922c6e48d3580a63e32efa913c74\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x742c0fbab73bf595ca40025f6e81cb48dbd5e133950717f7befd062a925c0148\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\\n function __ERC20Burnable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC20Burnable_init_unchained();\\n }\\n\\n function __ERC20Burnable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5321bbe08dd6e82e85222024dc300d4959ff8615742ad63135759883a19e02a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../security/PausableUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev ERC20 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n */\\nabstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable {\\n function __ERC20Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n __ERC20Pausable_init_unchained();\\n }\\n\\n function __ERC20Pausable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev See {ERC20-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n require(!paused(), \\\"ERC20Pausable: token transfer while paused\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x84f8ee06b780f3294755a13a74e7d4f11599b2c42a09d920f0a191a5f3c6f2dc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"../extensions/ERC20PausableUpgradeable.sol\\\";\\nimport \\\"../../../access/AccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev {ERC20} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n */\\ncontract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlEnumerableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable {\\n function initialize(string memory name, string memory symbol) public virtual initializer {\\n __ERC20PresetMinterPauser_init(name, symbol);\\n }\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\n * account that deploys the contract.\\n *\\n * See {ERC20-constructor}.\\n */\\n function __ERC20PresetMinterPauser_init(string memory name, string memory symbol) internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n __AccessControlEnumerable_init_unchained();\\n __ERC20_init_unchained(name, symbol);\\n __ERC20Burnable_init_unchained();\\n __Pausable_init_unchained();\\n __ERC20Pausable_init_unchained();\\n __ERC20PresetMinterPauser_init_unchained(name, symbol);\\n }\\n\\n function __ERC20PresetMinterPauser_init_unchained(string memory name, string memory symbol) internal initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n }\\n\\n /**\\n * @dev Creates `amount` new tokens for `to`.\\n *\\n * See {ERC20-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(address to, uint256 amount) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC20PresetMinterPauser: must have minter role to mint\\\");\\n _mint(to, amount);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC20Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC20PresetMinterPauser: must have pauser role to pause\\\");\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC20Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC20PresetMinterPauser: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override(ERC20Upgradeable, ERC20PausableUpgradeable) {\\n super._beforeTokenTransfer(from, to, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xdf3ba47b3559c6760157d0ec93be6d3aec6b5eb785b85acb20ac2bb0cb003b74\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9dc1ad66ada6a503bef1ffde62ac688c58eac660fe50c054f6e49e3b27ae295d\",\"license\":\"MIT\"},\"contracts/GEMS.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\n/** Contract giving user GEMS*/\\n\\n// Inspired by https://github.com/andrecronje/rarity/blob/main/rarity.sol\\n\\n/** @title GEMS */\\ncontract GEMS is AccessControlledAndUpgradeable {\\n bytes32 public constant GEM_ROLE = keccak256(\\\"GEM_ROLE\\\");\\n\\n uint256 constant gems_per_day = 250e18;\\n uint256 constant DAY = 1 days;\\n\\n mapping(address => uint256) public gems;\\n mapping(address => uint256) public streak;\\n mapping(address => uint256) public lastAction;\\n\\n event GemsCollected(address user, uint256 gems, uint256 streak);\\n\\n function initialize(\\n address _admin,\\n address _longShort,\\n address _staker\\n ) external initializer {\\n _AccessControlledAndUpgradeable_init(_admin);\\n _setupRole(GEM_ROLE, _longShort);\\n _setupRole(GEM_ROLE, _staker);\\n }\\n\\n // Say gm and get gems by performing an action in LongShort or Staker\\n function gm(address user) external {\\n if (hasRole(GEM_ROLE, msg.sender)) {\\n uint256 usersLastAction = lastAction[user];\\n uint256 blocktimestamp = block.timestamp;\\n\\n if (blocktimestamp - usersLastAction >= DAY) {\\n // Award gems\\n gems[user] += gems_per_day;\\n\\n // Increment streak\\n if (blocktimestamp - usersLastAction < 2 * DAY) {\\n streak[user] += 1;\\n } else {\\n streak[user] = 1; // reset streak to 1\\n }\\n\\n lastAction[user] = blocktimestamp;\\n }\\n emit GemsCollected(user, gems[user], streak[user]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0335305655aa936242355a082737ca1d3e819d38601a0bf3b1672158591e2abd\",\"license\":\"BUSL-1.1\"},\"contracts/Staker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\\\";\\n\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\nimport \\\"./interfaces/IFloatToken.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\nimport \\\"./GEMS.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\ncontract Staker is IStaker, AccessControlledAndUpgradeable {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 VARIABLES \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n bytes32 public constant DISCOUNT_ROLE = keccak256(\\\"DISCOUNT_ROLE\\\");\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Fixed-precision constants \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n uint256 public constant FLOAT_ISSUANCE_FIXED_DECIMAL = 3e44;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Global state \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n address public floatCapital;\\n address public floatTreasury;\\n uint256 public floatPercentage;\\n\\n address public longShort;\\n address public floatToken;\\n\\n address public gems;\\n uint256[45] private __globalStateGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Market specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n mapping(uint32 => uint256) public marketLaunchIncentive_period; // seconds\\n mapping(uint32 => uint256) public marketLaunchIncentive_multipliers; // e18 scale\\n mapping(uint32 => uint256) public marketUnstakeFee_e18;\\n mapping(uint32 => uint256) public balanceIncentiveCurve_exponent;\\n mapping(uint32 => int256) public balanceIncentiveCurve_equilibriumOffset;\\n mapping(uint32 => uint256) public safeExponentBitShifting;\\n\\n mapping(uint32 => mapping(bool => address)) public syntheticTokens;\\n uint256[45] private __marketStateGap;\\n\\n mapping(address => uint32) public marketIndexOfToken;\\n mapping(address => uint32) public userNonce;\\n uint256[45] private __synthStateGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Reward specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n mapping(uint32 => uint256) public latestRewardIndex; // This is synced to be the same as LongShort\\n mapping(uint32 => mapping(uint256 => AccumulativeIssuancePerStakedSynthSnapshot))\\n public accumulativeFloatPerSyntheticTokenSnapshots;\\n struct AccumulativeIssuancePerStakedSynthSnapshot {\\n uint256 timestamp;\\n uint256 accumulativeFloatPerSyntheticToken_long;\\n uint256 accumulativeFloatPerSyntheticToken_short;\\n }\\n\\n uint256[45] private __rewardStateGap;\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 User specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n mapping(uint32 => mapping(address => uint256)) public userIndexOfLastClaimedReward;\\n mapping(address => mapping(address => uint256)) public override userAmountStaked;\\n uint256[45] private __userStateGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Next price action management specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n /// @dev marketIndex => usersAddress => stakedActionIndex\\n mapping(uint32 => mapping(address => uint256)) public userNextPrice_stakedActionIndex;\\n\\n /// @dev marketIndex => usersAddress => amountUserRequestedToShiftAwayFromLongOnNextUpdate\\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\\n public userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom;\\n\\n /// @dev marketIndex => usersAddress => stakedActionIndex\\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\\n public userNextPrice_paymentToken_depositAmount;\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MODIFIERS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function onlyAdminModifierLogic() internal virtual {\\n _checkRole(ADMIN_ROLE, msg.sender);\\n }\\n\\n modifier onlyAdmin() {\\n onlyAdminModifierLogic();\\n _;\\n }\\n\\n function onlyValidSyntheticModifierLogic(address _synth) internal virtual {\\n require(marketIndexOfToken[_synth] != 0, \\\"not valid synth\\\");\\n }\\n\\n modifier onlyValidSynthetic(address _synth) {\\n onlyValidSyntheticModifierLogic(_synth);\\n _;\\n }\\n\\n function onlyLongShortModifierLogic() internal virtual {\\n require(msg.sender == address(longShort), \\\"not LongShort\\\");\\n }\\n\\n modifier onlyLongShort() {\\n onlyLongShortModifierLogic();\\n _;\\n }\\n\\n function _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\\n uint32 marketIndex,\\n address user\\n ) internal virtual {\\n if (\\n userNextPrice_stakedActionIndex[marketIndex][msg.sender] != 0 &&\\n userNextPrice_stakedActionIndex[marketIndex][msg.sender] <= latestRewardIndex[marketIndex]\\n ) {\\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender);\\n }\\n }\\n\\n modifier updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\\n uint32 marketIndex,\\n address user\\n ) {\\n _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\\n _;\\n }\\n\\n modifier gemCollecting(address user) {\\n GEMS(gems).gm(user);\\n _;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 CONTRACT SET-UP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Initializes the contract.\\n @dev Calls OpenZeppelin's initializer modifier.\\n @param _admin Address of the admin role.\\n @param _longShort Address of the LongShort contract, a deployed LongShort.sol\\n @param _floatToken Address of the Float token earned by staking.\\n @param _floatTreasury Address of the treasury contract for managing fees.\\n @param _floatCapital Address of the contract which earns a fixed percentage of Float.\\n @param _floatPercentage Determines the float percentage that gets minted for Float Capital, base 1e18.\\n */\\n function initialize(\\n address _admin,\\n address _longShort,\\n address _floatToken,\\n address _floatTreasury,\\n address _floatCapital,\\n address _discountSigner,\\n uint256 _floatPercentage,\\n address _gems\\n ) external virtual initializer {\\n require(\\n _admin != address(0) &&\\n _longShort != address(0) &&\\n _floatToken != address(0) &&\\n _floatTreasury != address(0) &&\\n _floatCapital != address(0) &&\\n _gems != address(0) &&\\n _floatPercentage != 0\\n );\\n\\n floatCapital = _floatCapital;\\n floatTreasury = _floatTreasury;\\n longShort = _longShort;\\n floatToken = _floatToken;\\n gems = _gems;\\n\\n _AccessControlledAndUpgradeable_init(_admin);\\n _setupRole(DISCOUNT_ROLE, _discountSigner);\\n\\n _changeFloatPercentage(_floatPercentage);\\n\\n emit StakerV1(_admin, _floatTreasury, _floatCapital, _floatToken, _floatPercentage);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 ADMIN \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @dev Logic for changeFloatPercentage\\n function _changeFloatPercentage(uint256 newFloatPercentage) internal virtual {\\n require(newFloatPercentage <= 1e18 && newFloatPercentage > 0); // less than or equal to 100% and greater than 0%\\n floatPercentage = newFloatPercentage;\\n }\\n\\n /**\\n @notice Changes percentage of float that is minted for float capital.\\n @param newFloatPercentage The new float percentage in base 1e18.\\n */\\n function changeFloatPercentage(uint256 newFloatPercentage) external onlyAdmin {\\n _changeFloatPercentage(newFloatPercentage);\\n emit FloatPercentageUpdated(newFloatPercentage);\\n }\\n\\n /// @dev Logic for changeUnstakeFee\\n function _changeUnstakeFee(uint32 marketIndex, uint256 newMarketUnstakeFee_e18) internal virtual {\\n require(newMarketUnstakeFee_e18 <= 5e16); // Explicitly stating 5% fee as the max fee possible.\\n marketUnstakeFee_e18[marketIndex] = newMarketUnstakeFee_e18;\\n }\\n\\n /**\\n @notice Changes unstake fee for a market\\n @param marketIndex Identifies the market.\\n @param newMarketUnstakeFee_e18 The new unstake fee.\\n */\\n function changeUnstakeFee(uint32 marketIndex, uint256 newMarketUnstakeFee_e18)\\n external\\n onlyAdmin\\n {\\n _changeUnstakeFee(marketIndex, newMarketUnstakeFee_e18);\\n emit StakeWithdrawalFeeUpdated(marketIndex, newMarketUnstakeFee_e18);\\n }\\n\\n /// @dev Logic for changeBalanceIncentiveExponent\\n function _changeBalanceIncentiveParameters(\\n uint32 marketIndex,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset,\\n uint256 _safeExponentBitShifting\\n ) internal virtual {\\n // Unreasonable that we would ever shift this more than 90% either way\\n require(\\n _balanceIncentiveCurve_equilibriumOffset > -9e17 &&\\n _balanceIncentiveCurve_equilibriumOffset < 9e17,\\n \\\"balanceIncentiveCurve_equilibriumOffset out of bounds\\\"\\n );\\n require(_balanceIncentiveCurve_exponent > 0, \\\"balanceIncentiveCurve_exponent out of bounds\\\");\\n require(_safeExponentBitShifting < 100, \\\"safeExponentBitShifting out of bounds\\\");\\n\\n uint256 totalLocked = ILongShort(longShort).marketSideValueInPaymentToken(marketIndex, true) +\\n ILongShort(longShort).marketSideValueInPaymentToken(marketIndex, false);\\n\\n // SafeMATH will revert here if this value is too big.\\n (((totalLocked * 500) >> _safeExponentBitShifting)**_balanceIncentiveCurve_exponent);\\n // Required to ensure at least 3 digits of precision.\\n require(\\n totalLocked >> _safeExponentBitShifting > 100,\\n \\\"bit shifting too lange for total locked\\\"\\n );\\n\\n balanceIncentiveCurve_exponent[marketIndex] = _balanceIncentiveCurve_exponent;\\n balanceIncentiveCurve_equilibriumOffset[marketIndex] = _balanceIncentiveCurve_equilibriumOffset;\\n safeExponentBitShifting[marketIndex] = _safeExponentBitShifting;\\n }\\n\\n /**\\n @notice Changes the balance incentive exponent for a market\\n @param marketIndex Identifies the market.\\n @param _balanceIncentiveCurve_exponent The new exponent for the curve.\\n @param _balanceIncentiveCurve_equilibriumOffset The new offset.\\n @param _safeExponentBitShifting The new bitshifting applied to the curve.\\n */\\n function changeBalanceIncentiveParameters(\\n uint32 marketIndex,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset,\\n uint256 _safeExponentBitShifting\\n ) external onlyAdmin {\\n _changeBalanceIncentiveParameters(\\n marketIndex,\\n _balanceIncentiveCurve_exponent,\\n _balanceIncentiveCurve_equilibriumOffset,\\n _safeExponentBitShifting\\n );\\n\\n emit BalanceIncentiveParamsUpdated(\\n marketIndex,\\n _balanceIncentiveCurve_exponent,\\n _balanceIncentiveCurve_equilibriumOffset,\\n _safeExponentBitShifting\\n );\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 STAKING SETUP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Sets this contract to track staking for a market in LongShort.sol\\n @param marketIndex Identifies the market.\\n @param longToken Address of the long token for the market.\\n @param shortToken Address of the short token for the market.\\n @param kInitialMultiplier Initial boost on float generation for the market.\\n @param kPeriod Period which the boost should last.\\n @param unstakeFee_e18 Percentage of tokens that are levied on unstaking in base 1e18.\\n @param _balanceIncentiveCurve_exponent Exponent for balance curve (see _calculateFloatPerSecond)\\n @param _balanceIncentiveCurve_equilibriumOffset Offset for balance curve (see _calculateFloatPerSecond)\\n */\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longToken,\\n address shortToken,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external override onlyLongShort {\\n require(kInitialMultiplier >= 1e18, \\\"kInitialMultiplier must be >= 1e18\\\");\\n\\n // a safe initial default value\\n uint256 initialSafeExponentBitShifting = 50;\\n\\n marketIndexOfToken[longToken] = marketIndex;\\n marketIndexOfToken[shortToken] = marketIndex;\\n\\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0].timestamp = block.timestamp;\\n\\n syntheticTokens[marketIndex][true] = longToken;\\n syntheticTokens[marketIndex][false] = shortToken;\\n _changeBalanceIncentiveParameters(\\n marketIndex,\\n _balanceIncentiveCurve_exponent,\\n _balanceIncentiveCurve_equilibriumOffset,\\n initialSafeExponentBitShifting\\n );\\n\\n marketLaunchIncentive_period[marketIndex] = kPeriod;\\n marketLaunchIncentive_multipliers[marketIndex] = kInitialMultiplier;\\n\\n _changeUnstakeFee(marketIndex, unstakeFee_e18);\\n\\n emit MarketAddedToStaker(\\n marketIndex,\\n unstakeFee_e18,\\n kPeriod,\\n kInitialMultiplier,\\n _balanceIncentiveCurve_exponent,\\n _balanceIncentiveCurve_equilibriumOffset,\\n initialSafeExponentBitShifting\\n );\\n\\n emit AccumulativeIssuancePerStakedSynthSnapshotCreated(marketIndex, 0, 0, 0);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 GLOBAL FLT REWARD ACCUMULATION CALCULATION AND TRACKING FUNCTIONS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Returns the K factor parameters for the given market with sensible\\n defaults if they haven't been set yet.\\n @param marketIndex The market to change the parameters for.\\n @return period The period for which the k factor applies for in seconds.\\n @return multiplier The multiplier on Float generation in this period.\\n */\\n function _getMarketLaunchIncentiveParameters(uint32 marketIndex)\\n internal\\n view\\n virtual\\n returns (uint256 period, uint256 multiplier)\\n {\\n period = marketLaunchIncentive_period[marketIndex]; // seconds TODO change name to contain seconds\\n multiplier = marketLaunchIncentive_multipliers[marketIndex]; // 1e18 TODO change name to contain E18\\n\\n if (multiplier < 1e18) {\\n multiplier = 1e18; // multiplier of 1 by default\\n }\\n }\\n\\n /**\\n @notice Returns the extent to which a markets float generation should be adjusted\\n based on the market's launch incentive parameters. Should start at multiplier\\n then linearly change to 1e18 over time.\\n @param marketIndex Identifies the market.\\n @return k The calculated modifier for float generation.\\n */\\n function _getKValue(uint32 marketIndex) internal view virtual returns (uint256) {\\n // Parameters controlling the float issuance multiplier.\\n (uint256 kPeriod, uint256 kInitialMultiplier) = _getMarketLaunchIncentiveParameters(\\n marketIndex\\n );\\n\\n // Sanity check - under normal circumstances, the multipliers should\\n // *never* be set to a value < 1e18, as there are guards against this.\\n assert(kInitialMultiplier >= 1e18);\\n\\n uint256 initialTimestamp = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0]\\n .timestamp;\\n\\n if (block.timestamp - initialTimestamp < kPeriod) {\\n return\\n kInitialMultiplier -\\n (((kInitialMultiplier - 1e18) * (block.timestamp - initialTimestamp)) / kPeriod);\\n } else {\\n return 1e18;\\n }\\n }\\n\\n /*\\n @notice Computes the number of float tokens a user earns per second for\\n every long/short synthetic token they've staked. The returned value has\\n a fixed decimal scale of 1e42 (!!!) for numerical stability. The return\\n values are float per second per synthetic token (hence the requirement\\n to multiply by price)\\n @dev to see below math in latex form see:\\n https://ipfs.io/ipfs/QmRWbr8P1F588XqRTzm7wCsRPu8DcDVPWGriBach4f22Fq/staker-fps.pdf\\n to interact with the equations see https://www.desmos.com/calculator/optkaxyihr\\n @param marketIndex The market referred to.\\n @param longPrice Price of the synthetic long token in units of payment token\\n @param shortPrice Price of the synthetic short token in units of payment token\\n @param longValue Amount of payment token in the long side of the market\\n @param shortValue Amount of payment token in the short side of the market\\n @return longFloatPerSecond Float token per second per long synthetic token\\n @return shortFloatPerSecond Float token per second per short synthetic token\\n */\\n function _calculateFloatPerSecond(\\n uint32 marketIndex,\\n uint256 longPrice,\\n uint256 shortPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) internal view virtual returns (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) {\\n // A float issuance multiplier that starts high and decreases linearly\\n // over time to a value of 1. This incentivises users to stake early.\\n uint256 k = _getKValue(marketIndex);\\n\\n uint256 totalLocked = (longValue + shortValue);\\n\\n // we need to scale this number by the totalLocked so that the offset remains consistent accross market size\\n\\n int256 equilibriumOffsetMarketScaled = (balanceIncentiveCurve_equilibriumOffset[marketIndex] *\\n int256(totalLocked)) / 2e18;\\n\\n uint256 safetyBitShifting = safeExponentBitShifting[marketIndex];\\n\\n // Float is scaled by the percentage of the total market value held in\\n // the opposite position. This incentivises users to stake on the\\n // weaker position.\\n if (int256(shortValue) - (2 * equilibriumOffsetMarketScaled) < int256(longValue)) {\\n if (equilibriumOffsetMarketScaled >= int256(shortValue)) {\\n // edge case: imbalanced far past the equilibrium offset - full rewards go to short token\\n // extremely unlikely to happen in practice\\n return (0, k * shortPrice);\\n }\\n\\n uint256 numerator = (uint256(int256(shortValue) - equilibriumOffsetMarketScaled) >>\\n (safetyBitShifting - 1))**balanceIncentiveCurve_exponent[marketIndex];\\n\\n uint256 denominator = ((totalLocked >> safetyBitShifting) **\\n balanceIncentiveCurve_exponent[marketIndex]);\\n\\n // NOTE: `x * 5e17` == `(x * 1e18) / 2`\\n uint256 longRewardUnscaled = (numerator * 5e17) / denominator;\\n uint256 shortRewardUnscaled = 1e18 - longRewardUnscaled;\\n\\n return (\\n (longRewardUnscaled * k * longPrice) / 1e18,\\n (shortRewardUnscaled * k * shortPrice) / 1e18\\n );\\n } else {\\n if (-equilibriumOffsetMarketScaled >= int256(longValue)) {\\n // edge case: imbalanced far past the equilibrium offset - full rewards go to long token\\n // extremely unlikely to happen in practice\\n return (k * longPrice, 0);\\n }\\n\\n uint256 numerator = (uint256(int256(longValue) + equilibriumOffsetMarketScaled) >>\\n (safetyBitShifting - 1))**balanceIncentiveCurve_exponent[marketIndex];\\n\\n uint256 denominator = ((totalLocked >> safetyBitShifting) **\\n balanceIncentiveCurve_exponent[marketIndex]);\\n\\n // NOTE: `x * 5e17` == `(x * 1e18) / 2`\\n uint256 shortRewardUnscaled = (numerator * 5e17) / denominator;\\n uint256 longRewardUnscaled = 1e18 - shortRewardUnscaled;\\n\\n return (\\n (longRewardUnscaled * k * longPrice) / 1e18,\\n (shortRewardUnscaled * k * shortPrice) / 1e18\\n );\\n }\\n }\\n\\n /**\\n @notice Computes the time since last accumulativeIssuancePerStakedSynthSnapshot for the given market in seconds.\\n @param marketIndex The market referred to.\\n @return timeDelta The time difference in seconds\\n */\\n function _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\\n uint32 marketIndex,\\n uint256 previousMarketUpdateIndex\\n ) internal view virtual returns (uint256 timeDelta) {\\n return\\n block.timestamp -\\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex].timestamp;\\n }\\n\\n /**\\n @notice Computes new cumulative sum of 'r' value since last accumulativeIssuancePerStakedSynthSnapshot. We use\\n cumulative 'r' value to avoid looping during issuance. Note that the\\n cumulative sum is kept in 1e42 scale (!!!) to avoid numerical issues.\\n @param shortValue The value locked in the short side of the market.\\n @param longValue The value locked in the long side of the market.\\n @param shortPrice The price of the short token as defined in LongShort.sol\\n @param longPrice The price of the long token as defined in LongShort.sol\\n @param marketIndex An identifier for the market.\\n @return longCumulativeRates The long cumulative sum.\\n @return shortCumulativeRates The short cumulative sum.\\n */\\n function _calculateNewCumulativeIssuancePerStakedSynth(\\n uint32 marketIndex,\\n uint256 previousMarketUpdateIndex,\\n uint256 longPrice,\\n uint256 shortPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) internal view virtual returns (uint256 longCumulativeRates, uint256 shortCumulativeRates) {\\n // Compute the current 'r' value for float issuance per second.\\n (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) = _calculateFloatPerSecond(\\n marketIndex,\\n longPrice,\\n shortPrice,\\n longValue,\\n shortValue\\n );\\n\\n // Compute time since last accumulativeIssuancePerStakedSynthSnapshot for the given token.\\n uint256 timeDelta = _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\\n marketIndex,\\n previousMarketUpdateIndex\\n );\\n\\n // Compute new cumulative 'r' value total.\\n return (\\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex]\\n .accumulativeFloatPerSyntheticToken_long + (timeDelta * longFloatPerSecond),\\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex]\\n .accumulativeFloatPerSyntheticToken_short + (timeDelta * shortFloatPerSecond)\\n );\\n }\\n\\n /**\\n @notice Adds new accumulativeIssuancePerStakedSynthSnapshots for the given long/short tokens. Called by the\\n ILongShort contract whenever there is a state change for a market.\\n @param marketIndex An identifier for the market.\\n @param marketUpdateIndex Current update index in the LongShort contract for this market.\\n @param shortValue The value locked in the short side of the market.\\n @param longValue The value locked in the long side of the market.\\n @param shortPrice The price of the short token as defined in LongShort.sol\\n @param longPrice The price of the long token as defined in LongShort.sol\\n */\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longPrice,\\n uint256 shortPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external override onlyLongShort {\\n (\\n uint256 newLongAccumulativeValue,\\n uint256 newShortAccumulativeValue\\n ) = _calculateNewCumulativeIssuancePerStakedSynth(\\n marketIndex,\\n marketUpdateIndex - 1,\\n longPrice,\\n shortPrice,\\n longValue,\\n shortValue\\n );\\n\\n // Set cumulative 'r' value on new accumulativeIssuancePerStakedSynthSnapshot.\\n\\n AccumulativeIssuancePerStakedSynthSnapshot\\n storage accumulativeFloatPerSyntheticTokenSnapshot = accumulativeFloatPerSyntheticTokenSnapshots[\\n marketIndex\\n ][marketUpdateIndex];\\n accumulativeFloatPerSyntheticTokenSnapshot\\n .accumulativeFloatPerSyntheticToken_long = newLongAccumulativeValue;\\n accumulativeFloatPerSyntheticTokenSnapshot\\n .accumulativeFloatPerSyntheticToken_short = newShortAccumulativeValue;\\n\\n // Set timestamp on new accumulativeIssuancePerStakedSynthSnapshot.\\n accumulativeFloatPerSyntheticTokenSnapshot.timestamp = block.timestamp;\\n\\n // Update latest index to point to new accumulativeIssuancePerStakedSynthSnapshot.\\n latestRewardIndex[marketIndex] = marketUpdateIndex;\\n\\n emit AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n marketIndex,\\n marketUpdateIndex,\\n newLongAccumulativeValue,\\n newShortAccumulativeValue\\n );\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 USER REWARD STATE FUNCTIONS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @dev Calculates the accumulated float in a specific range of staker snapshots\\n function _calculateAccumulatedFloatInRange(\\n uint32 marketIndex,\\n uint256 amountStakedLong,\\n uint256 amountStakedShort,\\n uint256 rewardIndexFrom,\\n uint256 rewardIndexTo\\n ) internal view virtual returns (uint256 floatReward) {\\n if (amountStakedLong > 0) {\\n uint256 accumDeltaLong = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][\\n rewardIndexTo\\n ].accumulativeFloatPerSyntheticToken_long -\\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom]\\n .accumulativeFloatPerSyntheticToken_long;\\n floatReward += (accumDeltaLong * amountStakedLong) / FLOAT_ISSUANCE_FIXED_DECIMAL;\\n }\\n\\n if (amountStakedShort > 0) {\\n uint256 accumDeltaShort = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][\\n rewardIndexTo\\n ].accumulativeFloatPerSyntheticToken_short -\\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom]\\n .accumulativeFloatPerSyntheticToken_short;\\n floatReward += (accumDeltaShort * amountStakedShort) / FLOAT_ISSUANCE_FIXED_DECIMAL;\\n }\\n }\\n\\n /**\\n @notice Calculates float owed to the user since the user last minted float for a market.\\n @param marketIndex Identifier for the market which the user staked in.\\n @param user The address of the user.\\n @return floatReward The amount of float owed.\\n */\\n function _calculateAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user)\\n internal\\n virtual\\n returns (uint256 floatReward)\\n {\\n address longToken = syntheticTokens[marketIndex][true];\\n address shortToken = syntheticTokens[marketIndex][false];\\n\\n uint256 amountStakedLong = userAmountStaked[longToken][user];\\n uint256 amountStakedShort = userAmountStaked[shortToken][user];\\n\\n uint256 usersLastRewardIndex = userIndexOfLastClaimedReward[marketIndex][user];\\n\\n uint256 currentRewardIndex = latestRewardIndex[marketIndex];\\n\\n // Don't do the calculation and return zero immediately if there is no change\\n if (usersLastRewardIndex == currentRewardIndex) {\\n return 0;\\n }\\n\\n uint256 usersShiftIndex = userNextPrice_stakedActionIndex[marketIndex][user];\\n // if there is a change in the users tokens held due to a token shift (or possibly another action in the future)\\n if (usersShiftIndex > 0 && usersShiftIndex <= currentRewardIndex) {\\n floatReward = _calculateAccumulatedFloatInRange(\\n marketIndex,\\n amountStakedLong,\\n amountStakedShort,\\n usersLastRewardIndex,\\n usersShiftIndex\\n );\\n\\n // Update the users balances\\n\\n uint256 amountToShiftAwayFromCurrentSide = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\\n marketIndex\\n ][true][user];\\n // Handle shifts from LONG side:\\n if (amountToShiftAwayFromCurrentSide > 0) {\\n amountStakedShort += ILongShort(longShort).getAmountSyntheticTokenToMintOnTargetSide(\\n marketIndex,\\n amountToShiftAwayFromCurrentSide,\\n true,\\n usersShiftIndex\\n );\\n\\n amountStakedLong -= amountToShiftAwayFromCurrentSide;\\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][user] = 0;\\n }\\n\\n amountToShiftAwayFromCurrentSide = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\\n marketIndex\\n ][false][user];\\n // Handle shifts from SHORT side:\\n if (amountToShiftAwayFromCurrentSide > 0) {\\n amountStakedLong += ILongShort(longShort).getAmountSyntheticTokenToMintOnTargetSide(\\n marketIndex,\\n amountToShiftAwayFromCurrentSide,\\n false,\\n usersShiftIndex\\n );\\n\\n amountStakedShort -= amountToShiftAwayFromCurrentSide;\\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][user] = 0;\\n }\\n\\n // Save the users updated staked amounts\\n userAmountStaked[longToken][user] = amountStakedLong;\\n userAmountStaked[shortToken][user] = amountStakedShort;\\n\\n emit StakeShifted(user, marketIndex, amountStakedLong, amountStakedShort);\\n\\n floatReward += _calculateAccumulatedFloatInRange(\\n marketIndex,\\n amountStakedLong,\\n amountStakedShort,\\n usersShiftIndex,\\n currentRewardIndex\\n );\\n\\n userNextPrice_stakedActionIndex[marketIndex][user] = 0;\\n } else {\\n floatReward = _calculateAccumulatedFloatInRange(\\n marketIndex,\\n amountStakedLong,\\n amountStakedShort,\\n usersLastRewardIndex,\\n currentRewardIndex\\n );\\n }\\n }\\n\\n /**\\n @notice Mints float for a user.\\n @dev Mints a fixed percentage for Float capital.\\n @param user The address of the user.\\n @param floatToMint The amount of float to mint.\\n */\\n function _mintFloat(address user, uint256 floatToMint) internal virtual {\\n IFloatToken(floatToken).mint(user, floatToMint);\\n IFloatToken(floatToken).mint(floatCapital, (floatToMint * floatPercentage) / 1e18);\\n }\\n\\n /**\\n @notice Mints float owed to a user for a market since they last minted.\\n @param marketIndex An identifier for the market.\\n @param user The address of the user.\\n */\\n function _mintAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user)\\n internal\\n virtual\\n {\\n uint256 floatToMint = _calculateAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\\n\\n if (floatToMint > 0) {\\n // Set the user has claimed up until now, stops them setting this forward\\n userIndexOfLastClaimedReward[marketIndex][user] = latestRewardIndex[marketIndex];\\n\\n _mintFloat(user, floatToMint);\\n emit FloatMinted(user, marketIndex, floatToMint);\\n }\\n }\\n\\n /**\\n @notice Mints float owed to a user for multiple markets, since they last minted for those markets.\\n @param marketIndexes Identifiers for the markets.\\n @param user The address of the user.\\n */\\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(\\n uint32[] calldata marketIndexes,\\n address user\\n ) internal virtual {\\n uint256 floatTotal = 0;\\n uint256 length = marketIndexes.length;\\n for (uint256 i = 0; i < length; i++) {\\n uint256 floatToMint = _calculateAccumulatedFloatAndExecuteOutstandingShifts(\\n marketIndexes[i],\\n user\\n );\\n\\n if (floatToMint > 0) {\\n // Set the user has claimed up until now, stops them setting this forward\\n userIndexOfLastClaimedReward[marketIndexes[i]][user] = latestRewardIndex[marketIndexes[i]];\\n\\n floatTotal += floatToMint;\\n\\n emit FloatMinted(user, marketIndexes[i], floatToMint);\\n }\\n }\\n if (floatTotal > 0) {\\n _mintFloat(user, floatTotal);\\n }\\n }\\n\\n /**\\n @notice Mints outstanding float for msg.sender.\\n @param marketIndexes Identifiers for the markets for which to mint float.\\n */\\n function claimFloatCustom(uint32[] calldata marketIndexes) external {\\n ILongShort(longShort).updateSystemStateMulti(marketIndexes);\\n _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, msg.sender);\\n }\\n\\n /**\\n @notice Mints outstanding float on behalf of another user.\\n @param marketIndexes Identifiers for the markets for which to mint float.\\n @param user The address of the user.\\n */\\n function claimFloatCustomFor(uint32[] calldata marketIndexes, address user) external {\\n // Unbounded loop - users are responsible for paying their own gas costs on these and it doesn't effect the rest of the system.\\n // No need to impose limit.\\n ILongShort(longShort).updateSystemStateMulti(marketIndexes);\\n _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, user);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 STAKING \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice A user with synthetic tokens stakes by calling stake on the token\\n contract which calls this function. We need to first update the\\n state of the LongShort contract for this market before staking to correctly calculate user rewards.\\n @param amount Amount to stake.\\n @param from Address to stake for.\\n */\\n function stakeFromUser(address from, uint256 amount)\\n external\\n virtual\\n override\\n onlyValidSynthetic(msg.sender)\\n gemCollecting(from)\\n {\\n uint32 marketIndex = marketIndexOfToken[msg.sender];\\n ILongShort(longShort).updateSystemState(marketIndex);\\n\\n uint256 userCurrentIndexOfLastClaimedReward = userIndexOfLastClaimedReward[marketIndex][from];\\n uint256 currentRewardIndex = latestRewardIndex[marketIndex];\\n // If they already have staked and have rewards due, mint these.\\n if (\\n userCurrentIndexOfLastClaimedReward != 0 &&\\n userCurrentIndexOfLastClaimedReward < currentRewardIndex\\n ) {\\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, from);\\n }\\n\\n userAmountStaked[msg.sender][from] += amount;\\n\\n // NOTE: Users retroactively earn a little bit of FLT because they start earning from the previous update index.\\n userIndexOfLastClaimedReward[marketIndex][from] = currentRewardIndex;\\n\\n emit StakeAdded(from, msg.sender, amount, currentRewardIndex);\\n }\\n\\n /**\\n @notice Allows users to shift their staked tokens from one side of the market to\\n the other at the next price.\\n @param amountSyntheticTokensToShift Amount of tokens to shift.\\n @param marketIndex Identifier for the market.\\n @param isShiftFromLong Whether the shift is from long to short or short to long.\\n */\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n )\\n external\\n virtual\\n override\\n updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\\n marketIndex,\\n msg.sender\\n )\\n gemCollecting(msg.sender)\\n {\\n require(amountSyntheticTokensToShift > 0, \\\"No zero shifts.\\\");\\n address token = syntheticTokens[marketIndex][isShiftFromLong];\\n uint256 totalAmountForNextShift = amountSyntheticTokensToShift +\\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][isShiftFromLong][\\n msg.sender\\n ];\\n\\n require(\\n userAmountStaked[token][msg.sender] >= totalAmountForNextShift,\\n \\\"Not enough tokens to shift\\\"\\n );\\n\\n ILongShort(longShort).shiftPositionNextPrice(\\n marketIndex,\\n amountSyntheticTokensToShift,\\n isShiftFromLong\\n );\\n\\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][isShiftFromLong][\\n msg.sender\\n ] = totalAmountForNextShift;\\n\\n uint256 userRewardIndex = latestRewardIndex[marketIndex] + 1;\\n userNextPrice_stakedActionIndex[marketIndex][msg.sender] = userRewardIndex;\\n\\n emit NextPriceStakeShift(\\n msg.sender,\\n marketIndex,\\n amountSyntheticTokensToShift,\\n isShiftFromLong,\\n userRewardIndex\\n );\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 WITHDRAWAL & MINTING \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Internal logic for withdrawing stakes.\\n @dev Mint user any outstanding float before withdrawing.\\n @param marketIndex Market index of token.\\n @param amount Amount to withdraw.\\n @param token Synthetic token that was staked.\\n */\\n function _withdraw(\\n uint32 marketIndex,\\n address token,\\n uint256 amount\\n ) internal virtual gemCollecting(msg.sender) {\\n uint256 amountFees = (amount * marketUnstakeFee_e18[marketIndex]) / 1e18;\\n\\n ISyntheticToken(token).transfer(floatTreasury, amountFees);\\n ISyntheticToken(token).transfer(msg.sender, amount - amountFees);\\n\\n emit StakeWithdrawn(msg.sender, token, amount);\\n }\\n\\n function _withdrawPrepLogic(\\n uint32 marketIndex,\\n bool isWithdrawFromLong,\\n uint256 amount,\\n address token\\n ) internal {\\n ILongShort(longShort).updateSystemState(marketIndex);\\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender);\\n\\n uint256 currentAmountStaked = userAmountStaked[token][msg.sender];\\n // If this value is greater than zero they have pending nextPriceShifts; don't allow user to shit these reserved tokens.\\n uint256 amountToShiftForThisToken = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\\n marketIndex\\n ][isWithdrawFromLong][msg.sender];\\n\\n unchecked {\\n require(currentAmountStaked >= amount + amountToShiftForThisToken, \\\"not enough to withdraw\\\");\\n userAmountStaked[token][msg.sender] = currentAmountStaked - amount;\\n }\\n }\\n\\n /**\\n @notice Withdraw function. Allows users to unstake.\\n @param amount Amount to withdraw.\\n @param marketIndex Market index of staked synthetic token\\n @param isWithdrawFromLong is synthetic token to be withdrawn long or short\\n */\\n function withdraw(\\n uint32 marketIndex,\\n bool isWithdrawFromLong,\\n uint256 amount\\n ) external {\\n address token = syntheticTokens[marketIndex][isWithdrawFromLong];\\n _withdrawPrepLogic(marketIndex, isWithdrawFromLong, amount, token);\\n _withdraw(marketIndex, token, amount);\\n }\\n\\n /**\\n @notice Allows users to withdraw their entire stake for a token.\\n @param marketIndex Market index of staked synthetic token\\n @param isWithdrawFromLong is synthetic token to be withdrawn long or short\\n */\\n function withdrawAll(uint32 marketIndex, bool isWithdrawFromLong) external {\\n ILongShort(longShort).updateSystemState(marketIndex);\\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender);\\n\\n address token = syntheticTokens[marketIndex][isWithdrawFromLong];\\n\\n uint256 userAmountStakedBeforeWithdrawal = userAmountStaked[token][msg.sender];\\n\\n uint256 amountToShiftForThisToken = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\\n marketIndex\\n ][isWithdrawFromLong][msg.sender];\\n userAmountStaked[token][msg.sender] = amountToShiftForThisToken;\\n\\n _withdraw(marketIndex, token, userAmountStakedBeforeWithdrawal - amountToShiftForThisToken);\\n }\\n\\n function _hasher(\\n uint32 marketIndex,\\n bool isWithdrawFromLong,\\n address user,\\n uint256 withdrawAmount,\\n uint256 expiry,\\n uint256 nonce,\\n uint256 discountWithdrawFee\\n ) internal pure returns (bytes32) {\\n return\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n keccak256(\\n abi.encodePacked(\\n marketIndex,\\n isWithdrawFromLong,\\n user,\\n withdrawAmount,\\n expiry,\\n nonce,\\n discountWithdrawFee\\n )\\n )\\n )\\n );\\n }\\n\\n function withdrawWithVoucher(\\n uint32 marketIndex,\\n bool isWithdrawFromLong,\\n uint256 withdrawAmount,\\n uint256 expiry,\\n uint256 nonce,\\n uint256 discountWithdrawFee,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external gemCollecting(msg.sender) {\\n address discountSigner = ecrecover(\\n _hasher(\\n marketIndex,\\n isWithdrawFromLong,\\n msg.sender,\\n withdrawAmount,\\n expiry,\\n nonce,\\n discountWithdrawFee\\n ),\\n v,\\n r,\\n s\\n );\\n hasRole(DISCOUNT_ROLE, discountSigner);\\n\\n require(block.timestamp < expiry, \\\"coupon expired\\\");\\n require(userNonce[msg.sender] == nonce, \\\"invalid nonce\\\");\\n require(discountWithdrawFee < marketUnstakeFee_e18[marketIndex], \\\"bad discount fee\\\");\\n userNonce[msg.sender] = userNonce[msg.sender] + 1;\\n\\n address token = syntheticTokens[marketIndex][isWithdrawFromLong];\\n\\n _withdrawPrepLogic(marketIndex, isWithdrawFromLong, withdrawAmount, token);\\n\\n uint256 amountFees = (withdrawAmount * discountWithdrawFee) / 1e18;\\n ISyntheticToken(token).transfer(floatTreasury, amountFees);\\n ISyntheticToken(token).transfer(msg.sender, withdrawAmount - amountFees);\\n emit StakeWithdrawn(msg.sender, token, withdrawAmount);\\n }\\n}\\n\",\"keccak256\":\"0x86fd9a3b8ce61c1ccee800f78d58e4c9fdc00230c61e8af69cf10557f8d46e85\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IFloatToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IFloatToken {\\n function mint(address to, uint256 amount) external;\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function burnFrom(address account, uint256 amount) external virtual;\\n}\\n\",\"keccak256\":\"0xdec0736a73d0855ee353797430e196f9be074ccd728209e28e881ffa24d76e5d\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506146d6806100206000396000f3fe6080604052600436106102935760003560e01c80639441752f1161015a578063c2b80072116100c1578063eae5a8d91161007a578063eae5a8d9146109a1578063edb010d7146109c1578063ef9c3052146109e1578063f344acc914610a0f578063f72c0d8b14610a2f578063f9fe734e14610a6357610293565b8063c2b80072146108a6578063d547741f146108e5578063dc86fe5014610905578063e39ac04414610933578063e68f3dbe14610961578063e955a3481461098157610293565b8063b45e86cf11610113578063b45e86cf146107b4578063ba89f7b8146107ed578063bda69fd81461080d578063be751cb71461082d578063c16199e31461084d578063c17f8ce91461086d57610293565b80639441752f146106be5780639e59fd0f146106fd578063a217fddf1461071d578063a538415c14610732578063b054c4a114610752578063b0956b5f1461079457610293565b80634f1ef286116101fe578063738f4b8e116101b7578063738f4b8e146105d857806375b238fc146105f857806385fcb8e31461062c57806386cbde1f1461065a5780638e659c081461067e57806391d148541461069e57610293565b80634f1ef286146105075780635892457d1461051a5780635ac76ce1146105305780636a5304df146105695780636c3050551461059757806372b124da146105b857610293565b80632e04b8e7116102505780632e04b8e7146103dc5780632f2ff15d1461041057806336568abe146104305780633659cfe6146104505780633733cf49146104705780633ebff44f146104a457610293565b806301ffc9a7146102985780630ca5a052146102cd57806313e8868a146102ef57806315f2081d1461032b578063248a9ca31461037457806329949872146103a4575b600080fd5b3480156102a457600080fd5b506102b86102b3366004613e90565b610a91565b60405190151581526020015b60405180910390f35b3480156102d957600080fd5b506102ed6102e83660046140eb565b610aca565b005b3480156102fb57600080fd5b5061031d61030a366004613f0f565b6101306020526000908152604090205481565b6040519081526020016102c4565b34801561033757600080fd5b5061035f610346366004613be7565b6101626020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016102c4565b34801561038057600080fd5b5061031d61038f366004613e56565b60009081526065602052604090206001015490565b3480156103b057600080fd5b5060fe546103c4906001600160a01b031681565b6040516001600160a01b0390911681526020016102c4565b3480156103e857600080fd5b5061035f6103f7366004613be7565b6101636020526000908152604090205463ffffffff1681565b34801561041c57600080fd5b506102ed61042b366004613e6e565b610b1f565b34801561043c57600080fd5b506102ed61044b366004613e6e565b610b4b565b34801561045c57600080fd5b506102ed61046b366004613be7565b610bce565b34801561047c57600080fd5b5061031d7fce9a6d3180818296cf6add4d55c45a6cd9e315597ee1da1e2313c503391736cd81565b3480156104b057600080fd5b506104ec6104bf3660046140eb565b61019260209081526000928352604080842090915290825290208054600182015460029092015490919083565b604080519384526020840192909252908201526060016102c4565b6102ed610515366004613cc2565b610bf5565b34801561052657600080fd5b5061031d60fd5481565b34801561053c57600080fd5b5061031d61054b366004613f29565b6101c060209081526000928352604080842090915290825290205481565b34801561057557600080fd5b5061031d610584366004613f0f565b61012e6020526000908152604090205481565b3480156105a357600080fd5b50610100546103c4906001600160a01b031681565b3480156105c457600080fd5b506102ed6105d3366004614063565b610c0a565b3480156105e457600080fd5b506102ed6105f3366004613da8565b6110a7565b34801561060457600080fd5b5061031d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561063857600080fd5b5061031d610647366004613f0f565b6101336020526000908152604090205481565b34801561066657600080fd5b5061031d6cd73d4c35b9df8aa7d6c3003573602c1b81565b34801561068a57600080fd5b506102ed610699366004613c33565b611116565b3480156106aa57600080fd5b506102b86106b9366004613e6e565b6112fb565b3480156106ca57600080fd5b5061031d6106d9366004613fea565b6101f060209081526000938452604080852082529284528284209052825290205481565b34801561070957600080fd5b506102ed610718366004613e56565b611328565b34801561072957600080fd5b5061031d600081565b34801561073e57600080fd5b506102ed61074d366004613fb4565b61136f565b34801561075e57600080fd5b506103c461076d366004613fb4565b6101346020908152600092835260408084209091529082529020546001600160a01b031681565b3480156107a057600080fd5b506102ed6107af366004613f44565b611466565b3480156107c057600080fd5b5061031d6107cf366004613f29565b6101ef60209081526000928352604080842090915290825290205481565b3480156107f957600080fd5b5060fb546103c4906001600160a01b031681565b34801561081957600080fd5b506102ed61082836600461413e565b611666565b34801561083957600080fd5b506102ed610848366004614106565b611711565b34801561085957600080fd5b5060fc546103c4906001600160a01b031681565b34801561087957600080fd5b5061031d610888366004613c01565b6101c160209081526000928352604080842090915290825290205481565b3480156108b257600080fd5b5061031d6108c1366004613fea565b6101f160209081526000938452604080852082529284528284209052825290205481565b3480156108f157600080fd5b506102ed610900366004613e6e565b611779565b34801561091157600080fd5b5061031d610920366004613f0f565b6101326020526000908152604090205481565b34801561093f57600080fd5b5061031d61094e366004613f0f565b6101916020526000908152604090205481565b34801561096d57600080fd5b506102ed61097c366004613d7f565b61179f565b34801561098d57600080fd5b506102ed61099c366004614025565b61198e565b3480156109ad57600080fd5b5060ff546103c4906001600160a01b031681565b3480156109cd57600080fd5b506102ed6109dc366004613ed0565b6119d8565b3480156109ed57600080fd5b5061031d6109fc366004613f0f565b61012f6020526000908152604090205481565b348015610a1b57600080fd5b506102ed610a2a366004613de8565b611c80565b348015610a3b57600080fd5b5061031d7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b348015610a6f57600080fd5b5061031d610a7e366004613f0f565b6101316020526000908152604090205481565b60006001600160e01b03198216637965db0b60e01b1480610ac257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b610ad2611cef565b610adc8282611d1b565b6040805163ffffffff84168152602081018390527feb76801ec75076256b8590fd7c621c2541531e6b9ac568389fa5cdf72e664844910160405180910390a15050565b600082815260656020526040902060010154610b3c81335b611d49565b610b468383611dad565b505050565b6001600160a01b0381163314610bc05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610bca8282611e33565b5050565b610bd781611e9a565b610bf281604051806020016040528060008152506000611ec5565b50565b610bfe82611e9a565b610bca82826001611ec5565b610100546040516324b4085360e21b81523360048201819052916001600160a01b0316906392d0214c90602401600060405180830381600087803b158015610c5157600080fd5b505af1158015610c65573d6000803e3d6000fd5b5050604080516001600160e01b031960e08f901b166020808301919091528d151560f81b60248301526bffffffffffffffffffffffff193360601b166025830152603982018d9052605982018c9052607982018b905260998083018b90528351808403909101815260b9830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060d984015260f58084019190915283518084039091018152610115909201909252805191012060009250600191506040805160008152602081018083529290925260ff881690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015610d76573d6000803e3d6000fd5b505050602060405103519050610dac7fce9a6d3180818296cf6add4d55c45a6cd9e315597ee1da1e2313c503391736cd826112fb565b50874210610ded5760405162461bcd60e51b815260206004820152600e60248201526d18dbdd5c1bdb88195e1c1a5c995960921b6044820152606401610bb7565b336000908152610163602052604090205463ffffffff168714610e425760405162461bcd60e51b815260206004820152600d60248201526c696e76616c6964206e6f6e636560981b6044820152606401610bb7565b63ffffffff8b16600090815261013060205260409020548610610e9a5760405162461bcd60e51b815260206004820152601060248201526f62616420646973636f756e742066656560801b6044820152606401610bb7565b3360009081526101636020526040902054610ebc9063ffffffff16600161433b565b33600090815261016360209081526040808320805463ffffffff191663ffffffff958616179055928e16825261013481528282208d15158352905220546001600160a01b0316610f0e8c8c8c84612046565b6000670de0b6b3a7640000610f23898d61453c565b610f2d9190614391565b60fc5460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925083169063a9059cbb90604401602060405180830381600087803b158015610f7d57600080fd5b505af1158015610f91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb59190613e3a565b506001600160a01b03821663a9059cbb33610fd0848f61459a565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561101657600080fd5b505af115801561102a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104e9190613e3a565b50604080513381526001600160a01b03841660208201529081018c90527fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda39060600160405180910390a150505050505050505050505050565b60fe54604051636c8d2b9760e01b81526001600160a01b0390911690636c8d2b97906110d99085908590600401614218565b600060405180830381600087803b1580156110f357600080fd5b505af1158015611107573d6000803e3d6000fd5b50505050610bca828233612178565b600054610100900460ff168061112f575060005460ff16155b61114b5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff1615801561116d576000805461ffff19166101011790555b6001600160a01b0389161580159061118d57506001600160a01b03881615155b80156111a157506001600160a01b03871615155b80156111b557506001600160a01b03861615155b80156111c957506001600160a01b03851615155b80156111dd57506001600160a01b03821615155b80156111e857508215155b6111f157600080fd5b60fb80546001600160a01b03199081166001600160a01b038881169190911790925560fc8054821689841617905560fe805482168b841617905560ff805482168a841617905561010080549091169184169190911790556112518961233f565b61127b7fce9a6d3180818296cf6add4d55c45a6cd9e315597ee1da1e2313c503391736cd856123c4565b611284836123ce565b604080516001600160a01b038b81168252888116602083015287811682840152891660608201526080810185905290517faf92ca815edd9a90dc4aa1dfc722fb1624d5b5f914b25ae3cf979ce6600f0a969181900360a00190a180156112f0576000805461ff00191690555b505050505050505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b611330611cef565b611339816123ce565b6040518181527f062ffcd555faf2b2c81f26010ee6db2e23106941bfed5ae979abd111975d815d9060200160405180910390a150565b60fe546040516305c8146f60e01b815263ffffffff841660048201526001600160a01b03909116906305c8146f90602401600060405180830381600087803b1580156113ba57600080fd5b505af11580156113ce573d6000803e3d6000fd5b505050506113dc82336123f4565b63ffffffff8216600081815261013460209081526040808320851515808552908352818420546001600160a01b03168085526101c184528285203380875281865284872080549888526101f0875285882094885293865284872090875285529290942054919092529081905590919061145f858461145a848661459a565b61249b565b5050505050565b61146e6126a1565b670de0b6b3a76400008510156114d15760405162461bcd60e51b815260206004820152602260248201527f6b496e697469616c4d756c7469706c696572206d757374206265203e3d203165604482015261062760f31b6064820152608401610bb7565b6001600160a01b03808816600081815261016260209081526040808320805463ffffffff8f1663ffffffff199182168117909255958c168085528285208054909716821790965580845261019283528184208480528352818420429055835261013482528083206001845280835281842080546001600160a01b031990811690961790558380529091529020805490911690911790556032611575898484846126eb565b63ffffffff8916600090815261012e6020908152604080832088905561012f90915290208690556115a68985611d1b565b6040805163ffffffff8b16815260208101869052908101869052606081018790526080810184905260a0810183905260c081018290527fe0bc2edbe91b35919ee6608af52675476a1cb964af5d671c9e2c018d3cae98919060e00160405180910390a16040805163ffffffff8b16815260006020820181905291810182905260608101919091527f65663e89e16ccfe470dd659bacdf6fddae8185e108d00bc980d34be7e86466d0906080015b60405180910390a1505050505050505050565b61166e6126a1565b6000806116898861168060018a61459a565b88888888612a05565b63ffffffff8a166000818152610192602090815260408083208d8452825280832060018101879055600281018690554281558484526101918352928190208d905580519384529083018c90528201849052606082018390529294509092507f65663e89e16ccfe470dd659bacdf6fddae8185e108d00bc980d34be7e86466d090608001611653565b611719611cef565b611725848484846126eb565b6040805163ffffffff8616815260208101859052908101839052606081018290527f940844064f9f8938ffe6a879f6143788f9f7e81daf872fee4fe2387b7cf9448d9060800160405180910390a150505050565b6000828152606560205260409020600101546117958133610b37565b610b468383611e33565b336117a981612aae565b610100546040516324b4085360e21b81526001600160a01b038086166004830152859216906392d0214c90602401600060405180830381600087803b1580156117f157600080fd5b505af1158015611805573d6000803e3d6000fd5b50503360009081526101626020526040908190205460fe5491516305c8146f60e01b815263ffffffff9091166004820181905293506001600160a01b0390911691506305c8146f90602401600060405180830381600087803b15801561186a57600080fd5b505af115801561187e573d6000803e3d6000fd5b5050505063ffffffff811660008181526101c0602090815260408083206001600160a01b038a16845282528083205493835261019190915290205481158015906118c757508082105b156118d6576118d683886123f4565b3360009081526101c1602090815260408083206001600160a01b038b1684529091528120805488929061190a908490614323565b909155505063ffffffff831660009081526101c0602090815260408083206001600160a01b038b1680855290835292819020849055805192835233918301919091528101879052606081018290527fef7c8dfef14cbefdf829b8f066b068b677992411137321d64b3ed4538c2b36379060800160405180910390a150505050505050565b63ffffffff831660009081526101346020908152604080832085151584529091529020546001600160a01b03166119c784848484612046565b6119d284828461249b565b50505050565b81336119e48282612b0c565b610100546040516324b4085360e21b81523360048201819052916001600160a01b0316906392d0214c90602401600060405180830381600087803b158015611a2b57600080fd5b505af1158015611a3f573d6000803e3d6000fd5b5050505060008611611a855760405162461bcd60e51b815260206004820152600f60248201526e2737903d32b9379039b434b33a399760891b6044820152606401610bb7565b63ffffffff8516600081815261013460209081526040808320881515808552908352818420549484526101f0835281842090845282528083203384529091528120546001600160a01b0390921691611add9089614323565b6001600160a01b03831660009081526101c160209081526040808320338452909152902054909150811115611b545760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656e6f75676820746f6b656e7320746f2073686966740000000000006044820152606401610bb7565b60fe546040516371fd962360e01b815263ffffffff89166004820152602481018a905287151560448201526001600160a01b03909116906371fd962390606401600060405180830381600087803b158015611bae57600080fd5b505af1158015611bc2573d6000803e3d6000fd5b5050505063ffffffff871660008181526101f0602090815260408083208a1515845282528083203384528252808320859055928252610191905290812054611c0b906001614323565b63ffffffff891660008181526101ef6020908152604080832033808552908352928190208590558051928352908201929092529081018b90528815156060820152608081018290529091507f1393b60b20fc61ac59730bbda202288e21de9c963502cfe81fcb843b427d46e29060a001611653565b60fe54604051636c8d2b9760e01b81526001600160a01b0390911690636c8d2b9790611cb29086908690600401614218565b600060405180830381600087803b158015611ccc57600080fd5b505af1158015611ce0573d6000803e3d6000fd5b50505050610b46838383612178565b611d197fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533611d49565b565b66b1a2bc2ec50000811115611d2f57600080fd5b63ffffffff90911660009081526101306020526040902055565b611d5382826112fb565b610bca57611d6b816001600160a01b03166014612b75565b611d76836020612b75565b604051602001611d879291906141a3565b60408051601f198184030181529082905262461bcd60e51b8252610bb791600401614261565b611db782826112fb565b610bca5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611def3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611e3d82826112fb565b15610bca5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610bca8133610b37565b6000611ef87f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050611f0384612d5e565b600083511180611f105750815b15611f2157611f1f8484612e03565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661145f57805460ff191660011781556040516001600160a01b0383166024820152611fa090869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052612e03565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b0383811691161461203d5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610bb7565b61145f85612eee565b60fe546040516305c8146f60e01b815263ffffffff861660048201526001600160a01b03909116906305c8146f90602401600060405180830381600087803b15801561209157600080fd5b505af11580156120a5573d6000803e3d6000fd5b505050506120b384336123f4565b6001600160a01b03811660009081526101c160209081526040808320338085529083528184205463ffffffff891685526101f08452828520881515865284528285209185529252909120548381018210156121495760405162461bcd60e51b81526020600482015260166024820152756e6f7420656e6f75676820746f20776974686472617760501b6044820152606401610bb7565b506001600160a01b0390911660009081526101c160209081526040808320338452909152902091900390555050565b600082815b8181101561232e5760006121c58787848181106121aa57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906121bf9190613f0f565b86612f2e565b9050801561231b5761019160008888858181106121f257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122079190613f0f565b63ffffffff1663ffffffff168152602001908152602001600020546101c0600089898681811061224757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061225c9190613f0f565b63ffffffff168152602080820192909252604090810160009081206001600160a01b038a1682529092529020556122938185614323565b93507f2f0b57f663333228518fca119813fe0f6daeb5f19d087965f56b45fecf2d5205858888858181106122d757634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122ec9190613f0f565b604080516001600160a01b03909316835263ffffffff9091166020830152810183905260600160405180910390a15b5080612326816145f4565b91505061217d565b50811561145f5761145f8383613352565b600054610100900460ff1680612358575060005460ff16155b6123745760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff16158015612396576000805461ffff19166101011790555b61239e613456565b6123a66134d9565b6123af82613537565b8015610bca576000805461ff00191690555050565b610bca8282611dad565b670de0b6b3a764000081111580156123e65750600081115b6123ef57600080fd5b60fd55565b60006124008383612f2e565b90508015610b465763ffffffff8316600090815261019160209081526040808320546101c083528184206001600160a01b0387168552909252909120556124478282613352565b604080516001600160a01b038416815263ffffffff851660208201529081018290527f2f0b57f663333228518fca119813fe0f6daeb5f19d087965f56b45fecf2d52059060600160405180910390a1505050565b610100546040516324b4085360e21b81523360048201819052916001600160a01b0316906392d0214c90602401600060405180830381600087803b1580156124e257600080fd5b505af11580156124f6573d6000803e3d6000fd5b5050505063ffffffff841660009081526101306020526040812054670de0b6b3a764000090612525908561453c565b61252f9190614391565b60fc5460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925085169063a9059cbb90604401602060405180830381600087803b15801561257f57600080fd5b505af1158015612593573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125b79190613e3a565b506001600160a01b03841663a9059cbb336125d2848761459a565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561261857600080fd5b505af115801561262c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126509190613e3a565b50604080513381526001600160a01b03861660208201529081018490527fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda39060600160405180910390a15050505050565b60fe546001600160a01b03163314611d195760405162461bcd60e51b815260206004820152600d60248201526c1b9bdd08131bdb99d4da1bdc9d609a1b6044820152606401610bb7565b670c7d713b49d9ffff198213801561270a5750670c7d713b49da000082125b6127745760405162461bcd60e51b815260206004820152603560248201527f62616c616e6365496e63656e7469766543757276655f657175696c69627269756044820152746d4f6666736574206f7574206f6620626f756e647360581b6064820152608401610bb7565b600083116127d95760405162461bcd60e51b815260206004820152602c60248201527f62616c616e6365496e63656e7469766543757276655f6578706f6e656e74206f60448201526b7574206f6620626f756e647360a01b6064820152608401610bb7565b606481106128375760405162461bcd60e51b815260206004820152602560248201527f736166654578706f6e656e744269745368696674696e67206f7574206f6620626044820152646f756e647360d81b6064820152608401610bb7565b60fe54604051631678fc4360e31b815263ffffffff86166004820152600060248201819052916001600160a01b03169063b3c7e2189060440160206040518083038186803b15801561288857600080fd5b505afa15801561289c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128c09190613eb8565b60fe54604051631678fc4360e31b815263ffffffff88166004820152600160248201526001600160a01b039091169063b3c7e2189060440160206040518083038186803b15801561291057600080fd5b505afa158015612924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129489190613eb8565b6129529190614323565b90508382612962836101f461453c565b61296d92911c6143eb565b50606481831c116129d05760405162461bcd60e51b815260206004820152602760248201527f626974207368696674696e6720746f6f206c616e676520666f7220746f74616c604482015266081b1bd8dad95960ca1b6064820152608401610bb7565b5063ffffffff909316600090815261013160209081526040808320949094556101328152838220929092556101339091522055565b600080600080612a188a89898989613600565b915091506000612a288b8b6138a9565b9050612a34838261453c565b63ffffffff8c166000908152610192602090815260408083208e8452909152902060010154612a639190614323565b612a6d838361453c565b63ffffffff8d166000908152610192602090815260408083208f8452909152902060020154612a9c9190614323565b94509450505050965096945050505050565b6001600160a01b0381166000908152610162602052604090205463ffffffff16610bf25760405162461bcd60e51b815260206004820152600f60248201526e0dcdee840ecc2d8d2c840e6f2dce8d608b1b6044820152606401610bb7565b63ffffffff821660009081526101ef6020908152604080832033845290915290205415801590612b66575063ffffffff8216600090815261019160209081526040808320546101ef83528184203385529092529091205411155b15610bca57610bca82336123f4565b60606000612b8483600261453c565b612b8f906002614323565b67ffffffffffffffff811115612bb557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612bdf576020820181803683370190505b509050600360fc1b81600081518110612c0857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612c4557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000612c6984600261453c565b612c74906001614323565b90505b6001811115612d08576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612cb657634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110612cda57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93612d01816145dd565b9050612c77565b508315612d575760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610bb7565b9392505050565b803b612dc25760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610bb7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b612e625760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610bb7565b600080846001600160a01b031684604051612e7d9190614187565b600060405180830381855af49150503d8060008114612eb8576040519150601f19603f3d011682016040523d82523d6000602084013e612ebd565b606091505b5091509150612ee5828260405180606001604052806027815260200161467a602791396138d5565b95945050505050565b612ef781612d5e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b63ffffffff821660008181526101346020908152604080832060018452825280832054838052818420546001600160a01b039182168086526101c180865284872089851680895290875285882054949093168088529086528487208388528652848720548888526101c087528588209388529286528487205497875261019190955292852054949592949192909180821415612fd35760009650505050505050611322565b63ffffffff891660009081526101ef602090815260408083206001600160a01b038c168452909152902054801580159061300d5750818111155b156133355761301f8a8686868561390e565b63ffffffff8b1660009081526101f0602090815260408083206001845282528083206001600160a01b038e168452909152902054909850801561313f5760fe54604051630125edfd60e71b815263ffffffff8d1660048201526024810183905260016044820152606481018490526001600160a01b03909116906392f6fe809060840160206040518083038186803b1580156130ba57600080fd5b505afa1580156130ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f29190613eb8565b6130fc9086614323565b9450613108818761459a565b63ffffffff8c1660009081526101f0602090815260408083206001845282528083206001600160a01b038f16845290915281205595505b5063ffffffff8a1660009081526101f06020908152604080832083805282528083206001600160a01b038d168452909152902054801561325b5760fe54604051630125edfd60e71b815263ffffffff8d1660048201526024810183905260006044820152606481018490526001600160a01b03909116906392f6fe809060840160206040518083038186803b1580156131d757600080fd5b505afa1580156131eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061320f9190613eb8565b6132199087614323565b9550613225818661459a565b63ffffffff8c1660009081526101f06020908152604080832083805282528083206001600160a01b038f16845290915281205594505b6001600160a01b0388811660009081526101c1602081815260408084208f86168086529083528185208c9055948c168452918152818320848452815291819020889055805192835263ffffffff8e16918301919091528101879052606081018690527fea2b4628943d2a0a2c85f85b60007fb6f8273d91c0eaff6f8b140a5007637b359060800160405180910390a16132f78b8787858761390e565b613301908a614323565b63ffffffff8c1660009081526101ef602090815260408083206001600160a01b038f16845290915281205598506133459050565b6133428a8686868661390e565b97505b5050505050505092915050565b60ff546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b1580156133a057600080fd5b505af11580156133b4573d6000803e3d6000fd5b505060ff5460fb5460fd546001600160a01b0392831694506340c10f199350911690670de0b6b3a7640000906133ea908661453c565b6133f49190614391565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561343a57600080fd5b505af115801561344e573d6000803e3d6000fd5b505050505050565b600054610100900460ff168061346f575060005460ff16155b61348b5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff161580156134ad576000805461ffff19166101011790555b6134b5613a01565b6134bd613a01565b6134c5613a01565b8015610bf2576000805461ff001916905550565b600054610100900460ff16806134f2575060005460ff16155b61350e5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff161580156134b5576000805461ffff19166101011790556134bd613a01565b600054610100900460ff1680613550575060005460ff16155b61356c5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff1615801561358e576000805461ffff19166101011790555b6001600160a01b0382166135a157600080fd5b6135ac6000836123c4565b6135d67fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775836123c4565b6123af7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3836123c4565b600080600061360e88613a6b565b9050600061361c8587614323565b63ffffffff8a166000908152610132602052604081205491925090671bc16d674ec800009061364c9084906144b9565b6136569190614363565b63ffffffff8b16600090815261013360205260409020549091508761367c8360026144b9565b613686908961455b565b12156137a4578682126136ac57600061369f8a8661453c565b955095505050505061389f565b63ffffffff8b16600090815261013160205260408120546136ce60018461459a565b6136d8858b61455b565b6136e392911c6143eb565b63ffffffff8d16600090815261013160205260408120549192509061370a9086851c6143eb565b9050600081613721846706f05b59d3b2000061453c565b61372b9190614391565b9050600061374182670de0b6b3a764000061459a565b9050670de0b6b3a76400008e6137578a8561453c565b613761919061453c565b61376b9190614391565b670de0b6b3a76400008e61377f8b8561453c565b613789919061453c565b6137939190614391565b99509950505050505050505061389f565b876137ae8361460f565b126137cc576137bd8a8561453c565b6000955095505050505061389f565b63ffffffff8b16600090815261013160205260408120546137ee60018461459a565b6137f8858c6142e2565b61380392911c6143eb565b63ffffffff8d16600090815261013160205260408120549192509061382a9086851c6143eb565b9050600081613841846706f05b59d3b2000061453c565b61384b9190614391565b9050600061386182670de0b6b3a764000061459a565b9050670de0b6b3a76400008e6138778a8461453c565b613881919061453c565b61388b9190614391565b670de0b6b3a76400008e61377f8b8661453c565b9550959350505050565b63ffffffff8216600090815261019260209081526040808320848452909152812054612d57904261459a565b606083156138e4575081612d57565b8251156138f45782518084602001fd5b8160405162461bcd60e51b8152600401610bb79190614261565b600084156139855763ffffffff86166000908152610192602090815260408083208684529091528082206001908101548584529183200154613950919061459a565b90506cd73d4c35b9df8aa7d6c3003573602c1b61396d878361453c565b6139779190614391565b6139819083614323565b9150505b8315612ee55763ffffffff861660009081526101926020908152604080832086845290915280822060029081015485845291832001546139c5919061459a565b90506cd73d4c35b9df8aa7d6c3003573602c1b6139e2868361453c565b6139ec9190614391565b6139f69083614323565b979650505050505050565b600054610100900460ff1680613a1a575060005460ff16155b613a365760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff161580156134c5576000805461ffff19166101011790558015610bf2576000805461ff001916905550565b6000806000613a7984613b2e565b91509150670de0b6b3a7640000811015613aa357634e487b7160e01b600052600160045260246000fd5b63ffffffff841660009081526101926020908152604080832083805290915290205482613ad0824261459a565b1015613b1b5782613ae1824261459a565b613af3670de0b6b3a76400008561459a565b613afd919061453c565b613b079190614391565b613b11908361459a565b9350505050610ac5565b670de0b6b3a76400009350505050610ac5565b63ffffffff8116600090815261012e602090815260408083205461012f90925290912054670de0b6b3a7640000811015613b6d5750670de0b6b3a76400005b915091565b80356001600160a01b0381168114610ac557600080fd5b60008083601f840112613b9a578081fd5b50813567ffffffffffffffff811115613bb1578182fd5b6020830191508360208260051b8501011115613bcc57600080fd5b9250929050565b803563ffffffff81168114610ac557600080fd5b600060208284031215613bf8578081fd5b612d5782613b72565b60008060408385031215613c13578081fd5b613c1c83613b72565b9150613c2a60208401613b72565b90509250929050565b600080600080600080600080610100898b031215613c4f578384fd5b613c5889613b72565b9750613c6660208a01613b72565b9650613c7460408a01613b72565b9550613c8260608a01613b72565b9450613c9060808a01613b72565b9350613c9e60a08a01613b72565b925060c08901359150613cb360e08a01613b72565b90509295985092959890939650565b60008060408385031215613cd4578182fd5b613cdd83613b72565b9150602083013567ffffffffffffffff80821115613cf9578283fd5b818501915085601f830112613d0c578283fd5b813581811115613d1e57613d1e614655565b604051601f8201601f19908116603f01168101908382118183101715613d4657613d46614655565b81604052828152886020848701011115613d5e578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215613d91578182fd5b613d9a83613b72565b946020939093013593505050565b60008060208385031215613dba578182fd5b823567ffffffffffffffff811115613dd0578283fd5b613ddc85828601613b89565b90969095509350505050565b600080600060408486031215613dfc578283fd5b833567ffffffffffffffff811115613e12578384fd5b613e1e86828701613b89565b9094509250613e31905060208501613b72565b90509250925092565b600060208284031215613e4b578081fd5b8151612d578161466b565b600060208284031215613e67578081fd5b5035919050565b60008060408385031215613e80578182fd5b82359150613c2a60208401613b72565b600060208284031215613ea1578081fd5b81356001600160e01b031981168114612d57578182fd5b600060208284031215613ec9578081fd5b5051919050565b600080600060608486031215613ee4578081fd5b83359250613ef460208501613bd3565b91506040840135613f048161466b565b809150509250925092565b600060208284031215613f20578081fd5b612d5782613bd3565b60008060408385031215613f3b578182fd5b613c1c83613bd3565b600080600080600080600080610100898b031215613f60578182fd5b613f6989613bd3565b9750613f7760208a01613b72565b9650613f8560408a01613b72565b979a96995096976060810135975060808101359660a0820135965060c0820135955060e0909101359350915050565b60008060408385031215613fc6578182fd5b613fcf83613bd3565b91506020830135613fdf8161466b565b809150509250929050565b600080600060608486031215613ffe578081fd5b61400784613bd3565b925060208401356140178161466b565b9150613e3160408501613b72565b600080600060608486031215614039578081fd5b61404284613bd3565b925060208401356140528161466b565b929592945050506040919091013590565b60008060008060008060008060006101208a8c031215614081578283fd5b61408a8a613bd3565b985060208a013561409a8161466b565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013560ff811681146140cb578384fd5b8093505060e08a013591506101008a013590509295985092959850929598565b600080604083850312156140fd578182fd5b613d9a83613bd3565b6000806000806080858703121561411b578182fd5b61412485613bd3565b966020860135965060408601359560600135945092505050565b60008060008060008060c08789031215614156578384fd5b61415f87613bd3565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b600082516141998184602087016145b1565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516141db8160178501602088016145b1565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161420c8160288401602088016145b1565b01602801949350505050565b60208082528181018390526000908460408401835b868110156142565763ffffffff61424384613bd3565b168252918301919083019060010161422d565b509695505050505050565b60006020825282518060208401526142808160408501602087016145b1565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600080821280156001600160ff1b038490038513161561430457614304614629565b600160ff1b839003841281161561431d5761431d614629565b50500190565b6000821982111561433657614336614629565b500190565b600063ffffffff80831681851680830382111561435a5761435a614629565b01949350505050565b6000826143725761437261463f565b600160ff1b82146000198414161561438c5761438c614629565b500590565b6000826143a0576143a061463f565b500490565b80825b60018086116143b757506143e2565b8187048211156143c9576143c9614629565b808616156143d657918102915b9490941c9380026143a8565b94509492505050565b6000612d57600019848460008261440457506001612d57565b8161441157506000612d57565b816001811461442757600281146144315761445e565b6001915050612d57565b60ff84111561444257614442614629565b6001841b91508482111561445857614458614629565b50612d57565b5060208310610133831016604e8410600b8410161715614491575081810a8381111561448c5761448c614629565b612d57565b61449e84848460016143a5565b8086048211156144b0576144b0614629565b02949350505050565b60006001600160ff1b03818413828413808216868404861116156144df576144df614629565b600160ff1b848712828116878305891216156144fd576144fd614629565b85871292508782058712848416161561451857614518614629565b8785058712818416161561452e5761452e614629565b505050929093029392505050565b600081600019048311821515161561455657614556614629565b500290565b60008083128015600160ff1b85018412161561457957614579614629565b6001600160ff1b038401831381161561459457614594614629565b50500390565b6000828210156145ac576145ac614629565b500390565b60005b838110156145cc5781810151838201526020016145b4565b838111156119d25750506000910152565b6000816145ec576145ec614629565b506000190190565b600060001982141561460857614608614629565b5060010190565b6000600160ff1b82141561462557614625614629565b0390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610bf257600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b175c49c6bf4f04d46105468d1265f2a92d0e33399c8a2812fa6620a61cf51d064736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106102935760003560e01c80639441752f1161015a578063c2b80072116100c1578063eae5a8d91161007a578063eae5a8d9146109a1578063edb010d7146109c1578063ef9c3052146109e1578063f344acc914610a0f578063f72c0d8b14610a2f578063f9fe734e14610a6357610293565b8063c2b80072146108a6578063d547741f146108e5578063dc86fe5014610905578063e39ac04414610933578063e68f3dbe14610961578063e955a3481461098157610293565b8063b45e86cf11610113578063b45e86cf146107b4578063ba89f7b8146107ed578063bda69fd81461080d578063be751cb71461082d578063c16199e31461084d578063c17f8ce91461086d57610293565b80639441752f146106be5780639e59fd0f146106fd578063a217fddf1461071d578063a538415c14610732578063b054c4a114610752578063b0956b5f1461079457610293565b80634f1ef286116101fe578063738f4b8e116101b7578063738f4b8e146105d857806375b238fc146105f857806385fcb8e31461062c57806386cbde1f1461065a5780638e659c081461067e57806391d148541461069e57610293565b80634f1ef286146105075780635892457d1461051a5780635ac76ce1146105305780636a5304df146105695780636c3050551461059757806372b124da146105b857610293565b80632e04b8e7116102505780632e04b8e7146103dc5780632f2ff15d1461041057806336568abe146104305780633659cfe6146104505780633733cf49146104705780633ebff44f146104a457610293565b806301ffc9a7146102985780630ca5a052146102cd57806313e8868a146102ef57806315f2081d1461032b578063248a9ca31461037457806329949872146103a4575b600080fd5b3480156102a457600080fd5b506102b86102b3366004613e90565b610a91565b60405190151581526020015b60405180910390f35b3480156102d957600080fd5b506102ed6102e83660046140eb565b610aca565b005b3480156102fb57600080fd5b5061031d61030a366004613f0f565b6101306020526000908152604090205481565b6040519081526020016102c4565b34801561033757600080fd5b5061035f610346366004613be7565b6101626020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016102c4565b34801561038057600080fd5b5061031d61038f366004613e56565b60009081526065602052604090206001015490565b3480156103b057600080fd5b5060fe546103c4906001600160a01b031681565b6040516001600160a01b0390911681526020016102c4565b3480156103e857600080fd5b5061035f6103f7366004613be7565b6101636020526000908152604090205463ffffffff1681565b34801561041c57600080fd5b506102ed61042b366004613e6e565b610b1f565b34801561043c57600080fd5b506102ed61044b366004613e6e565b610b4b565b34801561045c57600080fd5b506102ed61046b366004613be7565b610bce565b34801561047c57600080fd5b5061031d7fce9a6d3180818296cf6add4d55c45a6cd9e315597ee1da1e2313c503391736cd81565b3480156104b057600080fd5b506104ec6104bf3660046140eb565b61019260209081526000928352604080842090915290825290208054600182015460029092015490919083565b604080519384526020840192909252908201526060016102c4565b6102ed610515366004613cc2565b610bf5565b34801561052657600080fd5b5061031d60fd5481565b34801561053c57600080fd5b5061031d61054b366004613f29565b6101c060209081526000928352604080842090915290825290205481565b34801561057557600080fd5b5061031d610584366004613f0f565b61012e6020526000908152604090205481565b3480156105a357600080fd5b50610100546103c4906001600160a01b031681565b3480156105c457600080fd5b506102ed6105d3366004614063565b610c0a565b3480156105e457600080fd5b506102ed6105f3366004613da8565b6110a7565b34801561060457600080fd5b5061031d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561063857600080fd5b5061031d610647366004613f0f565b6101336020526000908152604090205481565b34801561066657600080fd5b5061031d6cd73d4c35b9df8aa7d6c3003573602c1b81565b34801561068a57600080fd5b506102ed610699366004613c33565b611116565b3480156106aa57600080fd5b506102b86106b9366004613e6e565b6112fb565b3480156106ca57600080fd5b5061031d6106d9366004613fea565b6101f060209081526000938452604080852082529284528284209052825290205481565b34801561070957600080fd5b506102ed610718366004613e56565b611328565b34801561072957600080fd5b5061031d600081565b34801561073e57600080fd5b506102ed61074d366004613fb4565b61136f565b34801561075e57600080fd5b506103c461076d366004613fb4565b6101346020908152600092835260408084209091529082529020546001600160a01b031681565b3480156107a057600080fd5b506102ed6107af366004613f44565b611466565b3480156107c057600080fd5b5061031d6107cf366004613f29565b6101ef60209081526000928352604080842090915290825290205481565b3480156107f957600080fd5b5060fb546103c4906001600160a01b031681565b34801561081957600080fd5b506102ed61082836600461413e565b611666565b34801561083957600080fd5b506102ed610848366004614106565b611711565b34801561085957600080fd5b5060fc546103c4906001600160a01b031681565b34801561087957600080fd5b5061031d610888366004613c01565b6101c160209081526000928352604080842090915290825290205481565b3480156108b257600080fd5b5061031d6108c1366004613fea565b6101f160209081526000938452604080852082529284528284209052825290205481565b3480156108f157600080fd5b506102ed610900366004613e6e565b611779565b34801561091157600080fd5b5061031d610920366004613f0f565b6101326020526000908152604090205481565b34801561093f57600080fd5b5061031d61094e366004613f0f565b6101916020526000908152604090205481565b34801561096d57600080fd5b506102ed61097c366004613d7f565b61179f565b34801561098d57600080fd5b506102ed61099c366004614025565b61198e565b3480156109ad57600080fd5b5060ff546103c4906001600160a01b031681565b3480156109cd57600080fd5b506102ed6109dc366004613ed0565b6119d8565b3480156109ed57600080fd5b5061031d6109fc366004613f0f565b61012f6020526000908152604090205481565b348015610a1b57600080fd5b506102ed610a2a366004613de8565b611c80565b348015610a3b57600080fd5b5061031d7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b348015610a6f57600080fd5b5061031d610a7e366004613f0f565b6101316020526000908152604090205481565b60006001600160e01b03198216637965db0b60e01b1480610ac257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b610ad2611cef565b610adc8282611d1b565b6040805163ffffffff84168152602081018390527feb76801ec75076256b8590fd7c621c2541531e6b9ac568389fa5cdf72e664844910160405180910390a15050565b600082815260656020526040902060010154610b3c81335b611d49565b610b468383611dad565b505050565b6001600160a01b0381163314610bc05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610bca8282611e33565b5050565b610bd781611e9a565b610bf281604051806020016040528060008152506000611ec5565b50565b610bfe82611e9a565b610bca82826001611ec5565b610100546040516324b4085360e21b81523360048201819052916001600160a01b0316906392d0214c90602401600060405180830381600087803b158015610c5157600080fd5b505af1158015610c65573d6000803e3d6000fd5b5050604080516001600160e01b031960e08f901b166020808301919091528d151560f81b60248301526bffffffffffffffffffffffff193360601b166025830152603982018d9052605982018c9052607982018b905260998083018b90528351808403909101815260b9830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060d984015260f58084019190915283518084039091018152610115909201909252805191012060009250600191506040805160008152602081018083529290925260ff881690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015610d76573d6000803e3d6000fd5b505050602060405103519050610dac7fce9a6d3180818296cf6add4d55c45a6cd9e315597ee1da1e2313c503391736cd826112fb565b50874210610ded5760405162461bcd60e51b815260206004820152600e60248201526d18dbdd5c1bdb88195e1c1a5c995960921b6044820152606401610bb7565b336000908152610163602052604090205463ffffffff168714610e425760405162461bcd60e51b815260206004820152600d60248201526c696e76616c6964206e6f6e636560981b6044820152606401610bb7565b63ffffffff8b16600090815261013060205260409020548610610e9a5760405162461bcd60e51b815260206004820152601060248201526f62616420646973636f756e742066656560801b6044820152606401610bb7565b3360009081526101636020526040902054610ebc9063ffffffff16600161433b565b33600090815261016360209081526040808320805463ffffffff191663ffffffff958616179055928e16825261013481528282208d15158352905220546001600160a01b0316610f0e8c8c8c84612046565b6000670de0b6b3a7640000610f23898d61453c565b610f2d9190614391565b60fc5460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925083169063a9059cbb90604401602060405180830381600087803b158015610f7d57600080fd5b505af1158015610f91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb59190613e3a565b506001600160a01b03821663a9059cbb33610fd0848f61459a565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561101657600080fd5b505af115801561102a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104e9190613e3a565b50604080513381526001600160a01b03841660208201529081018c90527fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda39060600160405180910390a150505050505050505050505050565b60fe54604051636c8d2b9760e01b81526001600160a01b0390911690636c8d2b97906110d99085908590600401614218565b600060405180830381600087803b1580156110f357600080fd5b505af1158015611107573d6000803e3d6000fd5b50505050610bca828233612178565b600054610100900460ff168061112f575060005460ff16155b61114b5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff1615801561116d576000805461ffff19166101011790555b6001600160a01b0389161580159061118d57506001600160a01b03881615155b80156111a157506001600160a01b03871615155b80156111b557506001600160a01b03861615155b80156111c957506001600160a01b03851615155b80156111dd57506001600160a01b03821615155b80156111e857508215155b6111f157600080fd5b60fb80546001600160a01b03199081166001600160a01b038881169190911790925560fc8054821689841617905560fe805482168b841617905560ff805482168a841617905561010080549091169184169190911790556112518961233f565b61127b7fce9a6d3180818296cf6add4d55c45a6cd9e315597ee1da1e2313c503391736cd856123c4565b611284836123ce565b604080516001600160a01b038b81168252888116602083015287811682840152891660608201526080810185905290517faf92ca815edd9a90dc4aa1dfc722fb1624d5b5f914b25ae3cf979ce6600f0a969181900360a00190a180156112f0576000805461ff00191690555b505050505050505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b611330611cef565b611339816123ce565b6040518181527f062ffcd555faf2b2c81f26010ee6db2e23106941bfed5ae979abd111975d815d9060200160405180910390a150565b60fe546040516305c8146f60e01b815263ffffffff841660048201526001600160a01b03909116906305c8146f90602401600060405180830381600087803b1580156113ba57600080fd5b505af11580156113ce573d6000803e3d6000fd5b505050506113dc82336123f4565b63ffffffff8216600081815261013460209081526040808320851515808552908352818420546001600160a01b03168085526101c184528285203380875281865284872080549888526101f0875285882094885293865284872090875285529290942054919092529081905590919061145f858461145a848661459a565b61249b565b5050505050565b61146e6126a1565b670de0b6b3a76400008510156114d15760405162461bcd60e51b815260206004820152602260248201527f6b496e697469616c4d756c7469706c696572206d757374206265203e3d203165604482015261062760f31b6064820152608401610bb7565b6001600160a01b03808816600081815261016260209081526040808320805463ffffffff8f1663ffffffff199182168117909255958c168085528285208054909716821790965580845261019283528184208480528352818420429055835261013482528083206001845280835281842080546001600160a01b031990811690961790558380529091529020805490911690911790556032611575898484846126eb565b63ffffffff8916600090815261012e6020908152604080832088905561012f90915290208690556115a68985611d1b565b6040805163ffffffff8b16815260208101869052908101869052606081018790526080810184905260a0810183905260c081018290527fe0bc2edbe91b35919ee6608af52675476a1cb964af5d671c9e2c018d3cae98919060e00160405180910390a16040805163ffffffff8b16815260006020820181905291810182905260608101919091527f65663e89e16ccfe470dd659bacdf6fddae8185e108d00bc980d34be7e86466d0906080015b60405180910390a1505050505050505050565b61166e6126a1565b6000806116898861168060018a61459a565b88888888612a05565b63ffffffff8a166000818152610192602090815260408083208d8452825280832060018101879055600281018690554281558484526101918352928190208d905580519384529083018c90528201849052606082018390529294509092507f65663e89e16ccfe470dd659bacdf6fddae8185e108d00bc980d34be7e86466d090608001611653565b611719611cef565b611725848484846126eb565b6040805163ffffffff8616815260208101859052908101839052606081018290527f940844064f9f8938ffe6a879f6143788f9f7e81daf872fee4fe2387b7cf9448d9060800160405180910390a150505050565b6000828152606560205260409020600101546117958133610b37565b610b468383611e33565b336117a981612aae565b610100546040516324b4085360e21b81526001600160a01b038086166004830152859216906392d0214c90602401600060405180830381600087803b1580156117f157600080fd5b505af1158015611805573d6000803e3d6000fd5b50503360009081526101626020526040908190205460fe5491516305c8146f60e01b815263ffffffff9091166004820181905293506001600160a01b0390911691506305c8146f90602401600060405180830381600087803b15801561186a57600080fd5b505af115801561187e573d6000803e3d6000fd5b5050505063ffffffff811660008181526101c0602090815260408083206001600160a01b038a16845282528083205493835261019190915290205481158015906118c757508082105b156118d6576118d683886123f4565b3360009081526101c1602090815260408083206001600160a01b038b1684529091528120805488929061190a908490614323565b909155505063ffffffff831660009081526101c0602090815260408083206001600160a01b038b1680855290835292819020849055805192835233918301919091528101879052606081018290527fef7c8dfef14cbefdf829b8f066b068b677992411137321d64b3ed4538c2b36379060800160405180910390a150505050505050565b63ffffffff831660009081526101346020908152604080832085151584529091529020546001600160a01b03166119c784848484612046565b6119d284828461249b565b50505050565b81336119e48282612b0c565b610100546040516324b4085360e21b81523360048201819052916001600160a01b0316906392d0214c90602401600060405180830381600087803b158015611a2b57600080fd5b505af1158015611a3f573d6000803e3d6000fd5b5050505060008611611a855760405162461bcd60e51b815260206004820152600f60248201526e2737903d32b9379039b434b33a399760891b6044820152606401610bb7565b63ffffffff8516600081815261013460209081526040808320881515808552908352818420549484526101f0835281842090845282528083203384529091528120546001600160a01b0390921691611add9089614323565b6001600160a01b03831660009081526101c160209081526040808320338452909152902054909150811115611b545760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656e6f75676820746f6b656e7320746f2073686966740000000000006044820152606401610bb7565b60fe546040516371fd962360e01b815263ffffffff89166004820152602481018a905287151560448201526001600160a01b03909116906371fd962390606401600060405180830381600087803b158015611bae57600080fd5b505af1158015611bc2573d6000803e3d6000fd5b5050505063ffffffff871660008181526101f0602090815260408083208a1515845282528083203384528252808320859055928252610191905290812054611c0b906001614323565b63ffffffff891660008181526101ef6020908152604080832033808552908352928190208590558051928352908201929092529081018b90528815156060820152608081018290529091507f1393b60b20fc61ac59730bbda202288e21de9c963502cfe81fcb843b427d46e29060a001611653565b60fe54604051636c8d2b9760e01b81526001600160a01b0390911690636c8d2b9790611cb29086908690600401614218565b600060405180830381600087803b158015611ccc57600080fd5b505af1158015611ce0573d6000803e3d6000fd5b50505050610b46838383612178565b611d197fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533611d49565b565b66b1a2bc2ec50000811115611d2f57600080fd5b63ffffffff90911660009081526101306020526040902055565b611d5382826112fb565b610bca57611d6b816001600160a01b03166014612b75565b611d76836020612b75565b604051602001611d879291906141a3565b60408051601f198184030181529082905262461bcd60e51b8252610bb791600401614261565b611db782826112fb565b610bca5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611def3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611e3d82826112fb565b15610bca5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610bca8133610b37565b6000611ef87f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050611f0384612d5e565b600083511180611f105750815b15611f2157611f1f8484612e03565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661145f57805460ff191660011781556040516001600160a01b0383166024820152611fa090869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052612e03565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b0383811691161461203d5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610bb7565b61145f85612eee565b60fe546040516305c8146f60e01b815263ffffffff861660048201526001600160a01b03909116906305c8146f90602401600060405180830381600087803b15801561209157600080fd5b505af11580156120a5573d6000803e3d6000fd5b505050506120b384336123f4565b6001600160a01b03811660009081526101c160209081526040808320338085529083528184205463ffffffff891685526101f08452828520881515865284528285209185529252909120548381018210156121495760405162461bcd60e51b81526020600482015260166024820152756e6f7420656e6f75676820746f20776974686472617760501b6044820152606401610bb7565b506001600160a01b0390911660009081526101c160209081526040808320338452909152902091900390555050565b600082815b8181101561232e5760006121c58787848181106121aa57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906121bf9190613f0f565b86612f2e565b9050801561231b5761019160008888858181106121f257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122079190613f0f565b63ffffffff1663ffffffff168152602001908152602001600020546101c0600089898681811061224757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061225c9190613f0f565b63ffffffff168152602080820192909252604090810160009081206001600160a01b038a1682529092529020556122938185614323565b93507f2f0b57f663333228518fca119813fe0f6daeb5f19d087965f56b45fecf2d5205858888858181106122d757634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122ec9190613f0f565b604080516001600160a01b03909316835263ffffffff9091166020830152810183905260600160405180910390a15b5080612326816145f4565b91505061217d565b50811561145f5761145f8383613352565b600054610100900460ff1680612358575060005460ff16155b6123745760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff16158015612396576000805461ffff19166101011790555b61239e613456565b6123a66134d9565b6123af82613537565b8015610bca576000805461ff00191690555050565b610bca8282611dad565b670de0b6b3a764000081111580156123e65750600081115b6123ef57600080fd5b60fd55565b60006124008383612f2e565b90508015610b465763ffffffff8316600090815261019160209081526040808320546101c083528184206001600160a01b0387168552909252909120556124478282613352565b604080516001600160a01b038416815263ffffffff851660208201529081018290527f2f0b57f663333228518fca119813fe0f6daeb5f19d087965f56b45fecf2d52059060600160405180910390a1505050565b610100546040516324b4085360e21b81523360048201819052916001600160a01b0316906392d0214c90602401600060405180830381600087803b1580156124e257600080fd5b505af11580156124f6573d6000803e3d6000fd5b5050505063ffffffff841660009081526101306020526040812054670de0b6b3a764000090612525908561453c565b61252f9190614391565b60fc5460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925085169063a9059cbb90604401602060405180830381600087803b15801561257f57600080fd5b505af1158015612593573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125b79190613e3a565b506001600160a01b03841663a9059cbb336125d2848761459a565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561261857600080fd5b505af115801561262c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126509190613e3a565b50604080513381526001600160a01b03861660208201529081018490527fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda39060600160405180910390a15050505050565b60fe546001600160a01b03163314611d195760405162461bcd60e51b815260206004820152600d60248201526c1b9bdd08131bdb99d4da1bdc9d609a1b6044820152606401610bb7565b670c7d713b49d9ffff198213801561270a5750670c7d713b49da000082125b6127745760405162461bcd60e51b815260206004820152603560248201527f62616c616e6365496e63656e7469766543757276655f657175696c69627269756044820152746d4f6666736574206f7574206f6620626f756e647360581b6064820152608401610bb7565b600083116127d95760405162461bcd60e51b815260206004820152602c60248201527f62616c616e6365496e63656e7469766543757276655f6578706f6e656e74206f60448201526b7574206f6620626f756e647360a01b6064820152608401610bb7565b606481106128375760405162461bcd60e51b815260206004820152602560248201527f736166654578706f6e656e744269745368696674696e67206f7574206f6620626044820152646f756e647360d81b6064820152608401610bb7565b60fe54604051631678fc4360e31b815263ffffffff86166004820152600060248201819052916001600160a01b03169063b3c7e2189060440160206040518083038186803b15801561288857600080fd5b505afa15801561289c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128c09190613eb8565b60fe54604051631678fc4360e31b815263ffffffff88166004820152600160248201526001600160a01b039091169063b3c7e2189060440160206040518083038186803b15801561291057600080fd5b505afa158015612924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129489190613eb8565b6129529190614323565b90508382612962836101f461453c565b61296d92911c6143eb565b50606481831c116129d05760405162461bcd60e51b815260206004820152602760248201527f626974207368696674696e6720746f6f206c616e676520666f7220746f74616c604482015266081b1bd8dad95960ca1b6064820152608401610bb7565b5063ffffffff909316600090815261013160209081526040808320949094556101328152838220929092556101339091522055565b600080600080612a188a89898989613600565b915091506000612a288b8b6138a9565b9050612a34838261453c565b63ffffffff8c166000908152610192602090815260408083208e8452909152902060010154612a639190614323565b612a6d838361453c565b63ffffffff8d166000908152610192602090815260408083208f8452909152902060020154612a9c9190614323565b94509450505050965096945050505050565b6001600160a01b0381166000908152610162602052604090205463ffffffff16610bf25760405162461bcd60e51b815260206004820152600f60248201526e0dcdee840ecc2d8d2c840e6f2dce8d608b1b6044820152606401610bb7565b63ffffffff821660009081526101ef6020908152604080832033845290915290205415801590612b66575063ffffffff8216600090815261019160209081526040808320546101ef83528184203385529092529091205411155b15610bca57610bca82336123f4565b60606000612b8483600261453c565b612b8f906002614323565b67ffffffffffffffff811115612bb557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612bdf576020820181803683370190505b509050600360fc1b81600081518110612c0857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612c4557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000612c6984600261453c565b612c74906001614323565b90505b6001811115612d08576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612cb657634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110612cda57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93612d01816145dd565b9050612c77565b508315612d575760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610bb7565b9392505050565b803b612dc25760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610bb7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b612e625760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610bb7565b600080846001600160a01b031684604051612e7d9190614187565b600060405180830381855af49150503d8060008114612eb8576040519150601f19603f3d011682016040523d82523d6000602084013e612ebd565b606091505b5091509150612ee5828260405180606001604052806027815260200161467a602791396138d5565b95945050505050565b612ef781612d5e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b63ffffffff821660008181526101346020908152604080832060018452825280832054838052818420546001600160a01b039182168086526101c180865284872089851680895290875285882054949093168088529086528487208388528652848720548888526101c087528588209388529286528487205497875261019190955292852054949592949192909180821415612fd35760009650505050505050611322565b63ffffffff891660009081526101ef602090815260408083206001600160a01b038c168452909152902054801580159061300d5750818111155b156133355761301f8a8686868561390e565b63ffffffff8b1660009081526101f0602090815260408083206001845282528083206001600160a01b038e168452909152902054909850801561313f5760fe54604051630125edfd60e71b815263ffffffff8d1660048201526024810183905260016044820152606481018490526001600160a01b03909116906392f6fe809060840160206040518083038186803b1580156130ba57600080fd5b505afa1580156130ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f29190613eb8565b6130fc9086614323565b9450613108818761459a565b63ffffffff8c1660009081526101f0602090815260408083206001845282528083206001600160a01b038f16845290915281205595505b5063ffffffff8a1660009081526101f06020908152604080832083805282528083206001600160a01b038d168452909152902054801561325b5760fe54604051630125edfd60e71b815263ffffffff8d1660048201526024810183905260006044820152606481018490526001600160a01b03909116906392f6fe809060840160206040518083038186803b1580156131d757600080fd5b505afa1580156131eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061320f9190613eb8565b6132199087614323565b9550613225818661459a565b63ffffffff8c1660009081526101f06020908152604080832083805282528083206001600160a01b038f16845290915281205594505b6001600160a01b0388811660009081526101c1602081815260408084208f86168086529083528185208c9055948c168452918152818320848452815291819020889055805192835263ffffffff8e16918301919091528101879052606081018690527fea2b4628943d2a0a2c85f85b60007fb6f8273d91c0eaff6f8b140a5007637b359060800160405180910390a16132f78b8787858761390e565b613301908a614323565b63ffffffff8c1660009081526101ef602090815260408083206001600160a01b038f16845290915281205598506133459050565b6133428a8686868661390e565b97505b5050505050505092915050565b60ff546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b1580156133a057600080fd5b505af11580156133b4573d6000803e3d6000fd5b505060ff5460fb5460fd546001600160a01b0392831694506340c10f199350911690670de0b6b3a7640000906133ea908661453c565b6133f49190614391565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561343a57600080fd5b505af115801561344e573d6000803e3d6000fd5b505050505050565b600054610100900460ff168061346f575060005460ff16155b61348b5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff161580156134ad576000805461ffff19166101011790555b6134b5613a01565b6134bd613a01565b6134c5613a01565b8015610bf2576000805461ff001916905550565b600054610100900460ff16806134f2575060005460ff16155b61350e5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff161580156134b5576000805461ffff19166101011790556134bd613a01565b600054610100900460ff1680613550575060005460ff16155b61356c5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff1615801561358e576000805461ffff19166101011790555b6001600160a01b0382166135a157600080fd5b6135ac6000836123c4565b6135d67fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775836123c4565b6123af7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3836123c4565b600080600061360e88613a6b565b9050600061361c8587614323565b63ffffffff8a166000908152610132602052604081205491925090671bc16d674ec800009061364c9084906144b9565b6136569190614363565b63ffffffff8b16600090815261013360205260409020549091508761367c8360026144b9565b613686908961455b565b12156137a4578682126136ac57600061369f8a8661453c565b955095505050505061389f565b63ffffffff8b16600090815261013160205260408120546136ce60018461459a565b6136d8858b61455b565b6136e392911c6143eb565b63ffffffff8d16600090815261013160205260408120549192509061370a9086851c6143eb565b9050600081613721846706f05b59d3b2000061453c565b61372b9190614391565b9050600061374182670de0b6b3a764000061459a565b9050670de0b6b3a76400008e6137578a8561453c565b613761919061453c565b61376b9190614391565b670de0b6b3a76400008e61377f8b8561453c565b613789919061453c565b6137939190614391565b99509950505050505050505061389f565b876137ae8361460f565b126137cc576137bd8a8561453c565b6000955095505050505061389f565b63ffffffff8b16600090815261013160205260408120546137ee60018461459a565b6137f8858c6142e2565b61380392911c6143eb565b63ffffffff8d16600090815261013160205260408120549192509061382a9086851c6143eb565b9050600081613841846706f05b59d3b2000061453c565b61384b9190614391565b9050600061386182670de0b6b3a764000061459a565b9050670de0b6b3a76400008e6138778a8461453c565b613881919061453c565b61388b9190614391565b670de0b6b3a76400008e61377f8b8661453c565b9550959350505050565b63ffffffff8216600090815261019260209081526040808320848452909152812054612d57904261459a565b606083156138e4575081612d57565b8251156138f45782518084602001fd5b8160405162461bcd60e51b8152600401610bb79190614261565b600084156139855763ffffffff86166000908152610192602090815260408083208684529091528082206001908101548584529183200154613950919061459a565b90506cd73d4c35b9df8aa7d6c3003573602c1b61396d878361453c565b6139779190614391565b6139819083614323565b9150505b8315612ee55763ffffffff861660009081526101926020908152604080832086845290915280822060029081015485845291832001546139c5919061459a565b90506cd73d4c35b9df8aa7d6c3003573602c1b6139e2868361453c565b6139ec9190614391565b6139f69083614323565b979650505050505050565b600054610100900460ff1680613a1a575060005460ff16155b613a365760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff161580156134c5576000805461ffff19166101011790558015610bf2576000805461ff001916905550565b6000806000613a7984613b2e565b91509150670de0b6b3a7640000811015613aa357634e487b7160e01b600052600160045260246000fd5b63ffffffff841660009081526101926020908152604080832083805290915290205482613ad0824261459a565b1015613b1b5782613ae1824261459a565b613af3670de0b6b3a76400008561459a565b613afd919061453c565b613b079190614391565b613b11908361459a565b9350505050610ac5565b670de0b6b3a76400009350505050610ac5565b63ffffffff8116600090815261012e602090815260408083205461012f90925290912054670de0b6b3a7640000811015613b6d5750670de0b6b3a76400005b915091565b80356001600160a01b0381168114610ac557600080fd5b60008083601f840112613b9a578081fd5b50813567ffffffffffffffff811115613bb1578182fd5b6020830191508360208260051b8501011115613bcc57600080fd5b9250929050565b803563ffffffff81168114610ac557600080fd5b600060208284031215613bf8578081fd5b612d5782613b72565b60008060408385031215613c13578081fd5b613c1c83613b72565b9150613c2a60208401613b72565b90509250929050565b600080600080600080600080610100898b031215613c4f578384fd5b613c5889613b72565b9750613c6660208a01613b72565b9650613c7460408a01613b72565b9550613c8260608a01613b72565b9450613c9060808a01613b72565b9350613c9e60a08a01613b72565b925060c08901359150613cb360e08a01613b72565b90509295985092959890939650565b60008060408385031215613cd4578182fd5b613cdd83613b72565b9150602083013567ffffffffffffffff80821115613cf9578283fd5b818501915085601f830112613d0c578283fd5b813581811115613d1e57613d1e614655565b604051601f8201601f19908116603f01168101908382118183101715613d4657613d46614655565b81604052828152886020848701011115613d5e578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215613d91578182fd5b613d9a83613b72565b946020939093013593505050565b60008060208385031215613dba578182fd5b823567ffffffffffffffff811115613dd0578283fd5b613ddc85828601613b89565b90969095509350505050565b600080600060408486031215613dfc578283fd5b833567ffffffffffffffff811115613e12578384fd5b613e1e86828701613b89565b9094509250613e31905060208501613b72565b90509250925092565b600060208284031215613e4b578081fd5b8151612d578161466b565b600060208284031215613e67578081fd5b5035919050565b60008060408385031215613e80578182fd5b82359150613c2a60208401613b72565b600060208284031215613ea1578081fd5b81356001600160e01b031981168114612d57578182fd5b600060208284031215613ec9578081fd5b5051919050565b600080600060608486031215613ee4578081fd5b83359250613ef460208501613bd3565b91506040840135613f048161466b565b809150509250925092565b600060208284031215613f20578081fd5b612d5782613bd3565b60008060408385031215613f3b578182fd5b613c1c83613bd3565b600080600080600080600080610100898b031215613f60578182fd5b613f6989613bd3565b9750613f7760208a01613b72565b9650613f8560408a01613b72565b979a96995096976060810135975060808101359660a0820135965060c0820135955060e0909101359350915050565b60008060408385031215613fc6578182fd5b613fcf83613bd3565b91506020830135613fdf8161466b565b809150509250929050565b600080600060608486031215613ffe578081fd5b61400784613bd3565b925060208401356140178161466b565b9150613e3160408501613b72565b600080600060608486031215614039578081fd5b61404284613bd3565b925060208401356140528161466b565b929592945050506040919091013590565b60008060008060008060008060006101208a8c031215614081578283fd5b61408a8a613bd3565b985060208a013561409a8161466b565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013560ff811681146140cb578384fd5b8093505060e08a013591506101008a013590509295985092959850929598565b600080604083850312156140fd578182fd5b613d9a83613bd3565b6000806000806080858703121561411b578182fd5b61412485613bd3565b966020860135965060408601359560600135945092505050565b60008060008060008060c08789031215614156578384fd5b61415f87613bd3565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b600082516141998184602087016145b1565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516141db8160178501602088016145b1565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161420c8160288401602088016145b1565b01602801949350505050565b60208082528181018390526000908460408401835b868110156142565763ffffffff61424384613bd3565b168252918301919083019060010161422d565b509695505050505050565b60006020825282518060208401526142808160408501602087016145b1565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600080821280156001600160ff1b038490038513161561430457614304614629565b600160ff1b839003841281161561431d5761431d614629565b50500190565b6000821982111561433657614336614629565b500190565b600063ffffffff80831681851680830382111561435a5761435a614629565b01949350505050565b6000826143725761437261463f565b600160ff1b82146000198414161561438c5761438c614629565b500590565b6000826143a0576143a061463f565b500490565b80825b60018086116143b757506143e2565b8187048211156143c9576143c9614629565b808616156143d657918102915b9490941c9380026143a8565b94509492505050565b6000612d57600019848460008261440457506001612d57565b8161441157506000612d57565b816001811461442757600281146144315761445e565b6001915050612d57565b60ff84111561444257614442614629565b6001841b91508482111561445857614458614629565b50612d57565b5060208310610133831016604e8410600b8410161715614491575081810a8381111561448c5761448c614629565b612d57565b61449e84848460016143a5565b8086048211156144b0576144b0614629565b02949350505050565b60006001600160ff1b03818413828413808216868404861116156144df576144df614629565b600160ff1b848712828116878305891216156144fd576144fd614629565b85871292508782058712848416161561451857614518614629565b8785058712818416161561452e5761452e614629565b505050929093029392505050565b600081600019048311821515161561455657614556614629565b500290565b60008083128015600160ff1b85018412161561457957614579614629565b6001600160ff1b038401831381161561459457614594614629565b50500390565b6000828210156145ac576145ac614629565b500390565b60005b838110156145cc5781810151838201526020016145b4565b838111156119d25750506000910152565b6000816145ec576145ec614629565b506000190190565b600060001982141561460857614608614629565b5060010190565b6000600160ff1b82141561462557614625614629565b0390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610bf257600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b175c49c6bf4f04d46105468d1265f2a92d0e33399c8a2812fa6620a61cf51d064736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": { + "addNewStakingFund(uint32,address,address,uint256,uint256,uint256,uint256,int256)": { + "params": { + "_balanceIncentiveCurve_equilibriumOffset": "Offset for balance curve (see _calculateFloatPerSecond)", + "_balanceIncentiveCurve_exponent": "Exponent for balance curve (see _calculateFloatPerSecond)", + "kInitialMultiplier": "Initial boost on float generation for the market.", + "kPeriod": "Period which the boost should last.", + "longToken": "Address of the long token for the market.", + "marketIndex": "Identifies the market.", + "shortToken": "Address of the short token for the market.", + "unstakeFee_e18": "Percentage of tokens that are levied on unstaking in base 1e18." + } + }, + "changeBalanceIncentiveParameters(uint32,uint256,int256,uint256)": { + "params": { + "_balanceIncentiveCurve_equilibriumOffset": "The new offset.", + "_balanceIncentiveCurve_exponent": "The new exponent for the curve.", + "_safeExponentBitShifting": "The new bitshifting applied to the curve.", + "marketIndex": "Identifies the market." + } + }, + "changeFloatPercentage(uint256)": { + "params": { + "newFloatPercentage": "The new float percentage in base 1e18." + } + }, + "changeUnstakeFee(uint32,uint256)": { + "params": { + "marketIndex": "Identifies the market.", + "newMarketUnstakeFee_e18": "The new unstake fee." + } + }, + "claimFloatCustom(uint32[])": { + "params": { + "marketIndexes": "Identifiers for the markets for which to mint float." + } + }, + "claimFloatCustomFor(uint32[],address)": { + "params": { + "marketIndexes": "Identifiers for the markets for which to mint float.", + "user": "The address of the user." + } + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,address,address,address,address,address,uint256,address)": { + "details": "Calls OpenZeppelin's initializer modifier.", + "params": { + "_admin": "Address of the admin role.", + "_floatCapital": "Address of the contract which earns a fixed percentage of Float.", + "_floatPercentage": "Determines the float percentage that gets minted for Float Capital, base 1e18.", + "_floatToken": "Address of the Float token earned by staking.", + "_floatTreasury": "Address of the treasury contract for managing fees.", + "_longShort": "Address of the LongShort contract, a deployed LongShort.sol" + } + }, + "pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(uint32,uint256,uint256,uint256,uint256,uint256)": { + "params": { + "longPrice": "The price of the long token as defined in LongShort.sol", + "longValue": "The value locked in the long side of the market.", + "marketIndex": "An identifier for the market.", + "marketUpdateIndex": "Current update index in the LongShort contract for this market.", + "shortPrice": "The price of the short token as defined in LongShort.sol", + "shortValue": "The value locked in the short side of the market." + } + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "shiftTokens(uint256,uint32,bool)": { + "params": { + "amountSyntheticTokensToShift": "Amount of tokens to shift.", + "isShiftFromLong": "Whether the shift is from long to short or short to long.", + "marketIndex": "Identifier for the market." + } + }, + "stakeFromUser(address,uint256)": { + "params": { + "amount": "Amount to stake.", + "from": "Address to stake for." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "withdraw(uint32,bool,uint256)": { + "params": { + "amount": "Amount to withdraw.", + "isWithdrawFromLong": "is synthetic token to be withdrawn long or short", + "marketIndex": "Market index of staked synthetic token" + } + }, + "withdrawAll(uint32,bool)": { + "params": { + "isWithdrawFromLong": "is synthetic token to be withdrawn long or short", + "marketIndex": "Market index of staked synthetic token" + } + } + }, + "stateVariables": { + "userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom": { + "details": "marketIndex => usersAddress => amountUserRequestedToShiftAwayFromLongOnNextUpdate" + }, + "userNextPrice_paymentToken_depositAmount": { + "details": "marketIndex => usersAddress => stakedActionIndex" + }, + "userNextPrice_stakedActionIndex": { + "details": "marketIndex => usersAddress => stakedActionIndex" + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addNewStakingFund(uint32,address,address,uint256,uint256,uint256,uint256,int256)": { + "notice": "Sets this contract to track staking for a market in LongShort.sol" + }, + "changeBalanceIncentiveParameters(uint32,uint256,int256,uint256)": { + "notice": "Changes the balance incentive exponent for a market" + }, + "changeFloatPercentage(uint256)": { + "notice": "Changes percentage of float that is minted for float capital." + }, + "changeUnstakeFee(uint32,uint256)": { + "notice": "Changes unstake fee for a market" + }, + "claimFloatCustom(uint32[])": { + "notice": "Mints outstanding float for msg.sender." + }, + "claimFloatCustomFor(uint32[],address)": { + "notice": "Mints outstanding float on behalf of another user." + }, + "initialize(address,address,address,address,address,address,uint256,address)": { + "notice": "Initializes the contract." + }, + "pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(uint32,uint256,uint256,uint256,uint256,uint256)": { + "notice": "Adds new accumulativeIssuancePerStakedSynthSnapshots for the given long/short tokens. Called by the ILongShort contract whenever there is a state change for a market." + }, + "shiftTokens(uint256,uint32,bool)": { + "notice": "Allows users to shift their staked tokens from one side of the market to the other at the next price." + }, + "stakeFromUser(address,uint256)": { + "notice": "A user with synthetic tokens stakes by calling stake on the token contract which calls this function. We need to first update the state of the LongShort contract for this market before staking to correctly calculate user rewards." + }, + "withdraw(uint32,bool,uint256)": { + "notice": "Withdraw function. Allows users to unstake." + }, + "withdrawAll(uint32,bool)": { + "notice": "Allows users to withdraw their entire stake for a token." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/Staker.sol:Staker", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/Staker.sol:Staker", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/Staker.sol:Staker", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/Staker.sol:Staker", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/Staker.sol:Staker", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/Staker.sol:Staker", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/Staker.sol:Staker", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/Staker.sol:Staker", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 13326, + "contract": "contracts/Staker.sol:Staker", + "label": "floatCapital", + "offset": 0, + "slot": "251", + "type": "t_address" + }, + { + "astId": 13328, + "contract": "contracts/Staker.sol:Staker", + "label": "floatTreasury", + "offset": 0, + "slot": "252", + "type": "t_address" + }, + { + "astId": 13330, + "contract": "contracts/Staker.sol:Staker", + "label": "floatPercentage", + "offset": 0, + "slot": "253", + "type": "t_uint256" + }, + { + "astId": 13332, + "contract": "contracts/Staker.sol:Staker", + "label": "longShort", + "offset": 0, + "slot": "254", + "type": "t_address" + }, + { + "astId": 13334, + "contract": "contracts/Staker.sol:Staker", + "label": "floatToken", + "offset": 0, + "slot": "255", + "type": "t_address" + }, + { + "astId": 13336, + "contract": "contracts/Staker.sol:Staker", + "label": "gems", + "offset": 0, + "slot": "256", + "type": "t_address" + }, + { + "astId": 13340, + "contract": "contracts/Staker.sol:Staker", + "label": "__globalStateGap", + "offset": 0, + "slot": "257", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 13344, + "contract": "contracts/Staker.sol:Staker", + "label": "marketLaunchIncentive_period", + "offset": 0, + "slot": "302", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 13348, + "contract": "contracts/Staker.sol:Staker", + "label": "marketLaunchIncentive_multipliers", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 13352, + "contract": "contracts/Staker.sol:Staker", + "label": "marketUnstakeFee_e18", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 13356, + "contract": "contracts/Staker.sol:Staker", + "label": "balanceIncentiveCurve_exponent", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 13360, + "contract": "contracts/Staker.sol:Staker", + "label": "balanceIncentiveCurve_equilibriumOffset", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_uint32,t_int256)" + }, + { + "astId": 13364, + "contract": "contracts/Staker.sol:Staker", + "label": "safeExponentBitShifting", + "offset": 0, + "slot": "307", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 13370, + "contract": "contracts/Staker.sol:Staker", + "label": "syntheticTokens", + "offset": 0, + "slot": "308", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_address))" + }, + { + "astId": 13374, + "contract": "contracts/Staker.sol:Staker", + "label": "__marketStateGap", + "offset": 0, + "slot": "309", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 13378, + "contract": "contracts/Staker.sol:Staker", + "label": "marketIndexOfToken", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_address,t_uint32)" + }, + { + "astId": 13382, + "contract": "contracts/Staker.sol:Staker", + "label": "userNonce", + "offset": 0, + "slot": "355", + "type": "t_mapping(t_address,t_uint32)" + }, + { + "astId": 13386, + "contract": "contracts/Staker.sol:Staker", + "label": "__synthStateGap", + "offset": 0, + "slot": "356", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 13390, + "contract": "contracts/Staker.sol:Staker", + "label": "latestRewardIndex", + "offset": 0, + "slot": "401", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 13397, + "contract": "contracts/Staker.sol:Staker", + "label": "accumulativeFloatPerSyntheticTokenSnapshots", + "offset": 0, + "slot": "402", + "type": "t_mapping(t_uint32,t_mapping(t_uint256,t_struct(AccumulativeIssuancePerStakedSynthSnapshot)13404_storage))" + }, + { + "astId": 13408, + "contract": "contracts/Staker.sol:Staker", + "label": "__rewardStateGap", + "offset": 0, + "slot": "403", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 13414, + "contract": "contracts/Staker.sol:Staker", + "label": "userIndexOfLastClaimedReward", + "offset": 0, + "slot": "448", + "type": "t_mapping(t_uint32,t_mapping(t_address,t_uint256))" + }, + { + "astId": 13421, + "contract": "contracts/Staker.sol:Staker", + "label": "userAmountStaked", + "offset": 0, + "slot": "449", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 13425, + "contract": "contracts/Staker.sol:Staker", + "label": "__userStateGap", + "offset": 0, + "slot": "450", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 13432, + "contract": "contracts/Staker.sol:Staker", + "label": "userNextPrice_stakedActionIndex", + "offset": 0, + "slot": "495", + "type": "t_mapping(t_uint32,t_mapping(t_address,t_uint256))" + }, + { + "astId": 13441, + "contract": "contracts/Staker.sol:Staker", + "label": "userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom", + "offset": 0, + "slot": "496", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))" + }, + { + "astId": 13450, + "contract": "contracts/Staker.sol:Staker", + "label": "userNextPrice_paymentToken_depositAmount", + "offset": 0, + "slot": "497", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_int256": { + "encoding": "inplace", + "label": "int256", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_address,t_uint32)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" + }, + "t_mapping(t_bool,t_address)": { + "encoding": "mapping", + "key": "t_bool", + "label": "mapping(bool => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bool,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_bool", + "label": "mapping(bool => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_mapping(t_uint256,t_struct(AccumulativeIssuancePerStakedSynthSnapshot)13404_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct Staker.AccumulativeIssuancePerStakedSynthSnapshot)", + "numberOfBytes": "32", + "value": "t_struct(AccumulativeIssuancePerStakedSynthSnapshot)13404_storage" + }, + "t_mapping(t_uint32,t_int256)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => int256)", + "numberOfBytes": "32", + "value": "t_int256" + }, + "t_mapping(t_uint32,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_uint32,t_mapping(t_bool,t_address))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(bool => address))", + "numberOfBytes": "32", + "value": "t_mapping(t_bool,t_address)" + }, + "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(bool => mapping(address => uint256)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bool,t_mapping(t_address,t_uint256))" + }, + "t_mapping(t_uint32,t_mapping(t_uint256,t_struct(AccumulativeIssuancePerStakedSynthSnapshot)13404_storage))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(uint256 => struct Staker.AccumulativeIssuancePerStakedSynthSnapshot))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(AccumulativeIssuancePerStakedSynthSnapshot)13404_storage)" + }, + "t_mapping(t_uint32,t_uint256)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(AccumulativeIssuancePerStakedSynthSnapshot)13404_storage": { + "encoding": "inplace", + "label": "struct Staker.AccumulativeIssuancePerStakedSynthSnapshot", + "members": [ + { + "astId": 13399, + "contract": "contracts/Staker.sol:Staker", + "label": "timestamp", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 13401, + "contract": "contracts/Staker.sol:Staker", + "label": "accumulativeFloatPerSyntheticToken_long", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 13403, + "contract": "contracts/Staker.sol:Staker", + "label": "accumulativeFloatPerSyntheticToken_short", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "numberOfBytes": "96" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/Staker.sol:Staker", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/Staker.sol:Staker", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/Staker_Proxy.json b/deployments/mumbai/Staker_Proxy.json new file mode 100644 index 0000000..180bf06 --- /dev/null +++ b/deployments/mumbai/Staker_Proxy.json @@ -0,0 +1,147 @@ +{ + "address": "0xe058C1679D34fd291B06124F16AF70e88dFB8422", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x764332345d7c427ddff739b913930aeb8b8d58ffd61c5450afd041f38b3e7569", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xe058C1679D34fd291B06124F16AF70e88dFB8422", + "transactionIndex": 0, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000410000000000000000000000000000000000000000000000000000000000000000008000002000000000000000002000000000000000000000000000000002800000200000000000040100000000000000000000000000001000000000000000000000000000000080000200000000000000000000000000000000000000000000000000000000000000000000000008200000000000000000000000000000000000000000000000000040000000004000000020000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000400000000000000000000100000", + "blockHash": "0x3ed0bf1d2ab226b2bb73e4f7b8c44ae873a8dd177f3d339234be2af40296819f", + "transactionHash": "0x764332345d7c427ddff739b913930aeb8b8d58ffd61c5450afd041f38b3e7569", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18868832, + "transactionHash": "0x764332345d7c427ddff739b913930aeb8b8d58ffd61c5450afd041f38b3e7569", + "address": "0xe058C1679D34fd291B06124F16AF70e88dFB8422", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000002c3ce1d1debb4771e3a8e824a7830fbfd6ca1b34" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x3ed0bf1d2ab226b2bb73e4f7b8c44ae873a8dd177f3d339234be2af40296819f" + }, + { + "transactionIndex": 0, + "blockNumber": 18868832, + "transactionHash": "0x764332345d7c427ddff739b913930aeb8b8d58ffd61c5450afd041f38b3e7569", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000002a41c347bf60000000000000000000000000000000000000000000000000008875d085901fecd000000000000000000000000000000000000000000000168e574f7c2a556b8a30000000000000000000000000000000000000000000000000884b8ec248608cd000000000000000000000000000000000000000000000168e5779bded9d2aea3", + "logIndex": 1, + "blockHash": "0x3ed0bf1d2ab226b2bb73e4f7b8c44ae873a8dd177f3d339234be2af40296819f" + } + ], + "blockNumber": 18868832, + "cumulativeGasUsed": "247797", + "status": 1, + "byzantium": true + }, + "args": [ + "0x2C3Ce1D1DEbb4771e3A8e824A7830fbFd6Ca1b34", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/TokenFactory.json b/deployments/mumbai/TokenFactory.json new file mode 100644 index 0000000..61f63c5 --- /dev/null +++ b/deployments/mumbai/TokenFactory.json @@ -0,0 +1,151 @@ +{ + "address": "0x1347C5c4A5c582FB3EFC7D82aF3C451167739e22", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_longShort", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "syntheticName", + "type": "string" + }, + { + "internalType": "string", + "name": "syntheticSymbol", + "type": "string" + }, + { + "internalType": "address", + "name": "staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + } + ], + "name": "createSyntheticToken", + "outputs": [ + { + "internalType": "address", + "name": "syntheticToken", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x706554ea063a7a01f565bcff835c7965e247217ed08f687eddaa359b14ff1a91", + "receipt": { + "to": null, + "from": "0x2740EA9F72B23372621D8D718F52609b80c24E61", + "contractAddress": "0x1347C5c4A5c582FB3EFC7D82aF3C451167739e22", + "transactionIndex": 1, + "gasUsed": "2241515", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000020000000000000000000000000000000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000100000000000000000100000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x61aedf947354be0e6976c9c38f4d4d6969c4a54fb6f01e26773327ccc59b6525", + "transactionHash": "0x706554ea063a7a01f565bcff835c7965e247217ed08f687eddaa359b14ff1a91", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 18868852, + "transactionHash": "0x706554ea063a7a01f565bcff835c7965e247217ed08f687eddaa359b14ff1a91", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000017e3f024004a00000000000000000000000000000000000000000000000000545987411b4bbba3000000000000000000000000000000000000000000000168e6fa398097080ca30000000000000000000000000000000000000000000000005441a350f74b71a3000000000000000000000000000000000000000000000168e7121d70bb0856a3", + "logIndex": 3, + "blockHash": "0x61aedf947354be0e6976c9c38f4d4d6969c4a54fb6f01e26773327ccc59b6525" + } + ], + "blockNumber": 18868852, + "cumulativeGasUsed": "2695518", + "status": 1, + "byzantium": true + }, + "args": [ + "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"syntheticName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"syntheticSymbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isLong\",\"type\":\"bool\"}],\"name\":\"createSyntheticToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"syntheticToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_longShort\":\"address of the longShort contract\"}},\"createSyntheticToken(string,string,address,uint32,bool)\":{\"params\":{\"isLong\":\"boolean denoting if the synthetic token is long or short\",\"marketIndex\":\"market index this synthetic token belongs to\",\"staker\":\"address of the staker contract\",\"syntheticName\":\"name of the synthetic token\",\"syntheticSymbol\":\"ticker symbol of the synthetic token\"},\"returns\":{\"syntheticToken\":\"- address of the created synthetic token\"}}},\"title\":\"TokenFactory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"sets the address of the longShort contract on initialization\"},\"createSyntheticToken(string,string,address,uint32,bool)\":{\"notice\":\"creates and sets up a new synthetic token\"},\"longShort()\":{\"notice\":\"address of long short contract\"}},\"notice\":\"contract is used to reliably mint the synthetic tokens used by the float protocol.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/TokenFactory.sol\":\"TokenFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\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, _msgSender());\\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(IAccessControl).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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x183481af1c40d2efb26b86f63d6fe9e22f24c87e436d60a69f261b38500e7cd6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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\":\"0xfe0edb09653ed10e8a1bfe03eb9b0ff06775666eee817a95bd3d0799f1ee2b44\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0xf98cb1651a90d20ef77d8c1dd10d5fce4954e747603e5672a8292bd4368120dd\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20Permit.sol\\\";\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../../../utils/Counters.sol\\\";\\n\\n/**\\n * @dev Implementation 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 *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\\n using Counters for Counters.Counter;\\n\\n mapping(address => Counters.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private immutable _PERMIT_TYPEHASH =\\n keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n constructor(string memory name) EIP712(name, \\\"1\\\") {}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\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 ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSA.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n Counters.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n}\\n\",\"keccak256\":\"0x7ce4684ee1fac31ee5671df82b30c10bd2ebf88add2f63524ed00618a8486907\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x3aab711a5f9a5a5a394191e928cc8258e8a243e855bb0275e7834f9686383277\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary Counters {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x78450f4e3b722cce467b21e285f72ce5eaf361e9ba9dd2241a413926246773cd\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x391d3ba97ab6856a16b225d6ee29617ad15ff00db70f3b4df1ab5ea33aa47c9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xbc991a1cf357ce19480831a40792c814238a3b5458134703682abd8aa39719fb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSA.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n /* solhint-disable var-name-mixedcase */\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\\n uint256 private immutable _CACHED_CHAIN_ID;\\n\\n bytes32 private immutable _HASHED_NAME;\\n bytes32 private immutable _HASHED_VERSION;\\n bytes32 private immutable _TYPE_HASH;\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor(string memory name, string memory version) {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n bytes32 typeHash = keccak256(\\n \\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"\\n );\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n _CACHED_CHAIN_ID = block.chainid;\\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\\n _TYPE_HASH = typeHash;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n if (block.chainid == _CACHED_CHAIN_ID) {\\n return _CACHED_DOMAIN_SEPARATOR;\\n } else {\\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\\n }\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n}\\n\",\"keccak256\":\"0xba18d725602452307e5b278ed4566616c63792d89f3a0388a6f285428c26e681\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0x5718c5df9bd67ac68a796961df938821bb5dc0cd4c6118d77e9145afb187409b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xa28007762d9da9db878dd421960c8cb9a10471f47ab5c1b3309bfe48e9e79ff4\",\"license\":\"MIT\"},\"contracts/SyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol\\\";\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n@dev Logic for price tracking contained in LongShort.sol. \\n The contract inherits from ERC20PresetMinterPauser.sol\\n*/\\ncontract SyntheticToken is ISyntheticToken, ERC20, ERC20Burnable, AccessControl, ERC20Permit {\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n\\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\\n address public immutable longShort;\\n /// @notice Address of the Staker contract, a deployed Staker.sol\\n address public immutable staker;\\n /// @notice Identifies which market in longShort the token is for.\\n uint32 public immutable marketIndex;\\n /// @notice Whether the token is a long token or short token for its market.\\n bool public immutable isLong;\\n\\n /// @notice Creates an instance of the contract.\\n /// @dev Should only be called by TokenFactory.sol for our system.\\n /// @param name The name of the token.\\n /// @param symbol The symbol for the token.\\n /// @param _longShort Address of the core LongShort contract.\\n /// @param _staker Address of the staker contract.\\n /// @param _marketIndex Which market the token is for.\\n /// @param _isLong Whether the token is long or short for its market.\\n constructor(\\n string memory name,\\n string memory symbol,\\n address _longShort,\\n address _staker,\\n uint32 _marketIndex,\\n bool _isLong\\n ) ERC20(name, symbol) ERC20Permit(name) {\\n longShort = _longShort;\\n staker = _staker;\\n marketIndex = _marketIndex;\\n isLong = _isLong;\\n\\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\\n _setupRole(MINTER_ROLE, _longShort);\\n }\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n /// @dev Core staking logic contained in Staker.sol\\n /// @param amount Amount to stake in wei.\\n function stake(uint256 amount) external override {\\n // NOTE: this is safe, this function will throw \\\"ERC20: transfer\\n // amount exceeds balance\\\" if amount exceeds users balance.\\n super._transfer(msg.sender, address(staker), amount);\\n\\n IStaker(staker).stakeFromUser(msg.sender, amount);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 FUNCTIONS INHERITED BY ERC20PresetMinterPauser \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function totalSupply() public view virtual override(ERC20, ISyntheticToken) returns (uint256) {\\n return ERC20.totalSupply();\\n }\\n\\n /** \\n @notice Mints a number of synthetic tokens for an address.\\n @dev Can only be called by addresses with a minter role. \\n This should correspond to the Long Short contract.\\n @param to The address for which to mint the tokens for.\\n @param amount Amount of synthetic tokens to mint in wei.\\n */\\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\\n /// @param amount The amount of tokens to burn in wei.\\n function burn(uint256 amount) public override(ERC20Burnable, ISyntheticToken) {\\n require(msg.sender == longShort, \\\"Only LongShort contract\\\");\\n super._burn(_msgSender(), amount);\\n }\\n\\n /** \\n @notice Overrides the default ERC20 transferFrom.\\n @dev To allow users to avoid approving LongShort when redeeming tokens,\\n longShort has a virtual infinite allowance.\\n @param sender User for which to transfer tokens.\\n @param recipient Recipient of the transferred tokens.\\n @param amount Amount of tokens to transfer in wei.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public override(ERC20, ISyntheticToken) returns (bool) {\\n if (recipient == longShort && msg.sender == longShort) {\\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\\n ERC20._transfer(sender, recipient, amount);\\n return true;\\n } else {\\n return ERC20.transferFrom(sender, recipient, amount);\\n }\\n }\\n\\n function transfer(address recipient, uint256 amount)\\n public\\n virtual\\n override(ERC20, ISyntheticToken)\\n returns (bool)\\n {\\n return ERC20.transfer(recipient, amount);\\n }\\n\\n /** \\n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\\n tokens from next price actions before any token transfer occurs.\\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\\n @param sender User for which tokens are to be transferred for.\\n */\\n function _beforeTokenTransfer(\\n address sender,\\n address to,\\n uint256 amount\\n ) internal override {\\n if (sender != longShort) {\\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\\n }\\n super._beforeTokenTransfer(sender, to, amount);\\n }\\n\\n /** \\n @notice Gets the synthetic token balance of the user in wei.\\n @dev To automatically account for next price actions which have been confirmed but not settled,\\n includes any outstanding tokens owed by longShort.\\n @param account The address for which to get the balance of.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return\\n ERC20.balanceOf(account) +\\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\\n account,\\n marketIndex,\\n isLong\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf0b0c616469076573a355e08d656a04100a29557c4e29616ec86a8ad577a7e17\",\"license\":\"BUSL-1.1\"},\"contracts/TokenFactory.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./SyntheticToken.sol\\\";\\nimport \\\"./interfaces/ITokenFactory.sol\\\";\\n\\n/// @title TokenFactory\\n/// @notice contract is used to reliably mint the synthetic tokens used by the float protocol.\\ncontract TokenFactory is ITokenFactory {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 STATE \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice address of long short contract\\n address public immutable longShort;\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MODIFIERS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @dev only allow longShort contract to call this function\\n modifier onlyLongShort() {\\n require(msg.sender == address(longShort));\\n _;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 SET-UP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice sets the address of the longShort contract on initialization\\n /// @param _longShort address of the longShort contract\\n constructor(address _longShort) {\\n longShort = _longShort;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 TOKEN CREATION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice creates and sets up a new synthetic token\\n /// @param syntheticName name of the synthetic token\\n /// @param syntheticSymbol ticker symbol of the synthetic token\\n /// @param staker address of the staker contract\\n /// @param marketIndex market index this synthetic token belongs to\\n /// @param isLong boolean denoting if the synthetic token is long or short\\n /// @return syntheticToken - address of the created synthetic token\\n function createSyntheticToken(\\n string calldata syntheticName,\\n string calldata syntheticSymbol,\\n address staker,\\n uint32 marketIndex,\\n bool isLong\\n ) external override onlyLongShort returns (address syntheticToken) {\\n syntheticToken = address(\\n new SyntheticToken(syntheticName, syntheticSymbol, longShort, staker, marketIndex, isLong)\\n );\\n }\\n}\\n\",\"keccak256\":\"0x0600dbd499020b37473edbd2412fb40f4fdd816f16910685a3c5f58b43063232\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ITokenFactory.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ITokenFactory {\\n function createSyntheticToken(\\n string calldata syntheticName,\\n string calldata syntheticSymbol,\\n address staker,\\n uint32 marketIndex,\\n bool isLong\\n ) external returns (address);\\n}\\n\",\"keccak256\":\"0x90e4adf1a78ded36d804731a69137b3a4b6c4a6e9c9af46c7ccfa8d91b976e2e\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60a060405234801561001057600080fd5b5060405161285238038061285283398101604081905261002f91610044565b60601b6001600160601b031916608052610072565b600060208284031215610055578081fd5b81516001600160a01b038116811461006b578182fd5b9392505050565b60805160601c6127b761009b600039600081816040015281816099015260c901526127b76000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063299498721461003b578063e6d304671461007e575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b61006261008c36600461019a565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100c357600080fd5b878787877f00000000000000000000000000000000000000000000000000000000000000008888886040516100f790610131565b610108989796959493929190610279565b604051809103906000f080158015610124573d6000803e3d6000fd5b5098975050505050505050565b6124a8806102da83390190565b8035801515811461014e57600080fd5b919050565b60008083601f840112610164578182fd5b50813567ffffffffffffffff81111561017b578182fd5b60208301915083602082850101111561019357600080fd5b9250929050565b600080600080600080600060a0888a0312156101b4578283fd5b873567ffffffffffffffff808211156101cb578485fd5b6101d78b838c01610153565b909950975060208a01359150808211156101ef578485fd5b506101fc8a828b01610153565b90965094505060408801356001600160a01b038116811461021b578384fd5b9250606088013563ffffffff81168114610233578283fd5b91506102416080890161013e565b905092959891949750929550565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b600060c0825261028d60c083018a8c61024f565b82810360208401526102a081898b61024f565b6001600160a01b0397881660408501529590961660608301525063ffffffff929092166080830152151560a0909101529594505050505056fe6101c06040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b50604051620024a8380380620024a88339810160408190526200005a91620003de565b8580604051806040016040528060018152602001603160f81b815250888881600390805190602001906200009092919062000268565b508051620000a690600490602084019062000268565b5050825160208085019190912083518483012060c082815260e08290524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301889052606082018790526080820194909452308184015281518082039093018352909301909252815191909401209193509190608052610100525050506001600160601b0319606087811b82166101405286901b166101605250506001600160e01b031960e083901b166101805280151560f81b6101a0526200017c600085620001b4565b620001a87f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a685620001b4565b505050505050620004f2565b620001c08282620001c4565b5050565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff16620001c05760008281526005602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002243390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b82805462000276906200049f565b90600052602060002090601f0160209004810192826200029a5760008555620002e5565b82601f10620002b557805160ff1916838001178555620002e5565b82800160010185558215620002e5579182015b82811115620002e5578251825591602001919060010190620002c8565b50620002f3929150620002f7565b5090565b5b80821115620002f35760008155600101620002f8565b80516001600160a01b03811681146200032657600080fd5b919050565b600082601f8301126200033c578081fd5b81516001600160401b0380821115620003595762000359620004dc565b604051601f8301601f19908116603f01168101908282118183101715620003845762000384620004dc565b81604052838152602092508683858801011115620003a0578485fd5b8491505b83821015620003c35785820183015181830184015290820190620003a4565b83821115620003d457848385830101525b9695505050505050565b60008060008060008060c08789031215620003f7578182fd5b86516001600160401b03808211156200040e578384fd5b6200041c8a838b016200032b565b9750602089015191508082111562000432578384fd5b506200044189828a016200032b565b95505062000452604088016200030e565b935062000462606088016200030e565b9250608087015163ffffffff811681146200047b578283fd5b60a0880151909250801515811462000491578182fd5b809150509295509295509295565b600181811c90821680620004b457607f821691505b60208210811415620004d657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160a05160c05160e05161010051610120516101405160601c6101605160601c6101805160e01c6101a05160f81c611ee1620005c76000396000818161024a015261085b0152600081816103be01528181610834015261161a01526000818161035e01528181610a9d0152610ade0152600081816102a7015281816105cd015281816106120152818161079601528181610886015281816115bf015261164101526000610ba5015260006111c601526000611215015260006111f0015260006111720152600061119b0152611ee16000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80635ebaf1db11610104578063a217fddf116100a2578063d505accf11610071578063d505accf14610451578063d539139314610464578063d547741f1461048b578063dd62ed3e1461049e576101da565b8063a217fddf14610410578063a457c2d714610418578063a694fc3a1461042b578063a9059cbb1461043e576101da565b80637ecebe00116100de5780637ecebe00146103a65780638c7adc15146103b957806391d14854146103f557806395d89b4114610408576101da565b80635ebaf1db1461035957806370a082311461038057806379cc679014610393576101da565b8063299498721161017c57806336568abe1161014b57806336568abe1461030d578063395093511461032057806340c10f191461033357806342966c6814610346576101da565b806329949872146102a25780632f2ff15d146102e1578063313ce567146102f65780633644e51514610305576101da565b806318160ddd116101b857806318160ddd1461022f578063202a61a11461024557806323b872dd1461026c578063248a9ca31461027f576101da565b806301ffc9a7146101df57806306fdde0314610207578063095ea7b31461021c575b600080fd5b6101f26101ed366004611ce7565b6104d7565b60405190151581526020015b60405180910390f35b61020f610510565b6040516101fe9190611d9c565b6101f261022a366004611c84565b6105a3565b6102376105b9565b6040519081526020016101fe565b6101f27f000000000000000000000000000000000000000000000000000000000000000081565b6101f261027a366004611bd8565b6105c9565b61023761028d366004611cad565b60009081526005602052604090206001015490565b6102c97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101fe565b6102f46102ef366004611cc5565b610661565b005b604051601281526020016101fe565b61023761068d565b6102f461031b366004611cc5565b610697565b6101f261032e366004611c84565b61071a565b6102f4610341366004611c84565b610756565b6102f4610354366004611cad565b61078b565b6102c97f000000000000000000000000000000000000000000000000000000000000000081565b61023761038e366004611b8c565b610810565b6102f46103a1366004611c84565b610925565b6102376103b4366004611b8c565b6109a6565b6103e07f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016101fe565b6101f2610403366004611cc5565b6109c4565b61020f6109ef565b610237600081565b6101f2610426366004611c84565b6109fe565b6102f4610439366004611cad565b610a97565b6101f261044c366004611c84565b610b45565b6102f461045f366004611c13565b610b51565b6102377f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102f4610499366004611cc5565b610cb5565b6102376104ac366004611ba6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061050857506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60606003805461051f90611e60565b80601f016020809104026020016040519081016040528092919081815260200182805461054b90611e60565b80156105985780601f1061056d57610100808354040283529160200191610598565b820191906000526020600020905b81548152906001019060200180831161057b57829003601f168201915b505050505090505b90565b60006105b0338484610cdb565b50600192915050565b60006105c460025490565b905090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161480156106345750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b1561064c57610644848484610dff565b50600161065a565b610657848484610fda565b90505b9392505050565b60008281526005602052604090206001015461067e81335b611084565b61068883836110e8565b505050565b60006105c461116e565b6001600160a01b038116331461070c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6107168282611265565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105b0918590610751908690611dcf565b610cdb565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66107818133610679565b61068883836112cc565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108035760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610703565b61080d33826113b8565b50565b60405163f68a327f60e01b81526001600160a01b03828116600483015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248301527f0000000000000000000000000000000000000000000000000000000000000000151560448301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063f68a327f9060640160206040518083038186803b1580156108ca57600080fd5b505afa1580156108de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109029190611d0f565b6001600160a01b0383166000908152602081905260409020546105089190611dcf565b600061093183336104ac565b90508181101561098f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610703565b61099c8333848403610cdb565b61068883836113b8565b6001600160a01b038116600090815260066020526040812054610508565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606004805461051f90611e60565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610a805760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610703565b610a8d3385858403610cdb565b5060019392505050565b610ac2337f000000000000000000000000000000000000000000000000000000000000000083610dff565b6040516373479edf60e11b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e68f3dbe90604401600060405180830381600087803b158015610b2a57600080fd5b505af1158015610b3e573d6000803e3d6000fd5b5050505050565b600061065a8383611512565b83421115610ba15760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610703565b60007f0000000000000000000000000000000000000000000000000000000000000000888888610bd08c61151f565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610c2b82611547565b90506000610c3b82878787611595565b9050896001600160a01b0316816001600160a01b031614610c9e5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610703565b610ca98a8a8a610cdb565b50505050505050505050565b600082815260056020526040902060010154610cd18133610679565b6106888383611265565b6001600160a01b038316610d3d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610703565b6001600160a01b038216610d9e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610703565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e635760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610703565b6001600160a01b038216610ec55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610703565b610ed08383836115bd565b6001600160a01b03831660009081526020819052604090205481811015610f485760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610703565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610f7f908490611dcf565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fcb91815260200190565b60405180910390a35b50505050565b6000610fe7848484610dff565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561106c5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610703565b6110798533858403610cdb565b506001949350505050565b61108e82826109c4565b610716576110a6816001600160a01b031660146116a3565b6110b18360206116a3565b6040516020016110c2929190611d27565b60408051601f198184030181529082905262461bcd60e51b825261070391600401611d9c565b6110f282826109c4565b6107165760008281526005602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561112a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60007f00000000000000000000000000000000000000000000000000000000000000004614156111bf57507f00000000000000000000000000000000000000000000000000000000000000006105a0565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c090920190925280519101206105a0565b61126f82826109c4565b156107165760008281526005602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166113225760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610703565b61132e600083836115bd565b80600260008282546113409190611dcf565b90915550506001600160a01b0382166000908152602081905260408120805483929061136d908490611dcf565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610716565b6001600160a01b0382166114185760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610703565b611424826000836115bd565b6001600160a01b038216600090815260208190526040902054818110156114985760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610703565b6001600160a01b03831660009081526020819052604081208383039055600280548492906114c7908490611e06565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610688565b60006105b0338484610dff565b6001600160a01b03811660009081526006602052604090208054600181018255905b50919050565b600061050861155461116e565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006115a687878787611885565b915091506115b381611972565b5095945050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161461169e576040516344bd03c360e11b81526001600160a01b03848116600483015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248301527f0000000000000000000000000000000000000000000000000000000000000000169063897a078690604401600060405180830381600087803b15801561168557600080fd5b505af1158015611699573d6000803e3d6000fd5b505050505b610688565b606060006116b2836002611de7565b6116bd906002611dcf565b67ffffffffffffffff8111156116e357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561170d576020820181803683370190505b509050600360fc1b8160008151811061173657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061177357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611797846002611de7565b6117a2906001611dcf565b90505b6001811115611836576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106117e457634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061180857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361182f81611e49565b90506117a5565b50831561065a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610703565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156118bc5750600090506003611969565b8460ff16601b141580156118d457508460ff16601c14155b156118e55750600090506004611969565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611939573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661196257600060019250925050611969565b9150600090505b94509492505050565b600081600481111561199457634e487b7160e01b600052602160045260246000fd5b141561199f5761080d565b60018160048111156119c157634e487b7160e01b600052602160045260246000fd5b1415611a0f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610703565b6002816004811115611a3157634e487b7160e01b600052602160045260246000fd5b1415611a7f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610703565b6003816004811115611aa157634e487b7160e01b600052602160045260246000fd5b1415611afa5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610703565b6004816004811115611b1c57634e487b7160e01b600052602160045260246000fd5b141561080d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610703565b80356001600160a01b038116811461050b57600080fd5b600060208284031215611b9d578081fd5b61065a82611b75565b60008060408385031215611bb8578081fd5b611bc183611b75565b9150611bcf60208401611b75565b90509250929050565b600080600060608486031215611bec578081fd5b611bf584611b75565b9250611c0360208501611b75565b9150604084013590509250925092565b600080600080600080600060e0888a031215611c2d578283fd5b611c3688611b75565b9650611c4460208901611b75565b95506040880135945060608801359350608088013560ff81168114611c67578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611c96578182fd5b611c9f83611b75565b946020939093013593505050565b600060208284031215611cbe578081fd5b5035919050565b60008060408385031215611cd7578182fd5b82359150611bcf60208401611b75565b600060208284031215611cf8578081fd5b81356001600160e01b03198116811461065a578182fd5b600060208284031215611d20578081fd5b5051919050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351611d5f816017850160208801611e1d565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611d90816028840160208801611e1d565b01602801949350505050565b6000602082528251806020840152611dbb816040850160208701611e1d565b601f01601f19169190910160400192915050565b60008219821115611de257611de2611e95565b500190565b6000816000190483118215151615611e0157611e01611e95565b500290565b600082821015611e1857611e18611e95565b500390565b60005b83811015611e38578181015183820152602001611e20565b83811115610fd45750506000910152565b600081611e5857611e58611e95565b506000190190565b600181811c90821680611e7457607f821691505b6020821081141561154157634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fdfea2646970667358221220827ed691f8f3f0cb3d61a76172241c75ea94d8b189cf079d9cc596830f26bc9c64736f6c63430008030033a2646970667358221220c39d83bc7b4f49c3057595a6560d5252babde9c06b8f321859918ffc088818c464736f6c63430008030033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063299498721461003b578063e6d304671461007e575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b61006261008c36600461019a565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100c357600080fd5b878787877f00000000000000000000000000000000000000000000000000000000000000008888886040516100f790610131565b610108989796959493929190610279565b604051809103906000f080158015610124573d6000803e3d6000fd5b5098975050505050505050565b6124a8806102da83390190565b8035801515811461014e57600080fd5b919050565b60008083601f840112610164578182fd5b50813567ffffffffffffffff81111561017b578182fd5b60208301915083602082850101111561019357600080fd5b9250929050565b600080600080600080600060a0888a0312156101b4578283fd5b873567ffffffffffffffff808211156101cb578485fd5b6101d78b838c01610153565b909950975060208a01359150808211156101ef578485fd5b506101fc8a828b01610153565b90965094505060408801356001600160a01b038116811461021b578384fd5b9250606088013563ffffffff81168114610233578283fd5b91506102416080890161013e565b905092959891949750929550565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b600060c0825261028d60c083018a8c61024f565b82810360208401526102a081898b61024f565b6001600160a01b0397881660408501529590961660608301525063ffffffff929092166080830152151560a0909101529594505050505056fe6101c06040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b50604051620024a8380380620024a88339810160408190526200005a91620003de565b8580604051806040016040528060018152602001603160f81b815250888881600390805190602001906200009092919062000268565b508051620000a690600490602084019062000268565b5050825160208085019190912083518483012060c082815260e08290524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301889052606082018790526080820194909452308184015281518082039093018352909301909252815191909401209193509190608052610100525050506001600160601b0319606087811b82166101405286901b166101605250506001600160e01b031960e083901b166101805280151560f81b6101a0526200017c600085620001b4565b620001a87f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a685620001b4565b505050505050620004f2565b620001c08282620001c4565b5050565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff16620001c05760008281526005602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002243390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b82805462000276906200049f565b90600052602060002090601f0160209004810192826200029a5760008555620002e5565b82601f10620002b557805160ff1916838001178555620002e5565b82800160010185558215620002e5579182015b82811115620002e5578251825591602001919060010190620002c8565b50620002f3929150620002f7565b5090565b5b80821115620002f35760008155600101620002f8565b80516001600160a01b03811681146200032657600080fd5b919050565b600082601f8301126200033c578081fd5b81516001600160401b0380821115620003595762000359620004dc565b604051601f8301601f19908116603f01168101908282118183101715620003845762000384620004dc565b81604052838152602092508683858801011115620003a0578485fd5b8491505b83821015620003c35785820183015181830184015290820190620003a4565b83821115620003d457848385830101525b9695505050505050565b60008060008060008060c08789031215620003f7578182fd5b86516001600160401b03808211156200040e578384fd5b6200041c8a838b016200032b565b9750602089015191508082111562000432578384fd5b506200044189828a016200032b565b95505062000452604088016200030e565b935062000462606088016200030e565b9250608087015163ffffffff811681146200047b578283fd5b60a0880151909250801515811462000491578182fd5b809150509295509295509295565b600181811c90821680620004b457607f821691505b60208210811415620004d657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160a05160c05160e05161010051610120516101405160601c6101605160601c6101805160e01c6101a05160f81c611ee1620005c76000396000818161024a015261085b0152600081816103be01528181610834015261161a01526000818161035e01528181610a9d0152610ade0152600081816102a7015281816105cd015281816106120152818161079601528181610886015281816115bf015261164101526000610ba5015260006111c601526000611215015260006111f0015260006111720152600061119b0152611ee16000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80635ebaf1db11610104578063a217fddf116100a2578063d505accf11610071578063d505accf14610451578063d539139314610464578063d547741f1461048b578063dd62ed3e1461049e576101da565b8063a217fddf14610410578063a457c2d714610418578063a694fc3a1461042b578063a9059cbb1461043e576101da565b80637ecebe00116100de5780637ecebe00146103a65780638c7adc15146103b957806391d14854146103f557806395d89b4114610408576101da565b80635ebaf1db1461035957806370a082311461038057806379cc679014610393576101da565b8063299498721161017c57806336568abe1161014b57806336568abe1461030d578063395093511461032057806340c10f191461033357806342966c6814610346576101da565b806329949872146102a25780632f2ff15d146102e1578063313ce567146102f65780633644e51514610305576101da565b806318160ddd116101b857806318160ddd1461022f578063202a61a11461024557806323b872dd1461026c578063248a9ca31461027f576101da565b806301ffc9a7146101df57806306fdde0314610207578063095ea7b31461021c575b600080fd5b6101f26101ed366004611ce7565b6104d7565b60405190151581526020015b60405180910390f35b61020f610510565b6040516101fe9190611d9c565b6101f261022a366004611c84565b6105a3565b6102376105b9565b6040519081526020016101fe565b6101f27f000000000000000000000000000000000000000000000000000000000000000081565b6101f261027a366004611bd8565b6105c9565b61023761028d366004611cad565b60009081526005602052604090206001015490565b6102c97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101fe565b6102f46102ef366004611cc5565b610661565b005b604051601281526020016101fe565b61023761068d565b6102f461031b366004611cc5565b610697565b6101f261032e366004611c84565b61071a565b6102f4610341366004611c84565b610756565b6102f4610354366004611cad565b61078b565b6102c97f000000000000000000000000000000000000000000000000000000000000000081565b61023761038e366004611b8c565b610810565b6102f46103a1366004611c84565b610925565b6102376103b4366004611b8c565b6109a6565b6103e07f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016101fe565b6101f2610403366004611cc5565b6109c4565b61020f6109ef565b610237600081565b6101f2610426366004611c84565b6109fe565b6102f4610439366004611cad565b610a97565b6101f261044c366004611c84565b610b45565b6102f461045f366004611c13565b610b51565b6102377f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102f4610499366004611cc5565b610cb5565b6102376104ac366004611ba6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061050857506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60606003805461051f90611e60565b80601f016020809104026020016040519081016040528092919081815260200182805461054b90611e60565b80156105985780601f1061056d57610100808354040283529160200191610598565b820191906000526020600020905b81548152906001019060200180831161057b57829003601f168201915b505050505090505b90565b60006105b0338484610cdb565b50600192915050565b60006105c460025490565b905090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161480156106345750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b1561064c57610644848484610dff565b50600161065a565b610657848484610fda565b90505b9392505050565b60008281526005602052604090206001015461067e81335b611084565b61068883836110e8565b505050565b60006105c461116e565b6001600160a01b038116331461070c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6107168282611265565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105b0918590610751908690611dcf565b610cdb565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66107818133610679565b61068883836112cc565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108035760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610703565b61080d33826113b8565b50565b60405163f68a327f60e01b81526001600160a01b03828116600483015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248301527f0000000000000000000000000000000000000000000000000000000000000000151560448301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063f68a327f9060640160206040518083038186803b1580156108ca57600080fd5b505afa1580156108de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109029190611d0f565b6001600160a01b0383166000908152602081905260409020546105089190611dcf565b600061093183336104ac565b90508181101561098f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610703565b61099c8333848403610cdb565b61068883836113b8565b6001600160a01b038116600090815260066020526040812054610508565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606004805461051f90611e60565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610a805760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610703565b610a8d3385858403610cdb565b5060019392505050565b610ac2337f000000000000000000000000000000000000000000000000000000000000000083610dff565b6040516373479edf60e11b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e68f3dbe90604401600060405180830381600087803b158015610b2a57600080fd5b505af1158015610b3e573d6000803e3d6000fd5b5050505050565b600061065a8383611512565b83421115610ba15760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610703565b60007f0000000000000000000000000000000000000000000000000000000000000000888888610bd08c61151f565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610c2b82611547565b90506000610c3b82878787611595565b9050896001600160a01b0316816001600160a01b031614610c9e5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610703565b610ca98a8a8a610cdb565b50505050505050505050565b600082815260056020526040902060010154610cd18133610679565b6106888383611265565b6001600160a01b038316610d3d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610703565b6001600160a01b038216610d9e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610703565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e635760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610703565b6001600160a01b038216610ec55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610703565b610ed08383836115bd565b6001600160a01b03831660009081526020819052604090205481811015610f485760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610703565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610f7f908490611dcf565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fcb91815260200190565b60405180910390a35b50505050565b6000610fe7848484610dff565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561106c5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610703565b6110798533858403610cdb565b506001949350505050565b61108e82826109c4565b610716576110a6816001600160a01b031660146116a3565b6110b18360206116a3565b6040516020016110c2929190611d27565b60408051601f198184030181529082905262461bcd60e51b825261070391600401611d9c565b6110f282826109c4565b6107165760008281526005602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561112a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60007f00000000000000000000000000000000000000000000000000000000000000004614156111bf57507f00000000000000000000000000000000000000000000000000000000000000006105a0565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c090920190925280519101206105a0565b61126f82826109c4565b156107165760008281526005602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166113225760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610703565b61132e600083836115bd565b80600260008282546113409190611dcf565b90915550506001600160a01b0382166000908152602081905260408120805483929061136d908490611dcf565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610716565b6001600160a01b0382166114185760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610703565b611424826000836115bd565b6001600160a01b038216600090815260208190526040902054818110156114985760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610703565b6001600160a01b03831660009081526020819052604081208383039055600280548492906114c7908490611e06565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610688565b60006105b0338484610dff565b6001600160a01b03811660009081526006602052604090208054600181018255905b50919050565b600061050861155461116e565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006115a687878787611885565b915091506115b381611972565b5095945050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161461169e576040516344bd03c360e11b81526001600160a01b03848116600483015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248301527f0000000000000000000000000000000000000000000000000000000000000000169063897a078690604401600060405180830381600087803b15801561168557600080fd5b505af1158015611699573d6000803e3d6000fd5b505050505b610688565b606060006116b2836002611de7565b6116bd906002611dcf565b67ffffffffffffffff8111156116e357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561170d576020820181803683370190505b509050600360fc1b8160008151811061173657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061177357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611797846002611de7565b6117a2906001611dcf565b90505b6001811115611836576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106117e457634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061180857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361182f81611e49565b90506117a5565b50831561065a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610703565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156118bc5750600090506003611969565b8460ff16601b141580156118d457508460ff16601c14155b156118e55750600090506004611969565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611939573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661196257600060019250925050611969565b9150600090505b94509492505050565b600081600481111561199457634e487b7160e01b600052602160045260246000fd5b141561199f5761080d565b60018160048111156119c157634e487b7160e01b600052602160045260246000fd5b1415611a0f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610703565b6002816004811115611a3157634e487b7160e01b600052602160045260246000fd5b1415611a7f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610703565b6003816004811115611aa157634e487b7160e01b600052602160045260246000fd5b1415611afa5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610703565b6004816004811115611b1c57634e487b7160e01b600052602160045260246000fd5b141561080d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610703565b80356001600160a01b038116811461050b57600080fd5b600060208284031215611b9d578081fd5b61065a82611b75565b60008060408385031215611bb8578081fd5b611bc183611b75565b9150611bcf60208401611b75565b90509250929050565b600080600060608486031215611bec578081fd5b611bf584611b75565b9250611c0360208501611b75565b9150604084013590509250925092565b600080600080600080600060e0888a031215611c2d578283fd5b611c3688611b75565b9650611c4460208901611b75565b95506040880135945060608801359350608088013560ff81168114611c67578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611c96578182fd5b611c9f83611b75565b946020939093013593505050565b600060208284031215611cbe578081fd5b5035919050565b60008060408385031215611cd7578182fd5b82359150611bcf60208401611b75565b600060208284031215611cf8578081fd5b81356001600160e01b03198116811461065a578182fd5b600060208284031215611d20578081fd5b5051919050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351611d5f816017850160208801611e1d565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611d90816028840160208801611e1d565b01602801949350505050565b6000602082528251806020840152611dbb816040850160208701611e1d565b601f01601f19169190910160400192915050565b60008219821115611de257611de2611e95565b500190565b6000816000190483118215151615611e0157611e01611e95565b500290565b600082821015611e1857611e18611e95565b500390565b60005b83811015611e38578181015183820152602001611e20565b83811115610fd45750506000910152565b600081611e5857611e58611e95565b506000190190565b600181811c90821680611e7457607f821691505b6020821081141561154157634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fdfea2646970667358221220827ed691f8f3f0cb3d61a76172241c75ea94d8b189cf079d9cc596830f26bc9c64736f6c63430008030033a2646970667358221220c39d83bc7b4f49c3057595a6560d5252babde9c06b8f321859918ffc088818c464736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": { + "constructor": { + "params": { + "_longShort": "address of the longShort contract" + } + }, + "createSyntheticToken(string,string,address,uint32,bool)": { + "params": { + "isLong": "boolean denoting if the synthetic token is long or short", + "marketIndex": "market index this synthetic token belongs to", + "staker": "address of the staker contract", + "syntheticName": "name of the synthetic token", + "syntheticSymbol": "ticker symbol of the synthetic token" + }, + "returns": { + "syntheticToken": "- address of the created synthetic token" + } + } + }, + "title": "TokenFactory", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "constructor": { + "notice": "sets the address of the longShort contract on initialization" + }, + "createSyntheticToken(string,string,address,uint32,bool)": { + "notice": "creates and sets up a new synthetic token" + }, + "longShort()": { + "notice": "address of long short contract" + } + }, + "notice": "contract is used to reliably mint the synthetic tokens used by the float protocol.", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/TreasuryAlpha.json b/deployments/mumbai/TreasuryAlpha.json new file mode 100644 index 0000000..90421cc --- /dev/null +++ b/deployments/mumbai/TreasuryAlpha.json @@ -0,0 +1,638 @@ +{ + "address": "0x733FC3a395a35904045Ab6a3678601512c244003", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newBasePrice", + "type": "uint256" + } + ], + "name": "BasePriceUpdated", + "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": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "activateRedemptions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "basePrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOfFloatToBurn", + "type": "uint256" + } + ], + "name": "burnFloatForShareOfTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "convertSynthsToPaymentTokenNextPriceLong", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "convertSynthsToPaymentTokenNextPriceShort", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "floatToken", + "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": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paymentToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redemptionsActivated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newBasePrice", + "type": "uint256" + } + ], + "name": "updateBasePrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x733FC3a395a35904045Ab6a3678601512c244003", + "transactionIndex": 0, + "gasUsed": "417871", + "logsBloom": "0x00000004000000000000000000000000410000000000000000000004000000000000000002000000000000008000000000008000002000000000000000004000000000000000000000000000000002800000000020000000040100000000000000000000020000200000000000000800000004000000000880010000000000000000000000000000000000000000004020000000000000000000000000000000200000000000000000000000000000000000000000000000001040000000004000000020000000000001000000000000100000000000008100500000000020000080000000000000000000000002000000000000004000000000000000100000", + "blockHash": "0xe372e0fb30a77ab9e70ec6771be1f34b8d8c72f69c29393e74a1364b0a74b349", + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18868860, + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "address": "0x733FC3a395a35904045Ab6a3678601512c244003", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000078865bfbb624e875cede11f4bd23a1544652ba0f" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xe372e0fb30a77ab9e70ec6771be1f34b8d8c72f69c29393e74a1364b0a74b349" + }, + { + "transactionIndex": 0, + "blockNumber": 18868860, + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "address": "0x733FC3a395a35904045Ab6a3678601512c244003", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xe372e0fb30a77ab9e70ec6771be1f34b8d8c72f69c29393e74a1364b0a74b349" + }, + { + "transactionIndex": 0, + "blockNumber": 18868860, + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "address": "0x733FC3a395a35904045Ab6a3678601512c244003", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xe372e0fb30a77ab9e70ec6771be1f34b8d8c72f69c29393e74a1364b0a74b349" + }, + { + "transactionIndex": 0, + "blockNumber": 18868860, + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "address": "0x733FC3a395a35904045Ab6a3678601512c244003", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xe372e0fb30a77ab9e70ec6771be1f34b8d8c72f69c29393e74a1364b0a74b349" + }, + { + "transactionIndex": 0, + "blockNumber": 18868860, + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x00000000000000000000000000000000000000000000000000047427858d02000000000000000000000000000000000000000000000000000812522dcf93bacd000000000000000000000000000000000000000000000168e7373c101b2ddea3000000000000000000000000000000000000000000000000080dde064a06b8cd000000000000000000000000000000000000000000000168e73bb037a0bae0a3", + "logIndex": 4, + "blockHash": "0xe372e0fb30a77ab9e70ec6771be1f34b8d8c72f69c29393e74a1364b0a74b349" + } + ], + "blockNumber": 18868860, + "cumulativeGasUsed": "417871", + "status": 1, + "byzantium": true + }, + "args": [ + "0x78865bFBB624e875ceDE11f4bD23A1544652ba0F", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xf8c8765e0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61000000000000000000000000001b3b4d0f3714ca98ba10f6042daebf0b1b7b6f0000000000000000000000002827c87a2fc35b0d20e414df5358b95264ac726e00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "0x2740EA9F72B23372621D8D718F52609b80c24E61", + "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F", + "0x2827c87a2FC35b0D20E414DF5358B95264aC726E", + "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A" + ] + }, + "implementation": "0x78865bFBB624e875ceDE11f4bD23A1544652ba0F", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/TreasuryAlpha_Implementation.json b/deployments/mumbai/TreasuryAlpha_Implementation.json new file mode 100644 index 0000000..bd0a5a0 --- /dev/null +++ b/deployments/mumbai/TreasuryAlpha_Implementation.json @@ -0,0 +1,738 @@ +{ + "address": "0x78865bFBB624e875ceDE11f4bD23A1544652ba0F", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newBasePrice", + "type": "uint256" + } + ], + "name": "BasePriceUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "activateRedemptions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "basePrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOfFloatToBurn", + "type": "uint256" + } + ], + "name": "burnFloatForShareOfTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "convertSynthsToPaymentTokenNextPriceLong", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "convertSynthsToPaymentTokenNextPriceShort", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "floatToken", + "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": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paymentToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redemptionsActivated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newBasePrice", + "type": "uint256" + } + ], + "name": "updateBasePrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x464a2422f5debdcad60a89802f840f1b6b476c50e577cfbeac8704c742e323a2", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x78865bFBB624e875ceDE11f4bD23A1544652ba0F", + "transactionIndex": 1, + "gasUsed": "1502889", + "logsBloom": "0x00000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0xe6fa9464f62841f080c02adac78ee5c86eed5e8ac4f9671a76d58e01646e7ef5", + "transactionHash": "0x464a2422f5debdcad60a89802f840f1b6b476c50e577cfbeac8704c742e323a2", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 18868855, + "transactionHash": "0x464a2422f5debdcad60a89802f840f1b6b476c50e577cfbeac8704c742e323a2", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000010049bd6f20e00000000000000000000000000000000000000000000000000082256c9a685c8cd000000000000000000000000000000000000000000000168e717b8c2692f52a30000000000000000000000000000000000000000000000000812522dcf93bacd000000000000000000000000000000000000000000000168e727bd5e402160a3", + "logIndex": 4, + "blockHash": "0xe6fa9464f62841f080c02adac78ee5c86eed5e8ac4f9671a76d58e01646e7ef5" + } + ], + "blockNumber": 18868855, + "cumulativeGasUsed": "1595560", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBasePrice\",\"type\":\"uint256\"}],\"name\":\"BasePriceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"activateRedemptions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"basePrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOfFloatToBurn\",\"type\":\"uint256\"}],\"name\":\"burnFloatForShareOfTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"tokens_redeem\",\"type\":\"uint256\"}],\"name\":\"convertSynthsToPaymentTokenNextPriceLong\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"tokens_redeem\",\"type\":\"uint256\"}],\"name\":\"convertSynthsToPaymentTokenNextPriceShort\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatToken\",\"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\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_paymentToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_floatToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paymentToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redemptionsActivated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newBasePrice\",\"type\":\"uint256\"}],\"name\":\"updateBasePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"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.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"Treasury Contract \",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/TreasuryAlpha.sol\":\"TreasuryAlpha\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x02348b2e4b9f3200c7e3907c5c2661643a6d8520e9f79939fbb9b4005a54894d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 / b + (a % b == 0 ? 0 : 1);\\n }\\n}\\n\",\"keccak256\":\"0x49ebdac5d515aebb95168564158940b79d7d5d12fbfe59cec546a00d57fee64a\",\"license\":\"MIT\"},\"contracts/TreasuryAlpha.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\nimport \\\"./interfaces/IFloatToken.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/** This contract implementation is purely for the alpha, allowing the burning of FLT tokens\\n for a proportional share of the value held in the treasury. In contrast, the beta launch will be\\n rely on a more robust governance mechanism to vote on the buying and buring of FLT tokens using\\n treasury funds.*/\\n\\n/** @title Treasury Contract */\\ncontract TreasuryAlpha is AccessControlledAndUpgradeable {\\n //Using Open Zeppelin safe transfer library for token transfers\\n using SafeERC20 for IERC20;\\n\\n address public paymentToken;\\n address public floatToken;\\n address public longShort;\\n // An aproximation of what the FLT price should be according to the yield at the time.\\n uint256 public basePrice;\\n bool public redemptionsActivated;\\n\\n event BasePriceUpdated(uint256 newBasePrice);\\n\\n function initialize(\\n address _admin,\\n address _paymentToken,\\n address _floatToken,\\n address _longShort\\n ) external initializer {\\n _AccessControlledAndUpgradeable_init(_admin);\\n paymentToken = _paymentToken;\\n floatToken = _floatToken;\\n longShort = _longShort;\\n }\\n\\n function onlyAdminModifierLogic() internal virtual {\\n _checkRole(ADMIN_ROLE, msg.sender);\\n }\\n\\n modifier onlyAdmin() {\\n onlyAdminModifierLogic();\\n _;\\n }\\n\\n modifier redemptionsActive() {\\n require(redemptionsActivated, \\\"redemptions haven't been activated\\\");\\n _;\\n }\\n\\n function _getValueLockedInTreasury() internal view returns (uint256) {\\n return IERC20(paymentToken).balanceOf(address(this));\\n }\\n\\n function _getFloatTokenSupply() internal view returns (uint256) {\\n return IFloatToken(floatToken).totalSupply();\\n }\\n\\n function updateBasePrice(uint256 newBasePrice) public onlyAdmin {\\n // What should the minimum for this value be? 0.2 DAI per token seems reasonable if we are targetting 0.5 DAI as the normal price (and say Aave yield is poor or similar)\\n require(newBasePrice > 2e17, \\\"base price too low\\\");\\n\\n basePrice = newBasePrice;\\n emit BasePriceUpdated(newBasePrice);\\n }\\n\\n function activateRedemptions() public onlyAdmin {\\n redemptionsActivated = true;\\n }\\n\\n function burnFloatForShareOfTreasury(uint256 amountOfFloatToBurn) external redemptionsActive {\\n uint256 priceAccordingToTreasuryAndSupply = (_getValueLockedInTreasury() * 1e18) /\\n _getFloatTokenSupply();\\n // In normal operation the `priceAccordingToTreasuryAndSupply` value will be an over-estimation favouring people who withdraw early. Thus typically the 'basePrice' will be a bit lower to prevent this in typical cases.\\n // We take the min of these two values so it is impossible for us to run with the money.\\n uint256 priceToUse = Math.min(priceAccordingToTreasuryAndSupply, basePrice);\\n\\n uint256 amountToRecieve = (priceToUse * amountOfFloatToBurn) / 1e18;\\n\\n IFloatToken(floatToken).burnFrom(msg.sender, amountOfFloatToBurn); // Can modify the core FLT token if wanted to remove the need for this step. // Currently requires user to approve treasury contract.\\n IERC20(paymentToken).safeTransfer(msg.sender, amountToRecieve);\\n }\\n\\n function convertSynthsToPaymentTokenNextPriceLong(uint32 marketIndex, uint256 tokens_redeem)\\n external\\n {\\n ILongShort(longShort).redeemLongNextPrice(marketIndex, tokens_redeem);\\n }\\n\\n function convertSynthsToPaymentTokenNextPriceShort(uint32 marketIndex, uint256 tokens_redeem)\\n external\\n {\\n ILongShort(longShort).redeemShortNextPrice(marketIndex, tokens_redeem);\\n }\\n}\\n\",\"keccak256\":\"0xe99e7af16cf48c3e2b38c3ae035e65bd8e463ef5ffa6cd1651312669ab8c0a4c\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IFloatToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IFloatToken {\\n function mint(address to, uint256 amount) external;\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function burnFrom(address account, uint256 amount) external virtual;\\n}\\n\",\"keccak256\":\"0xdec0736a73d0855ee353797430e196f9be074ccd728209e28e881ffa24d76e5d\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611a3a806100206000396000f3fe6080604052600436106101355760003560e01c8063941e670f116100ab578063c7876ea41161006f578063c7876ea414610371578063d547741f14610387578063eae5a8d9146103a7578063f72c0d8b146103c7578063f8c8765e146103fb578063fd5baa881461041b57610135565b8063941e670f146102ee5780639c0057111461030e578063a217fddf1461032e578063b18c00bd14610343578063ba311ae61461035c57610135565b80633013ce29116100fd5780633013ce291461022757806336568abe146102475780633659cfe6146102675780634f1ef2861461028757806375b238fc1461029a57806391d14854146102ce57610135565b806301ffc9a71461013a5780630e11b60e1461016f578063248a9ca31461019157806329949872146101cf5780632f2ff15d14610207575b600080fd5b34801561014657600080fd5b5061015a610155366004611792565b61043b565b60405190151581526020015b60405180910390f35b34801561017b57600080fd5b5061018f61018a3660046117d2565b610474565b005b34801561019d57600080fd5b506101c16101ac36600461174f565b60009081526065602052604090206001015490565b604051908152602001610166565b3480156101db57600080fd5b5060fd546101ef906001600160a01b031681565b6040516001600160a01b039091168152602001610166565b34801561021357600080fd5b5061018f610222366004611767565b6104e3565b34801561023357600080fd5b5060fb546101ef906001600160a01b031681565b34801561025357600080fd5b5061018f610262366004611767565b61050f565b34801561027357600080fd5b5061018f610282366004611605565b610592565b61018f610295366004611672565b6105b9565b3480156102a657600080fd5b506101c17fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102da57600080fd5b5061015a6102e9366004611767565b6105ce565b3480156102fa57600080fd5b5061018f61030936600461174f565b6105f9565b34801561031a57600080fd5b5061018f6103293660046117d2565b610737565b34801561033a57600080fd5b506101c1600081565b34801561034f57600080fd5b5060ff805461015a911681565b34801561036857600080fd5b5061018f610774565b34801561037d57600080fd5b506101c160fe5481565b34801561039357600080fd5b5061018f6103a2366004611767565b61078b565b3480156103b357600080fd5b5060fc546101ef906001600160a01b031681565b3480156103d357600080fd5b506101c17f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b34801561040757600080fd5b5061018f61041636600461161f565b6107b1565b34801561042757600080fd5b5061018f61043636600461174f565b610867565b60006001600160e01b03198216637965db0b60e01b148061046c57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60fd5460405163c2e1247160e01b815263ffffffff84166004820152602481018390526001600160a01b039091169063c2e12471906044015b600060405180830381600087803b1580156104c757600080fd5b505af11580156104db573d6000803e3d6000fd5b505050505050565b60008281526065602052604090206001015461050081335b6108f6565b61050a838361095a565b505050565b6001600160a01b03811633146105845760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61058e82826109e0565b5050565b61059b81610a47565b6105b681604051806020016040528060008152506000610a72565b50565b6105c282610a47565b61058e82826001610a72565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60ff8054166106555760405162461bcd60e51b815260206004820152602260248201527f726564656d7074696f6e7320686176656e2774206265656e2061637469766174604482015261195960f21b606482015260840161057b565b600061065f610bf3565b610667610c75565b61067990670de0b6b3a764000061194f565b610683919061192f565b905060006106938260fe54610cb9565b90506000670de0b6b3a76400006106aa858461194f565b6106b4919061192f565b60fc5460405163079cc67960e41b8152336004820152602481018790529192506001600160a01b0316906379cc679090604401600060405180830381600087803b15801561070157600080fd5b505af1158015610715573d6000803e3d6000fd5b505060fb5461073192506001600160a01b031690503383610cd1565b50505050565b60fd54604051630735b02760e51b815263ffffffff84166004820152602481018390526001600160a01b039091169063e6b604e0906044016104ad565b61077c610d23565b60ff805460ff19166001179055565b6000828152606560205260409020600101546107a781336104fb565b61050a83836109e0565b600054610100900460ff16806107ca575060005460ff16155b6107e65760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff16158015610808576000805461ffff19166101011790555b61081185610d4f565b60fb80546001600160a01b038087166001600160a01b03199283161790925560fc805486841690831617905560fd8054928516929091169190911790558015610860576000805461ff00191690555b5050505050565b61086f610d23565b6702c68af0bb14000081116108bb5760405162461bcd60e51b81526020600482015260126024820152716261736520707269636520746f6f206c6f7760701b604482015260640161057b565b60fe8190556040518181527ffab5bcbec79a8b5888e114fd4b378427aa58d9b237d85056f0ee5b3ea57df8c59060200160405180910390a150565b61090082826105ce565b61058e57610918816001600160a01b03166014610dd4565b610923836020610dd4565b604051602001610934929190611821565b60408051601f198184030181529082905262461bcd60e51b825261057b91600401611896565b61096482826105ce565b61058e5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561099c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6109ea82826105ce565b1561058e5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361058e81336104fb565b6000610aa57f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050610ab084610fb6565b600083511180610abd5750815b15610ace57610acc848461105b565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661086057805460ff191660011781556040516001600160a01b0383166024820152610b4d90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b17905261105b565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b03838116911614610bea5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b606482015260840161057b565b61086085611146565b60fc54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b158015610c3857600080fd5b505afa158015610c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7091906117ba565b905090565b60fb546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610c3857600080fd5b6000818310610cc85781610cca565b825b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261050a908490611186565b610d4d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336108f6565b565b600054610100900460ff1680610d68575060005460ff16155b610d845760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff16158015610da6576000805461ffff19166101011790555b610dae611258565b610db66112db565b610dbf82611339565b801561058e576000805461ff00191690555050565b60606000610de383600261194f565b610dee906002611917565b67ffffffffffffffff811115610e1457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610e3e576020820181803683370190505b509050600360fc1b81600081518110610e6757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610ea457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610ec884600261194f565b610ed3906001611917565b90505b6001811115610f67576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610f1557634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110610f3957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93610f608161199a565b9050610ed6565b508315610cca5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161057b565b803b61101a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161057b565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6110ba5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161057b565b600080846001600160a01b0316846040516110d59190611805565b600060405180830381855af49150503d8060008114611110576040519150601f19603f3d011682016040523d82523d6000602084013e611115565b606091505b509150915061113d82826040518060600160405280602781526020016119de60279139611402565b95945050505050565b61114f81610fb6565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006111db826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661143b9092919063ffffffff16565b80519091501561050a57808060200190518101906111f9919061172f565b61050a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161057b565b600054610100900460ff1680611271575060005460ff16155b61128d5760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff161580156112af576000805461ffff19166101011790555b6112b7611452565b6112bf611452565b6112c7611452565b80156105b6576000805461ff001916905550565b600054610100900460ff16806112f4575060005460ff16155b6113105760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff161580156112b7576000805461ffff19166101011790556112bf611452565b600054610100900460ff1680611352575060005460ff16155b61136e5760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff16158015611390576000805461ffff19166101011790555b6001600160a01b0382166113a357600080fd5b6113ae6000836114bc565b6113d87fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775836114bc565b610dbf7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3836114bc565b60608315611411575081610cca565b8251156114215782518084602001fd5b8160405162461bcd60e51b815260040161057b9190611896565b606061144a84846000856114c6565b949350505050565b600054610100900460ff168061146b575060005460ff16155b6114875760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff161580156112c7576000805461ffff191661010117905580156105b6576000805461ff001916905550565b61058e828261095a565b6060824710156115275760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161057b565b843b6115755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161057b565b600080866001600160a01b031685876040516115919190611805565b60006040518083038185875af1925050503d80600081146115ce576040519150601f19603f3d011682016040523d82523d6000602084013e6115d3565b606091505b50915091506115e3828286611402565b979650505050505050565b80356001600160a01b038116811461046f57600080fd5b600060208284031215611616578081fd5b610cca826115ee565b60008060008060808587031215611634578283fd5b61163d856115ee565b935061164b602086016115ee565b9250611659604086016115ee565b9150611667606086016115ee565b905092959194509250565b60008060408385031215611684578182fd5b61168d836115ee565b9150602083013567ffffffffffffffff808211156116a9578283fd5b818501915085601f8301126116bc578283fd5b8135818111156116ce576116ce6119c7565b604051601f8201601f19908116603f011681019083821181831017156116f6576116f66119c7565b8160405282815288602084870101111561170e578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600060208284031215611740578081fd5b81518015158114610cca578182fd5b600060208284031215611760578081fd5b5035919050565b60008060408385031215611779578182fd5b82359150611789602084016115ee565b90509250929050565b6000602082840312156117a3578081fd5b81356001600160e01b031981168114610cca578182fd5b6000602082840312156117cb578081fd5b5051919050565b600080604083850312156117e4578182fd5b823563ffffffff811681146117f7578283fd5b946020939093013593505050565b6000825161181781846020870161196e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008252835161185981601785016020880161196e565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161188a81602884016020880161196e565b01602801949350505050565b60006020825282518060208401526118b581604085016020870161196e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561192a5761192a6119b1565b500190565b60008261194a57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611969576119696119b1565b500290565b60005b83811015611989578181015183820152602001611971565b838111156107315750506000910152565b6000816119a9576119a96119b1565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200751baaf5eb84fb56af5e2e9a2566a20965cf18b7fd33cd61861883e83964ec164736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101355760003560e01c8063941e670f116100ab578063c7876ea41161006f578063c7876ea414610371578063d547741f14610387578063eae5a8d9146103a7578063f72c0d8b146103c7578063f8c8765e146103fb578063fd5baa881461041b57610135565b8063941e670f146102ee5780639c0057111461030e578063a217fddf1461032e578063b18c00bd14610343578063ba311ae61461035c57610135565b80633013ce29116100fd5780633013ce291461022757806336568abe146102475780633659cfe6146102675780634f1ef2861461028757806375b238fc1461029a57806391d14854146102ce57610135565b806301ffc9a71461013a5780630e11b60e1461016f578063248a9ca31461019157806329949872146101cf5780632f2ff15d14610207575b600080fd5b34801561014657600080fd5b5061015a610155366004611792565b61043b565b60405190151581526020015b60405180910390f35b34801561017b57600080fd5b5061018f61018a3660046117d2565b610474565b005b34801561019d57600080fd5b506101c16101ac36600461174f565b60009081526065602052604090206001015490565b604051908152602001610166565b3480156101db57600080fd5b5060fd546101ef906001600160a01b031681565b6040516001600160a01b039091168152602001610166565b34801561021357600080fd5b5061018f610222366004611767565b6104e3565b34801561023357600080fd5b5060fb546101ef906001600160a01b031681565b34801561025357600080fd5b5061018f610262366004611767565b61050f565b34801561027357600080fd5b5061018f610282366004611605565b610592565b61018f610295366004611672565b6105b9565b3480156102a657600080fd5b506101c17fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102da57600080fd5b5061015a6102e9366004611767565b6105ce565b3480156102fa57600080fd5b5061018f61030936600461174f565b6105f9565b34801561031a57600080fd5b5061018f6103293660046117d2565b610737565b34801561033a57600080fd5b506101c1600081565b34801561034f57600080fd5b5060ff805461015a911681565b34801561036857600080fd5b5061018f610774565b34801561037d57600080fd5b506101c160fe5481565b34801561039357600080fd5b5061018f6103a2366004611767565b61078b565b3480156103b357600080fd5b5060fc546101ef906001600160a01b031681565b3480156103d357600080fd5b506101c17f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b34801561040757600080fd5b5061018f61041636600461161f565b6107b1565b34801561042757600080fd5b5061018f61043636600461174f565b610867565b60006001600160e01b03198216637965db0b60e01b148061046c57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60fd5460405163c2e1247160e01b815263ffffffff84166004820152602481018390526001600160a01b039091169063c2e12471906044015b600060405180830381600087803b1580156104c757600080fd5b505af11580156104db573d6000803e3d6000fd5b505050505050565b60008281526065602052604090206001015461050081335b6108f6565b61050a838361095a565b505050565b6001600160a01b03811633146105845760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61058e82826109e0565b5050565b61059b81610a47565b6105b681604051806020016040528060008152506000610a72565b50565b6105c282610a47565b61058e82826001610a72565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60ff8054166106555760405162461bcd60e51b815260206004820152602260248201527f726564656d7074696f6e7320686176656e2774206265656e2061637469766174604482015261195960f21b606482015260840161057b565b600061065f610bf3565b610667610c75565b61067990670de0b6b3a764000061194f565b610683919061192f565b905060006106938260fe54610cb9565b90506000670de0b6b3a76400006106aa858461194f565b6106b4919061192f565b60fc5460405163079cc67960e41b8152336004820152602481018790529192506001600160a01b0316906379cc679090604401600060405180830381600087803b15801561070157600080fd5b505af1158015610715573d6000803e3d6000fd5b505060fb5461073192506001600160a01b031690503383610cd1565b50505050565b60fd54604051630735b02760e51b815263ffffffff84166004820152602481018390526001600160a01b039091169063e6b604e0906044016104ad565b61077c610d23565b60ff805460ff19166001179055565b6000828152606560205260409020600101546107a781336104fb565b61050a83836109e0565b600054610100900460ff16806107ca575060005460ff16155b6107e65760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff16158015610808576000805461ffff19166101011790555b61081185610d4f565b60fb80546001600160a01b038087166001600160a01b03199283161790925560fc805486841690831617905560fd8054928516929091169190911790558015610860576000805461ff00191690555b5050505050565b61086f610d23565b6702c68af0bb14000081116108bb5760405162461bcd60e51b81526020600482015260126024820152716261736520707269636520746f6f206c6f7760701b604482015260640161057b565b60fe8190556040518181527ffab5bcbec79a8b5888e114fd4b378427aa58d9b237d85056f0ee5b3ea57df8c59060200160405180910390a150565b61090082826105ce565b61058e57610918816001600160a01b03166014610dd4565b610923836020610dd4565b604051602001610934929190611821565b60408051601f198184030181529082905262461bcd60e51b825261057b91600401611896565b61096482826105ce565b61058e5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561099c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6109ea82826105ce565b1561058e5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361058e81336104fb565b6000610aa57f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050610ab084610fb6565b600083511180610abd5750815b15610ace57610acc848461105b565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661086057805460ff191660011781556040516001600160a01b0383166024820152610b4d90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b17905261105b565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b03838116911614610bea5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b606482015260840161057b565b61086085611146565b60fc54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b158015610c3857600080fd5b505afa158015610c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7091906117ba565b905090565b60fb546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610c3857600080fd5b6000818310610cc85781610cca565b825b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261050a908490611186565b610d4d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336108f6565b565b600054610100900460ff1680610d68575060005460ff16155b610d845760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff16158015610da6576000805461ffff19166101011790555b610dae611258565b610db66112db565b610dbf82611339565b801561058e576000805461ff00191690555050565b60606000610de383600261194f565b610dee906002611917565b67ffffffffffffffff811115610e1457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610e3e576020820181803683370190505b509050600360fc1b81600081518110610e6757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610ea457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610ec884600261194f565b610ed3906001611917565b90505b6001811115610f67576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610f1557634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110610f3957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93610f608161199a565b9050610ed6565b508315610cca5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161057b565b803b61101a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161057b565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6110ba5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161057b565b600080846001600160a01b0316846040516110d59190611805565b600060405180830381855af49150503d8060008114611110576040519150601f19603f3d011682016040523d82523d6000602084013e611115565b606091505b509150915061113d82826040518060600160405280602781526020016119de60279139611402565b95945050505050565b61114f81610fb6565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006111db826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661143b9092919063ffffffff16565b80519091501561050a57808060200190518101906111f9919061172f565b61050a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161057b565b600054610100900460ff1680611271575060005460ff16155b61128d5760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff161580156112af576000805461ffff19166101011790555b6112b7611452565b6112bf611452565b6112c7611452565b80156105b6576000805461ff001916905550565b600054610100900460ff16806112f4575060005460ff16155b6113105760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff161580156112b7576000805461ffff19166101011790556112bf611452565b600054610100900460ff1680611352575060005460ff16155b61136e5760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff16158015611390576000805461ffff19166101011790555b6001600160a01b0382166113a357600080fd5b6113ae6000836114bc565b6113d87fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775836114bc565b610dbf7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3836114bc565b60608315611411575081610cca565b8251156114215782518084602001fd5b8160405162461bcd60e51b815260040161057b9190611896565b606061144a84846000856114c6565b949350505050565b600054610100900460ff168061146b575060005460ff16155b6114875760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff161580156112c7576000805461ffff191661010117905580156105b6576000805461ff001916905550565b61058e828261095a565b6060824710156115275760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161057b565b843b6115755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161057b565b600080866001600160a01b031685876040516115919190611805565b60006040518083038185875af1925050503d80600081146115ce576040519150601f19603f3d011682016040523d82523d6000602084013e6115d3565b606091505b50915091506115e3828286611402565b979650505050505050565b80356001600160a01b038116811461046f57600080fd5b600060208284031215611616578081fd5b610cca826115ee565b60008060008060808587031215611634578283fd5b61163d856115ee565b935061164b602086016115ee565b9250611659604086016115ee565b9150611667606086016115ee565b905092959194509250565b60008060408385031215611684578182fd5b61168d836115ee565b9150602083013567ffffffffffffffff808211156116a9578283fd5b818501915085601f8301126116bc578283fd5b8135818111156116ce576116ce6119c7565b604051601f8201601f19908116603f011681019083821181831017156116f6576116f66119c7565b8160405282815288602084870101111561170e578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600060208284031215611740578081fd5b81518015158114610cca578182fd5b600060208284031215611760578081fd5b5035919050565b60008060408385031215611779578182fd5b82359150611789602084016115ee565b90509250929050565b6000602082840312156117a3578081fd5b81356001600160e01b031981168114610cca578182fd5b6000602082840312156117cb578081fd5b5051919050565b600080604083850312156117e4578182fd5b823563ffffffff811681146117f7578283fd5b946020939093013593505050565b6000825161181781846020870161196e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008252835161185981601785016020880161196e565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161188a81602884016020880161196e565b01602801949350505050565b60006020825282518060208401526118b581604085016020870161196e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561192a5761192a6119b1565b500190565b60008261194a57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611969576119696119b1565b500290565b60005b83811015611989578181015183820152602001611971565b838111156107315750506000910152565b6000816119a9576119a96119b1565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200751baaf5eb84fb56af5e2e9a2566a20965cf18b7fd33cd61861883e83964ec164736f6c63430008030033", + "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." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "Treasury Contract ", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 16942, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "paymentToken", + "offset": 0, + "slot": "251", + "type": "t_address" + }, + { + "astId": 16944, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "floatToken", + "offset": 0, + "slot": "252", + "type": "t_address" + }, + { + "astId": 16946, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "longShort", + "offset": 0, + "slot": "253", + "type": "t_address" + }, + { + "astId": 16948, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "basePrice", + "offset": 0, + "slot": "254", + "type": "t_uint256" + }, + { + "astId": 16950, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "redemptionsActivated", + "offset": 0, + "slot": "255", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/TreasuryAlpha_Proxy.json b/deployments/mumbai/TreasuryAlpha_Proxy.json new file mode 100644 index 0000000..0337939 --- /dev/null +++ b/deployments/mumbai/TreasuryAlpha_Proxy.json @@ -0,0 +1,192 @@ +{ + "address": "0x733FC3a395a35904045Ab6a3678601512c244003", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x733FC3a395a35904045Ab6a3678601512c244003", + "transactionIndex": 0, + "gasUsed": "417871", + "logsBloom": "0x00000004000000000000000000000000410000000000000000000004000000000000000002000000000000008000000000008000002000000000000000004000000000000000000000000000000002800000000020000000040100000000000000000000020000200000000000000800000004000000000880010000000000000000000000000000000000000000004020000000000000000000000000000000200000000000000000000000000000000000000000000000001040000000004000000020000000000001000000000000100000000000008100500000000020000080000000000000000000000002000000000000004000000000000000100000", + "blockHash": "0xe372e0fb30a77ab9e70ec6771be1f34b8d8c72f69c29393e74a1364b0a74b349", + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18868860, + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "address": "0x733FC3a395a35904045Ab6a3678601512c244003", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000078865bfbb624e875cede11f4bd23a1544652ba0f" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xe372e0fb30a77ab9e70ec6771be1f34b8d8c72f69c29393e74a1364b0a74b349" + }, + { + "transactionIndex": 0, + "blockNumber": 18868860, + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "address": "0x733FC3a395a35904045Ab6a3678601512c244003", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xe372e0fb30a77ab9e70ec6771be1f34b8d8c72f69c29393e74a1364b0a74b349" + }, + { + "transactionIndex": 0, + "blockNumber": 18868860, + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "address": "0x733FC3a395a35904045Ab6a3678601512c244003", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xe372e0fb30a77ab9e70ec6771be1f34b8d8c72f69c29393e74a1364b0a74b349" + }, + { + "transactionIndex": 0, + "blockNumber": 18868860, + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "address": "0x733FC3a395a35904045Ab6a3678601512c244003", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xe372e0fb30a77ab9e70ec6771be1f34b8d8c72f69c29393e74a1364b0a74b349" + }, + { + "transactionIndex": 0, + "blockNumber": 18868860, + "transactionHash": "0x211777679339ec1049fa66673d1069ec5dff5f52267d05b185ba690182f43d4d", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x00000000000000000000000000000000000000000000000000047427858d02000000000000000000000000000000000000000000000000000812522dcf93bacd000000000000000000000000000000000000000000000168e7373c101b2ddea3000000000000000000000000000000000000000000000000080dde064a06b8cd000000000000000000000000000000000000000000000168e73bb037a0bae0a3", + "logIndex": 4, + "blockHash": "0xe372e0fb30a77ab9e70ec6771be1f34b8d8c72f69c29393e74a1364b0a74b349" + } + ], + "blockNumber": 18868860, + "cumulativeGasUsed": "417871", + "status": 1, + "byzantium": true + }, + "args": [ + "0x78865bFBB624e875ceDE11f4bD23A1544652ba0F", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0xf8c8765e0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61000000000000000000000000001b3b4d0f3714ca98ba10f6042daebf0b1b7b6f0000000000000000000000002827c87a2fc35b0d20e414df5358b95264ac726e00000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/YieldManagerBTC.json b/deployments/mumbai/YieldManagerBTC.json new file mode 100644 index 0000000..fd18434 --- /dev/null +++ b/deployments/mumbai/YieldManagerBTC.json @@ -0,0 +1,780 @@ +{ + "address": "0x5E7e616e0Ed478e6B8f4c142f261D9A66d512951", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ClaimAaveRewardTokenToTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "WithdrawTreasuryFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unrealizedYield", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "YieldDistributed", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aaveIncentivesController", + "outputs": [ + { + "internalType": "contract IAaveIncentivesController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "amountReservedInCaseOfInsufficientAaveLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimAaveRewardsToTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositPaymentToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "totalValueRealizedForMarket", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "distributeYieldForTreasuryAndReturnMarketAllocation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_aToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_lendingPoolAddressesProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "_aaveIncentivesController", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_aaveReferralCode", + "type": "uint16" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeForMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lendingPoolAddressesProvider", + "outputs": [ + { + "internalType": "contract ILendingPoolAddressesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paymentToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "removePaymentTokenFromMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalReservedForTreasury", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferPaymentTokensToUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateLatestLendingPoolAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawTreasuryFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x5E7e616e0Ed478e6B8f4c142f261D9A66d512951", + "transactionIndex": 0, + "gasUsed": "519957", + "logsBloom": "0x00000004000000000000000000000040410000000000000000000000000000020000000002000000000000008000000000018020000000000000000000208000000000000000000000000000000002800000000220000000000100000000000000000000020000000000000000000800008000000000000880010000000000000002000000000000000000000000004020000000800000000000008000000000220000000000004000000000000000000000080000000000001000000000024000000020000000400001000000000000100000000000008100504000000020000090000000000000000000000000000000000000800000000000002000100000", + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c", + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869336, + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "address": "0x5E7e616e0Ed478e6B8f4c142f261D9A66d512951", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000001f65033ef6890e63517fe8fbbcdd5489938c7f99" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c" + }, + { + "transactionIndex": 0, + "blockNumber": 18869336, + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "address": "0x5E7e616e0Ed478e6B8f4c142f261D9A66d512951", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c" + }, + { + "transactionIndex": 0, + "blockNumber": 18869336, + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "address": "0x5E7e616e0Ed478e6B8f4c142f261D9A66d512951", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c" + }, + { + "transactionIndex": 0, + "blockNumber": 18869336, + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "address": "0x5E7e616e0Ed478e6B8f4c142f261D9A66d512951", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c" + }, + { + "transactionIndex": 0, + "blockNumber": 18869336, + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "address": "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000005e7e616e0ed478e6b8f4c142f261d9a66d512951", + "0x0000000000000000000000009198f13b08e299d85e096929fa9781a1e3d5d827" + ], + "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "logIndex": 4, + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c" + }, + { + "transactionIndex": 0, + "blockNumber": 18869336, + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" + ], + "data": "0x00000000000000000000000000000000000000000000000000058ab1c4d9b60000000000000000000000000000000000000000000000000006ee758d9285d4cd0000000000000000000000000000000000000000000000000ddc5d6db7f04c3400000000000000000000000000000000000000000000000006e8eadbcdac1ecd0000000000000000000000000000000000000000000000000de1e81f7cca0234", + "logIndex": 5, + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c" + } + ], + "blockNumber": 18869336, + "cumulativeGasUsed": "519957", + "status": 1, + "byzantium": true + }, + "args": [ + "0x1f65033EF6890E63517Fe8fbBcDD5489938C7f99", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x5d3a389000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000733fc3a395a35904045ab6a3678601512c244003000000000000000000000000001b3b4d0f3714ca98ba10f6042daebf0b1b7b6f000000000000000000000000639cb7b21ee2161df9c882483c9d55c90c20ca3e000000000000000000000000178113104fecbcd7ff8669a0150721e231f0fd4b000000000000000000000000d41ae58e803edf4304334acce4dc4ec34a63c64400000000000000000000000000000000000000000000000000000000000000000000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "0x733FC3a395a35904045Ab6a3678601512c244003", + "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F", + "0x639cB7b21ee2161DF9c882483C9D55c90c20Ca3e", + "0x178113104fEcbcD7fF8669a0150721e231F0FD4B", + "0xd41aE58e803Edf4304334acCE4DC4Ec34a63C644", + 0, + "0x2740EA9F72B23372621D8D718F52609b80c24E61" + ] + }, + "implementation": "0x1f65033EF6890E63517Fe8fbBcDD5489938C7f99", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/YieldManagerBTC_Implementation.json b/deployments/mumbai/YieldManagerBTC_Implementation.json new file mode 100644 index 0000000..eb22119 --- /dev/null +++ b/deployments/mumbai/YieldManagerBTC_Implementation.json @@ -0,0 +1,1034 @@ +{ + "address": "0x1f65033EF6890E63517Fe8fbBcDD5489938C7f99", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ClaimAaveRewardTokenToTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "WithdrawTreasuryFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unrealizedYield", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "YieldDistributed", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aaveIncentivesController", + "outputs": [ + { + "internalType": "contract IAaveIncentivesController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "amountReservedInCaseOfInsufficientAaveLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimAaveRewardsToTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositPaymentToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "totalValueRealizedForMarket", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "distributeYieldForTreasuryAndReturnMarketAllocation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_aToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_lendingPoolAddressesProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "_aaveIncentivesController", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_aaveReferralCode", + "type": "uint16" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeForMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lendingPoolAddressesProvider", + "outputs": [ + { + "internalType": "contract ILendingPoolAddressesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paymentToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "removePaymentTokenFromMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalReservedForTreasury", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferPaymentTokensToUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateLatestLendingPoolAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawTreasuryFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xa1316dac6bed77b5060c01f11bb7b4acfbd7056c663d5ee5c6efabb21287977f", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x1f65033EF6890E63517Fe8fbBcDD5489938C7f99", + "transactionIndex": 2, + "gasUsed": "2004865", + "logsBloom": "0x00000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000018020000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000024000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x23b02677ce33831fd11d637996cb49550ba0766b305391971426def555d49495", + "transactionHash": "0xa1316dac6bed77b5060c01f11bb7b4acfbd7056c663d5ee5c6efabb21287977f", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 18869331, + "transactionHash": "0xa1316dac6bed77b5060c01f11bb7b4acfbd7056c663d5ee5c6efabb21287977f", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" + ], + "data": "0x00000000000000000000000000000000000000000000000000155e3e06715e000000000000000000000000000000000000000000000000000703d3cb98f732cd0000000000000000000000000000000000000000000000000dbe6b3e40d9243400000000000000000000000000000000000000000000000006ee758d9285d4cd0000000000000000000000000000000000000000000000000dd3c97c474a8234", + "logIndex": 10, + "blockHash": "0x23b02677ce33831fd11d637996cb49550ba0766b305391971426def555d49495" + } + ], + "blockNumber": 18869331, + "cumulativeGasUsed": "2543809", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ClaimAaveRewardTokenToTreasury\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"WithdrawTreasuryFunds\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unrealizedYield\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryYieldPercent_e18\",\"type\":\"uint256\"}],\"name\":\"YieldDistributed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"aToken\",\"outputs\":[{\"internalType\":\"contract IERC20Upgradeable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"aaveIncentivesController\",\"outputs\":[{\"internalType\":\"contract IAaveIncentivesController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amountReservedInCaseOfInsufficientAaveLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimAaveRewardsToTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositPaymentToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"totalValueRealizedForMarket\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"treasuryYieldPercent_e18\",\"type\":\"uint256\"}],\"name\":\"distributeYieldForTreasuryAndReturnMarketAllocation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_treasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_paymentToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_aToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_lendingPoolAddressesProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_aaveIncentivesController\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_aaveReferralCode\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeForMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lendingPoolAddressesProvider\",\"outputs\":[{\"internalType\":\"contract ILendingPoolAddressesProvider\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paymentToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"removePaymentTokenFromMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalReservedForTreasury\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferPaymentTokensToUser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateLatestLendingPoolAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawTreasuryFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"https://docs.aave.com/portal/\",\"kind\":\"dev\",\"methods\":{\"claimAaveRewardsToTreasury()\":{\"details\":\"This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued\"},\"depositPaymentToken(uint256)\":{\"params\":{\"amount\":\"Amount of payment token to deposit\"}},\"distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)\":{\"details\":\"treasuryPercent = 1 - marketPercent\",\"params\":{\"totalValueRealizedForMarket\":\"total value of long and short side of the market\",\"treasuryYieldPercent_e18\":\"Percentage of yield in base 1e18 that is allocated to the treasury\"},\"returns\":{\"_0\":\"The market allocation of the yield\"}},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address,address,address,address,uint16,address)\":{\"details\":\"referral code will be set to 0, depricated Aave feature\",\"params\":{\"_aToken\":\"address of the interest accruing token linked to the payment token\",\"_aaveReferralCode\":\"unique code for aave referrals\",\"_admin\":\"admin for the contract\",\"_lendingPoolAddressesProvider\":\"address of the aave lending pool address provider contract\",\"_longShort\":\"address of the longShort contract\",\"_paymentToken\":\"address of the payment token\",\"_treasury\":\"address of the treasury contract\"}},\"removePaymentTokenFromMarket(uint256)\":{\"details\":\"This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave. This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.\",\"params\":{\"amount\":\"Amount of payment token to withdraw\"}},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"transferPaymentTokensToUser(address,uint256)\":{\"params\":{\"amount\":\"Amount of payment token to pay to user\",\"user\":\"User to recieve the payout\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"stateVariables\":{\"aToken\":{\"details\":\"ADAI token\"},\"amountReservedInCaseOfInsufficientAaveLiquidity\":{\"details\":\"This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal. In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available.\"},\"paymentToken\":{\"details\":\"DAI token\"},\"referralCode\":{\"details\":\"An aave specific referralCode that has been a depricated feature. This will be set to 0 for \\\"no referral\\\" at deployment\"}},\"title\":\"YieldManagerAave\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"aToken()\":{\"notice\":\"The token representing the interest accruing payment token position from Aave\"},\"aaveIncentivesController()\":{\"notice\":\"The specific Aave incentives controller contract\"},\"claimAaveRewardsToTreasury()\":{\"notice\":\"Allows for withdrawal of aave rewards to the treasury contract\"},\"depositPaymentToken(uint256)\":{\"notice\":\"Allows the LongShort contract to deposit tokens into the aave pool\"},\"distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)\":{\"notice\":\"Calculates and updates the yield allocation to the treasury and the market\"},\"initialize(address,address,address,address,address,address,uint16,address)\":{\"notice\":\"Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts\"},\"initializeForMarket()\":{\"notice\":\"Initializes a specific yield manager to a given market\"},\"isInitialized()\":{\"notice\":\"boolean to prevent markets using an already initialized market\"},\"lendingPoolAddressesProvider()\":{\"notice\":\"The specific Aave lending pool address provider contract\"},\"longShort()\":{\"notice\":\"address of longShort contract\"},\"paymentToken()\":{\"notice\":\"The payment token the yield manager supports\"},\"removePaymentTokenFromMarket(uint256)\":{\"notice\":\"Allows the LongShort contract to redeem aTokens for the payment token\"},\"totalReservedForTreasury()\":{\"notice\":\"distributed yield not yet transferred to the treasury\"},\"transferPaymentTokensToUser(address,uint256)\":{\"notice\":\"Allows the LongShort pay out a user from tokens already withdrawn from Aave\"},\"treasury()\":{\"notice\":\"address of treasury contract - this is the address that can claim aave incentives rewards\"},\"withdrawTreasuryFunds()\":{\"notice\":\"Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\"}},\"notice\":\"contract is used to manage the yield generated by the underlying tokens. YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol. Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that continuously accrues interest based on a lend/borrow liquidity ratio.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/YieldManagerAave.sol\":\"YieldManagerAave\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"contracts/YieldManagerAave.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\n\\nimport \\\"hardhat/console.sol\\\";\\n\\nimport \\\"./interfaces/IYieldManager.sol\\\";\\nimport \\\"./interfaces/aave/ILendingPool.sol\\\";\\nimport \\\"./interfaces/aave/ILendingPoolAddressesProvider.sol\\\";\\nimport \\\"./interfaces/aave/IAaveIncentivesController.sol\\\";\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\n/** @title YieldManagerAave\\n @notice contract is used to manage the yield generated by the underlying tokens.\\n YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol.\\n Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that\\n continuously accrues interest based on a lend/borrow liquidity ratio.\\n @dev https://docs.aave.com/portal/\\n */\\ncontract YieldManagerAave is IYieldManager, AccessControlledAndUpgradeable {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 VARIABLES \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice address of longShort contract\\n address public longShort;\\n /// @notice address of treasury contract - this is the address that can claim aave incentives rewards\\n address public treasury;\\n\\n /// @notice boolean to prevent markets using an already initialized market\\n bool public isInitialized;\\n\\n /// @notice The payment token the yield manager supports\\n /// @dev DAI token\\n IERC20 public paymentToken;\\n /// @notice The token representing the interest accruing payment token position from Aave\\n /// @dev ADAI token\\n IERC20Upgradeable public aToken;\\n /// @notice The specific Aave lending pool address provider contract\\n ILendingPoolAddressesProvider public lendingPoolAddressesProvider;\\n /// @notice The specific Aave incentives controller contract\\n IAaveIncentivesController public aaveIncentivesController;\\n\\n /// @dev An aave specific referralCode that has been a depricated feature. This will be set to 0 for \\\"no referral\\\" at deployment\\n uint16 referralCode;\\n\\n /// @notice distributed yield not yet transferred to the treasury\\n uint256 public override totalReservedForTreasury;\\n\\n /// @dev This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal.\\n /// In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available.\\n uint256 public amountReservedInCaseOfInsufficientAaveLiquidity;\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MODIFIERS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @dev only allow longShort contract to execute modified functions\\n modifier longShortOnly() {\\n require(msg.sender == longShort, \\\"Not longShort\\\");\\n _;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 CONTRACT SET-UP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts\\n @param _longShort address of the longShort contract\\n @param _treasury address of the treasury contract\\n @param _paymentToken address of the payment token\\n @param _aToken address of the interest accruing token linked to the payment token\\n @param _lendingPoolAddressesProvider address of the aave lending pool address provider contract\\n @param _aaveReferralCode unique code for aave referrals\\n @param _admin admin for the contract\\n @dev referral code will be set to 0, depricated Aave feature\\n */\\n function initialize(\\n address _longShort,\\n address _treasury,\\n address _paymentToken,\\n address _aToken,\\n address _lendingPoolAddressesProvider,\\n address _aaveIncentivesController,\\n uint16 _aaveReferralCode,\\n address _admin\\n ) external initializer {\\n require(\\n _longShort != address(0) &&\\n _treasury != address(0) &&\\n _paymentToken != address(0) &&\\n _aToken != address(0) &&\\n _lendingPoolAddressesProvider != address(0) &&\\n _aaveIncentivesController != address(0) &&\\n _admin != address(0)\\n );\\n\\n longShort = _longShort;\\n treasury = _treasury;\\n\\n _AccessControlledAndUpgradeable_init(_admin);\\n\\n referralCode = _aaveReferralCode;\\n\\n paymentToken = IERC20(_paymentToken);\\n aToken = IERC20Upgradeable(_aToken);\\n lendingPoolAddressesProvider = ILendingPoolAddressesProvider(_lendingPoolAddressesProvider);\\n aaveIncentivesController = IAaveIncentivesController(_aaveIncentivesController);\\n\\n // Approve tokens for aave lending pool maximally.\\n IERC20(_paymentToken).approve(\\n ILendingPoolAddressesProvider(_lendingPoolAddressesProvider).getLendingPool(),\\n type(uint256).max\\n );\\n }\\n\\n function updateLatestLendingPoolAddress() external {\\n IERC20(paymentToken).approve(lendingPoolAddressesProvider.getLendingPool(), type(uint256).max);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 IMPLEMENTATION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Allows the LongShort contract to deposit tokens into the aave pool\\n @param amount Amount of payment token to deposit\\n */\\n function depositPaymentToken(uint256 amount) external override longShortOnly {\\n // If amountReservedInCaseOfInsufficientAaveLiquidity isn't zero, then efficiently net the difference between the amount\\n // It basically always be zero besides extreme and unlikely situations with aave.\\n if (amountReservedInCaseOfInsufficientAaveLiquidity != 0) {\\n if (amountReservedInCaseOfInsufficientAaveLiquidity >= amount) {\\n amountReservedInCaseOfInsufficientAaveLiquidity -= amount;\\n // Return early, nothing to deposit into the lending pool\\n return;\\n } else {\\n amount -= amountReservedInCaseOfInsufficientAaveLiquidity;\\n amountReservedInCaseOfInsufficientAaveLiquidity = 0;\\n }\\n }\\n\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).deposit(\\n address(paymentToken),\\n amount,\\n address(this),\\n referralCode\\n );\\n }\\n\\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\\n /// @param user User to recieve the payout\\n /// @param amount Amount of payment token to pay to user\\n function transferPaymentTokensToUser(address user, uint256 amount)\\n external\\n override\\n longShortOnly\\n {\\n try paymentToken.transfer(user, amount) returns (bool transferSuccess) {\\n if (transferSuccess) {\\n // If the transfer is successful return early, otherwise try pay the user out with the amountReservedInCaseOfInsufficientAaveLiquidity\\n return;\\n }\\n } catch {}\\n\\n amountReservedInCaseOfInsufficientAaveLiquidity -= amount;\\n\\n // If this reverts (ie aave unable to make payout), then the whole transaction will revert. User will have to wait until sufficient liquidity available.\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\\n address(paymentToken),\\n amount,\\n user\\n );\\n }\\n\\n /// @notice Allows the LongShort contract to redeem aTokens for the payment token\\n /// @param amount Amount of payment token to withdraw\\n /// @dev This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave.\\n /// This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.\\n function removePaymentTokenFromMarket(uint256 amount) external override longShortOnly {\\n try\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\\n address(paymentToken),\\n amount,\\n address(this)\\n )\\n {} catch {\\n // In theory we should only catch `VL_CURRENT_AVAILABLE_LIQUIDITY_NOT_ENOUGH` errors.\\n // Safe to revert on all errors, if aave completely blocks withdrawals the amountReservedInCaseOfInsufficientAaveLiquidity can grow until it is fixed without problems.\\n amountReservedInCaseOfInsufficientAaveLiquidity += amount;\\n }\\n }\\n\\n /**\\n @notice Allows for withdrawal of aave rewards to the treasury contract\\n @dev This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued\\n */\\n function claimAaveRewardsToTreasury() external {\\n IAaveIncentivesController _aaveIncentivesController = IAaveIncentivesController(\\n aaveIncentivesController\\n );\\n uint256 amount = _aaveIncentivesController.getUserUnclaimedRewards(address(this));\\n\\n address[] memory aTokenAddresses = new address[](1);\\n aTokenAddresses[0] = address(aToken);\\n\\n _aaveIncentivesController.claimRewards(aTokenAddresses, amount, treasury);\\n\\n emit ClaimAaveRewardTokenToTreasury(amount);\\n }\\n\\n /**\\n @notice Calculates and updates the yield allocation to the treasury and the market\\n @dev treasuryPercent = 1 - marketPercent\\n @param totalValueRealizedForMarket total value of long and short side of the market\\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\\n @return The market allocation of the yield\\n */\\n function distributeYieldForTreasuryAndReturnMarketAllocation(\\n uint256 totalValueRealizedForMarket,\\n uint256 treasuryYieldPercent_e18\\n ) external override longShortOnly returns (uint256) {\\n uint256 totalHeld = aToken.balanceOf(address(this));\\n uint256 _totalReservedForTreasury = totalReservedForTreasury;\\n\\n uint256 totalRealized = totalValueRealizedForMarket +\\n _totalReservedForTreasury +\\n amountReservedInCaseOfInsufficientAaveLiquidity;\\n\\n if (totalRealized == totalHeld) {\\n return 0;\\n }\\n\\n // will revert in case totalRealized > totalHeld which should never occur since yield is always possitive with aave.\\n uint256 unrealizedYield = totalHeld - totalRealized;\\n\\n uint256 amountForTreasury = (unrealizedYield * treasuryYieldPercent_e18) / 1e18;\\n uint256 amountForMarketIncentives = unrealizedYield - amountForTreasury;\\n\\n totalReservedForTreasury = _totalReservedForTreasury + amountForTreasury;\\n\\n emit YieldDistributed(unrealizedYield, treasuryYieldPercent_e18);\\n\\n return amountForMarketIncentives;\\n }\\n\\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\\n function withdrawTreasuryFunds() external override {\\n uint256 amountToWithdrawForTreasury = totalReservedForTreasury;\\n totalReservedForTreasury = 0;\\n\\n // Redeem aToken for payment tokens.\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\\n address(paymentToken),\\n amountToWithdrawForTreasury,\\n treasury\\n );\\n\\n emit WithdrawTreasuryFunds();\\n }\\n\\n /// @notice Initializes a specific yield manager to a given market\\n function initializeForMarket() external override longShortOnly {\\n require(!isInitialized, \\\"Yield Manager is already in use\\\");\\n isInitialized = true;\\n }\\n}\\n\",\"keccak256\":\"0xd3a5c43ccb432cbffbbeed4df6a43898269be3869b9639d14a15db75d29531ce\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IYieldManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/// @notice Manages yield accumulation for the LongShort contract. Each market is deployed with its own yield manager to simplify the bookkeeping, as different markets may share a payment token and yield pool.\\nabstract contract IYieldManager {\\n event ClaimAaveRewardTokenToTreasury(uint256 amount);\\n\\n event YieldDistributed(uint256 unrealizedYield, uint256 treasuryYieldPercent_e18);\\n\\n /// @dev This is purely saving some gas, but the subgraph will know how much is due for the treasury at all times - no need to include in event.\\n event WithdrawTreasuryFunds();\\n\\n /// @notice distributed yield not yet transferred to the treasury\\n function totalReservedForTreasury() external virtual returns (uint256);\\n\\n /// @notice Deposits the given amount of payment tokens into this yield manager.\\n /// @param amount Amount of payment token to deposit\\n function depositPaymentToken(uint256 amount) external virtual;\\n\\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\\n /// @param user User to recieve the payout\\n /// @param amount Amount of payment token to pay to user\\n function transferPaymentTokensToUser(address user, uint256 amount) external virtual;\\n\\n /// @notice Withdraws the given amount of tokens from this yield manager.\\n /// @param amount Amount of payment token to withdraw\\n function removePaymentTokenFromMarket(uint256 amount) external virtual;\\n\\n /** \\n @notice Calculates and updates the yield allocation to the treasury and the market\\n @dev treasuryPercent = 1 - marketPercent\\n @param totalValueRealizedForMarket total value of long and short side of the market\\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\\n @return amountForMarketIncentives The market allocation of the yield\\n */\\n function distributeYieldForTreasuryAndReturnMarketAllocation(\\n uint256 totalValueRealizedForMarket,\\n uint256 treasuryYieldPercent_e18\\n ) external virtual returns (uint256 amountForMarketIncentives);\\n\\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\\n function withdrawTreasuryFunds() external virtual;\\n\\n /// @notice Initializes a specific yield manager to a given market\\n function initializeForMarket() external virtual;\\n}\\n\",\"keccak256\":\"0x20116e375d536c6ee7bec74d1ee5c1a552465a79fc8f1f2a9e2428078d3648f6\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/DataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\nlibrary DataTypes {\\n // refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.\\n struct ReserveData {\\n //stores the reserve configuration\\n ReserveConfigurationMap configuration;\\n //the liquidity index. Expressed in ray\\n uint128 liquidityIndex;\\n //variable borrow index. Expressed in ray\\n uint128 variableBorrowIndex;\\n //the current supply rate. Expressed in ray\\n uint128 currentLiquidityRate;\\n //the current variable borrow rate. Expressed in ray\\n uint128 currentVariableBorrowRate;\\n //the current stable borrow rate. Expressed in ray\\n uint128 currentStableBorrowRate;\\n uint40 lastUpdateTimestamp;\\n //tokens addresses\\n address aTokenAddress;\\n address stableDebtTokenAddress;\\n address variableDebtTokenAddress;\\n //address of the interest rate strategy\\n address interestRateStrategyAddress;\\n //the id of the reserve. Represents the position in the list of the active reserves\\n uint8 id;\\n }\\n\\n struct ReserveConfigurationMap {\\n //bit 0-15: LTV\\n //bit 16-31: Liq. threshold\\n //bit 32-47: Liq. bonus\\n //bit 48-55: Decimals\\n //bit 56: Reserve is active\\n //bit 57: reserve is frozen\\n //bit 58: borrowing is enabled\\n //bit 59: stable rate borrowing enabled\\n //bit 60-63: reserved\\n //bit 64-79: reserve factor\\n uint256 data;\\n }\\n\\n struct UserConfigurationMap {\\n uint256 data;\\n }\\n\\n enum InterestRateMode {\\n NONE,\\n STABLE,\\n VARIABLE\\n }\\n}\\n\",\"keccak256\":\"0xdfb8a94fa45a4d85eb7003871c10282ce4cbd709becb01a6cba988f6444fdbfd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/IAaveIncentivesController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\ninterface IAaveIncentivesController {\\n event RewardsClaimed(address indexed user, address indexed to, uint256 amount);\\n\\n function claimRewards(\\n address[] calldata assets,\\n uint256 amount,\\n address to\\n ) external returns (uint256);\\n\\n function getUserUnclaimedRewards(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xad57de8f82dee132c99314f6e7d80a003082aa7354671f09e45ed496fc56fc02\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/ILendingPool.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\nimport {ILendingPoolAddressesProvider} from \\\"./ILendingPoolAddressesProvider.sol\\\";\\nimport {DataTypes} from \\\"./DataTypes.sol\\\";\\n\\ninterface ILendingPool {\\n /**\\n * @dev Emitted on deposit()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address initiating the deposit\\n * @param onBehalfOf The beneficiary of the deposit, receiving the aTokens\\n * @param amount The amount deposited\\n * @param referral The referral code used\\n **/\\n event Deposit(\\n address indexed reserve,\\n address user,\\n address indexed onBehalfOf,\\n uint256 amount,\\n uint16 indexed referral\\n );\\n\\n /**\\n * @dev Emitted on withdraw()\\n * @param reserve The address of the underlyng asset being withdrawn\\n * @param user The address initiating the withdrawal, owner of aTokens\\n * @param to Address that will receive the underlying\\n * @param amount The amount to be withdrawn\\n **/\\n event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);\\n\\n /**\\n * @dev Emitted on borrow() and flashLoan() when debt needs to be opened\\n * @param reserve The address of the underlying asset being borrowed\\n * @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just\\n * initiator of the transaction on flashLoan()\\n * @param onBehalfOf The address that will be getting the debt\\n * @param amount The amount borrowed out\\n * @param borrowRateMode The rate mode: 1 for Stable, 2 for Variable\\n * @param borrowRate The numeric rate at which the user has borrowed\\n * @param referral The referral code used\\n **/\\n event Borrow(\\n address indexed reserve,\\n address user,\\n address indexed onBehalfOf,\\n uint256 amount,\\n uint256 borrowRateMode,\\n uint256 borrowRate,\\n uint16 indexed referral\\n );\\n\\n /**\\n * @dev Emitted on repay()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The beneficiary of the repayment, getting his debt reduced\\n * @param repayer The address of the user initiating the repay(), providing the funds\\n * @param amount The amount repaid\\n **/\\n event Repay(\\n address indexed reserve,\\n address indexed user,\\n address indexed repayer,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Emitted on swapBorrowRateMode()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user swapping his rate mode\\n * @param rateMode The rate mode that the user wants to swap to\\n **/\\n event Swap(address indexed reserve, address indexed user, uint256 rateMode);\\n\\n /**\\n * @dev Emitted on setUserUseReserveAsCollateral()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user enabling the usage as collateral\\n **/\\n event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on setUserUseReserveAsCollateral()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user enabling the usage as collateral\\n **/\\n event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on rebalanceStableBorrowRate()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user for which the rebalance has been executed\\n **/\\n event RebalanceStableBorrowRate(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on flashLoan()\\n * @param target The address of the flash loan receiver contract\\n * @param initiator The address initiating the flash loan\\n * @param asset The address of the asset being flash borrowed\\n * @param amount The amount flash borrowed\\n * @param premium The fee flash borrowed\\n * @param referralCode The referral code used\\n **/\\n event FlashLoan(\\n address indexed target,\\n address indexed initiator,\\n address indexed asset,\\n uint256 amount,\\n uint256 premium,\\n uint16 referralCode\\n );\\n\\n /**\\n * @dev Emitted when the pause is triggered.\\n */\\n event Paused();\\n\\n /**\\n * @dev Emitted when the pause is lifted.\\n */\\n event Unpaused();\\n\\n /**\\n * @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via\\n * LendingPoolCollateral manager using a DELEGATECALL\\n * This allows to have the events in the generated ABI for LendingPool.\\n * @param collateralAsset The address of the underlying asset used as collateral,\\n * to receive as result of the liquidation.\\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\\n * @param user The address of the borrower getting liquidated\\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\\n * @param liquidatedCollateralAmount The amount of collateral received by the liiquidator\\n * @param liquidator The address of the liquidator\\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\\n * to receive the underlying collateral asset directly\\n **/\\n event LiquidationCall(\\n address indexed collateralAsset,\\n address indexed debtAsset,\\n address indexed user,\\n uint256 debtToCover,\\n uint256 liquidatedCollateralAmount,\\n address liquidator,\\n bool receiveAToken\\n );\\n\\n /**\\n * @dev Emitted when the state of a reserve is updated. NOTE: This event is actually declared\\n * in the ReserveLogic library and emitted in the updateInterestRates() function. Since the function is internal,\\n * the event will actually be fired by the LendingPool contract. The event is therefore replicated here so it\\n * gets added to the LendingPool ABI\\n * @param reserve The address of the underlying asset of the reserve\\n * @param liquidityRate The new liquidity rate\\n * @param stableBorrowRate The new stable borrow rate\\n * @param variableBorrowRate The new variable borrow rate\\n * @param liquidityIndex The new liquidity index\\n * @param variableBorrowIndex The new variable borrow index\\n **/\\n event ReserveDataUpdated(\\n address indexed reserve,\\n uint256 liquidityRate,\\n uint256 stableBorrowRate,\\n uint256 variableBorrowRate,\\n uint256 liquidityIndex,\\n uint256 variableBorrowIndex\\n );\\n\\n /**\\n * @dev Deposits an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\\n * - E.g. User deposits 100 USDC and gets in return 100 aUSDC\\n * @param asset The address of the underlying asset to deposit\\n * @param amount The amount to be deposited\\n * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\\n * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\\n * is a different wallet\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n **/\\n function deposit(\\n address asset,\\n uint256 amount,\\n address onBehalfOf,\\n uint16 referralCode\\n ) external;\\n\\n /**\\n * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned\\n * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC\\n * @param asset The address of the underlying asset to withdraw\\n * @param amount The underlying amount to be withdrawn\\n * - Send the value type(uint256).max in order to withdraw the whole aToken balance\\n * @param to Address that will receive the underlying, same as msg.sender if the user\\n * wants to receive it on his own wallet, or a different address if the beneficiary is a\\n * different wallet\\n * @return The final amount withdrawn\\n **/\\n function withdraw(\\n address asset,\\n uint256 amount,\\n address to\\n ) external returns (uint256);\\n\\n /**\\n * @dev Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower\\n * already deposited enough collateral, or he was given enough allowance by a credit delegator on the\\n * corresponding debt token (StableDebtToken or VariableDebtToken)\\n * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet\\n * and 100 stable/variable debt tokens, depending on the `interestRateMode`\\n * @param asset The address of the underlying asset to borrow\\n * @param amount The amount to be borrowed\\n * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n * @param onBehalfOf Address of the user who will receive the debt. Should be the address of the borrower itself\\n * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator\\n * if he has been given credit delegation allowance\\n **/\\n function borrow(\\n address asset,\\n uint256 amount,\\n uint256 interestRateMode,\\n uint16 referralCode,\\n address onBehalfOf\\n ) external;\\n\\n /**\\n * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned\\n * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address\\n * @param asset The address of the borrowed underlying asset previously borrowed\\n * @param amount The amount to repay\\n * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\\n * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable\\n * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the\\n * user calling the function if he wants to reduce/remove his own debt, or the address of any other\\n * other borrower whose debt should be removed\\n * @return The final amount repaid\\n **/\\n function repay(\\n address asset,\\n uint256 amount,\\n uint256 rateMode,\\n address onBehalfOf\\n ) external returns (uint256);\\n\\n /**\\n * @dev Allows a borrower to swap his debt between stable and variable mode, or viceversa\\n * @param asset The address of the underlying asset borrowed\\n * @param rateMode The rate mode that the user wants to swap to\\n **/\\n function swapBorrowRateMode(address asset, uint256 rateMode) external;\\n\\n /**\\n * @dev Rebalances the stable interest rate of a user to the current stable rate defined on the reserve.\\n * - Users can be rebalanced if the following conditions are satisfied:\\n * 1. Usage ratio is above 95%\\n * 2. the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate,\\n * which means that too much has been borrowed at a stable rate and depositors are not earning enough\\n * @param asset The address of the underlying asset borrowed\\n * @param user The address of the user to be rebalanced\\n **/\\n function rebalanceStableBorrowRate(address asset, address user) external;\\n\\n /**\\n * @dev Allows depositors to enable/disable a specific deposited asset as collateral\\n * @param asset The address of the underlying asset deposited\\n * @param useAsCollateral `true` if the user wants to use the deposit as collateral, `false` otherwise\\n **/\\n function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external;\\n\\n /**\\n * @dev Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1\\n * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives\\n * a proportionally amount of the `collateralAsset` plus a bonus to cover market risk\\n * @param collateralAsset The address of the underlying asset used as collateral,\\n * to receive as result of the liquidation.\\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\\n * @param user The address of the borrower getting liquidated\\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\\n * to receive the underlying collateral asset directly\\n **/\\n function liquidationCall(\\n address collateralAsset,\\n address debtAsset,\\n address user,\\n uint256 debtToCover,\\n bool receiveAToken\\n ) external;\\n\\n /**\\n * @dev Allows smartcontracts to access the liquidity of the pool within one transaction,\\n * as long as the amount taken plus a fee is returned.\\n * IMPORTANT There are security concerns for developers of flashloan receiver\\n * contracts that must be kept into consideration.\\n * For further details please visit https://developers.aave.com\\n * @param receiverAddress The address of the contract receiving the funds,\\n * implementing the IFlashLoanReceiver interface.\\n * @param assets The addresses of the assets being flash-borrowed\\n * @param amounts The amounts amounts being flash-borrowed\\n * @param modes Types of the debt to open if the flash loan is not returned:\\n * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver\\n * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\\n * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\\n * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2\\n * @param params Variadic packed params to pass to the receiver as extra information\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n **/\\n function flashLoan(\\n address receiverAddress,\\n address[] calldata assets,\\n uint256[] calldata amounts,\\n uint256[] calldata modes,\\n address onBehalfOf,\\n bytes calldata params,\\n uint16 referralCode\\n ) external;\\n\\n /**\\n * @dev Returns the user account data across all the reserves\\n * @param user The address of the user\\n * @return totalCollateralETH the total collateral in ETH of the user\\n * @return totalDebtETH the total debt in ETH of the user\\n * @return availableBorrowsETH the borrowing power left of the user\\n * @return currentLiquidationThreshold the liquidation threshold of the user\\n * @return ltv the loan to value of the user\\n * @return healthFactor the current health factor of the user\\n **/\\n function getUserAccountData(address user)\\n external\\n view\\n returns (\\n uint256 totalCollateralETH,\\n uint256 totalDebtETH,\\n uint256 availableBorrowsETH,\\n uint256 currentLiquidationThreshold,\\n uint256 ltv,\\n uint256 healthFactor\\n );\\n\\n function initReserve(\\n address reserve,\\n address aTokenAddress,\\n address stableDebtAddress,\\n address variableDebtAddress,\\n address interestRateStrategyAddress\\n ) external;\\n\\n function setReserveInterestRateStrategyAddress(address reserve, address rateStrategyAddress)\\n external;\\n\\n function setConfiguration(address reserve, uint256 configuration) external;\\n\\n /**\\n * @dev Returns the configuration of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The configuration of the reserve\\n **/\\n function getConfiguration(address asset)\\n external\\n view\\n returns (DataTypes.ReserveConfigurationMap memory);\\n\\n /**\\n * @dev Returns the configuration of the user across all the reserves\\n * @param user The user address\\n * @return The configuration of the user\\n **/\\n function getUserConfiguration(address user)\\n external\\n view\\n returns (DataTypes.UserConfigurationMap memory);\\n\\n /**\\n * @dev Returns the normalized income normalized income of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The reserve's normalized income\\n */\\n function getReserveNormalizedIncome(address asset) external view returns (uint256);\\n\\n /**\\n * @dev Returns the normalized variable debt per unit of asset\\n * @param asset The address of the underlying asset of the reserve\\n * @return The reserve normalized variable debt\\n */\\n function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);\\n\\n /**\\n * @dev Returns the state and configuration of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The state of the reserve\\n **/\\n function getReserveData(address asset) external view returns (DataTypes.ReserveData memory);\\n\\n function finalizeTransfer(\\n address asset,\\n address from,\\n address to,\\n uint256 amount,\\n uint256 balanceFromAfter,\\n uint256 balanceToBefore\\n ) external;\\n\\n function getReservesList() external view returns (address[] memory);\\n\\n function getAddressesProvider() external view returns (ILendingPoolAddressesProvider);\\n\\n function setPause(bool val) external;\\n\\n function paused() external view returns (bool);\\n}\\n\",\"keccak256\":\"0xdf61949ab12c334f8ae028eafec802ef963fa96c9107309a178e5c7a46b1de37\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/ILendingPoolAddressesProvider.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\n/**\\n * @title LendingPoolAddressesProvider contract\\n * @dev Main registry of addresses part of or connected to the protocol, including permissioned roles\\n * - Acting also as factory of proxies and admin of those, so with right to change its implementations\\n * - Owned by the Aave Governance\\n * @author Aave\\n **/\\ninterface ILendingPoolAddressesProvider {\\n // event MarketIdSet(string newMarketId);\\n // event LendingPoolUpdated(address indexed newAddress);\\n // event ConfigurationAdminUpdated(address indexed newAddress);\\n // event EmergencyAdminUpdated(address indexed newAddress);\\n // event LendingPoolConfiguratorUpdated(address indexed newAddress);\\n // event LendingPoolCollateralManagerUpdated(address indexed newAddress);\\n // event PriceOracleUpdated(address indexed newAddress);\\n // event LendingRateOracleUpdated(address indexed newAddress);\\n // event ProxyCreated(bytes32 id, address indexed newAddress);\\n // event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy);\\n\\n // function getMarketId() external view returns (string memory);\\n\\n // function setMarketId(string calldata marketId) external;\\n\\n // function setAddress(bytes32 id, address newAddress) external;\\n\\n // function setAddressAsProxy(bytes32 id, address impl) external;\\n\\n // function getAddress(bytes32 id) external view returns (address);\\n\\n function getLendingPool() external view returns (address);\\n\\n // function setLendingPoolImpl(address pool) external;\\n\\n // function getLendingPoolConfigurator() external view returns (address);\\n\\n // function setLendingPoolConfiguratorImpl(address configurator) external;\\n\\n // function getLendingPoolCollateralManager() external view returns (address);\\n\\n // function setLendingPoolCollateralManager(address manager) external;\\n\\n // function getPoolAdmin() external view returns (address);\\n\\n // function setPoolAdmin(address admin) external;\\n\\n // function getEmergencyAdmin() external view returns (address);\\n\\n // function setEmergencyAdmin(address admin) external;\\n\\n // function getPriceOracle() external view returns (address);\\n\\n // function setPriceOracle(address priceOracle) external;\\n\\n // function getLendingRateOracle() external view returns (address);\\n\\n // function setLendingRateOracle(address lendingRateOracle) external;\\n}\\n\",\"keccak256\":\"0x706ba21943e504614721ec3a797cfac48edf00cb4c705c4522616f76d3306ff7\",\"license\":\"BUSL-1.1\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061234f806100206000396000f3fe6080604052600436106101c25760003560e01c80634f1ef286116100f757806391d1485411610095578063d547741f11610064578063d547741f146104ff578063eb6bffa21461051f578063edf565cc1461053f578063f72c0d8b14610554576101c2565b806391d148541461048a578063a0c1f15e146104aa578063a217fddf146104ca578063bba00ba5146104df576101c2565b806361d027b3116100d157806361d027b3146103f657806375b238fc146104165780638a5599b21461044a5780639063ee201461046a576101c2565b80634f1ef286146103a25780635d3a3890146103b55780635f2475ca146103d5576101c2565b80632f2ff15d1161016457806336568abe1161013e57806336568abe1461032c5780633659cfe61461034c578063392e53cd1461036c578063447479db1461038d576101c2565b80632f2ff15d146102d75780633013ce29146102f757806334944bb014610317576101c2565b80632429e535116101a05780632429e53514610233578063248a9ca31461025857806329949872146102885780632ae320cb146102c0576101c2565b806301ffc9a7146101c757806315429969146101fc5780631c499b5514610213575b600080fd5b3480156101d357600080fd5b506101e76101e2366004611ffe565b610588565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b506102116105bf565b005b34801561021f57600080fd5b5061021161022e366004611fb7565b6106ca565b34801561023f57600080fd5b5061024a6101015481565b6040519081526020016101f3565b34801561026457600080fd5b5061024a610273366004611fb7565b60009081526065602052604090206001015490565b34801561029457600080fd5b5060fb546102a8906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b3480156102cc57600080fd5b5061024a6101025481565b3480156102e357600080fd5b506102116102f2366004611fcf565b61082c565b34801561030357600080fd5b5060fd546102a8906001600160a01b031681565b34801561032357600080fd5b50610211610858565b34801561033857600080fd5b50610211610347366004611fcf565b6109fa565b34801561035857600080fd5b50610211610367366004611dc7565b610a74565b34801561037857600080fd5b5060fc546101e790600160a01b900460ff1681565b34801561039957600080fd5b50610211610a98565b6102116103b0366004611ead565b610bdc565b3480156103c157600080fd5b506102116103d0366004611dff565b610bf1565b3480156103e157600080fd5b50610100546102a8906001600160a01b031681565b34801561040257600080fd5b5060fc546102a8906001600160a01b031681565b34801561042257600080fd5b5061024a7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561045657600080fd5b5061024a61046536600461203e565b610e88565b34801561047657600080fd5b50610211610485366004611fb7565b610ffa565b34801561049657600080fd5b506101e76104a5366004611fcf565b61116a565b3480156104b657600080fd5b5060fe546102a8906001600160a01b031681565b3480156104d657600080fd5b5061024a600081565b3480156104eb57600080fd5b5060ff546102a8906001600160a01b031681565b34801561050b57600080fd5b5061021161051a366004611fcf565b611195565b34801561052b57600080fd5b5061021161053a366004611f6c565b6111bb565b34801561054b57600080fd5b5061021161139c565b34801561056057600080fd5b5061024a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806105b957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60fd5460ff5460408051630261bf8b60e01b815290516001600160a01b039384169363095ea7b3931691630261bf8b916004808301926020929190829003018186803b15801561060e57600080fd5b505afa158015610622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106469190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611f97565b50565b60fb546001600160a01b031633146106fd5760405162461bcd60e51b81526004016106f490612187565b60405180910390fd5b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561074b57600080fd5b505afa15801561075f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107839190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018490523060448201529116906369328dec90606401602060405180830381600087803b1580156107d657600080fd5b505af1925050508015610806575060408051601f3d908101601f1916820190925261080391810190612026565b60015b6108285780610102600082825461081d91906121fc565b909155506106c79050565b5050565b60008281526065602052604090206001015461084981335b611435565b6108538383611499565b505050565b61010054604051630cc7d40f60e11b81523060048201526001600160a01b0390911690600090829063198fa81e9060240160206040518083038186803b1580156108a157600080fd5b505afa1580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190612026565b6040805160018082528183019092529192506000919060208083019080368337505060fe5482519293506001600160a01b03169183915060009061092d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260fc54604051633111e7b360e01b815285831692633111e7b39261096f928692889216906004016120f0565b602060405180830381600087803b15801561098957600080fd5b505af115801561099d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c19190612026565b506040518281527fbdeb6031c2eac1ba6d1bd54a501b8942cf452ed6eb9f9a58512591a1faea22a49060200160405180910390a1505050565b6001600160a01b0381163314610a6a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106f4565b610828828261151f565b610a7d81611586565b6106c7816040518060200160405280600081525060006115b1565b6101018054600090915560ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b158015610ae757600080fd5b505afa158015610afb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1f9190611de3565b60fd5460fc54604051631a4ca37b60e21b81526001600160a01b0392831660048201526024810185905290821660448201529116906369328dec90606401602060405180830381600087803b158015610b7757600080fd5b505af1158015610b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610baf9190612026565b506040517f5b1d5b57337c7653ccd178787bc6e5aa6f8a6ee09b781e7a624d776e69d044cb90600090a150565b610be582611586565b610828828260016115b1565b600054610100900460ff1680610c0a575060005460ff16155b610c265760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015610c48576000805461ffff19166101011790555b6001600160a01b03891615801590610c6857506001600160a01b03881615155b8015610c7c57506001600160a01b03871615155b8015610c9057506001600160a01b03861615155b8015610ca457506001600160a01b03851615155b8015610cb857506001600160a01b03841615155b8015610ccc57506001600160a01b03821615155b610cd557600080fd5b60fb80546001600160a01b03808c166001600160a01b03199283161790925560fc8054928b1692909116919091179055610d0e82611732565b610100805460fd80546001600160a01b03808c166001600160a01b0319928316811790935560fe80548c831690841617905560ff80548b8316908416811790915590891661ffff8916600160a01b02929092166001600160b01b0319909416939093171790925560408051630261bf8b60e01b8152905163095ea7b39291630261bf8b916004808301926020929190829003018186803b158015610db157600080fd5b505afa158015610dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de99190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b158015610e3257600080fd5b505af1158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611f97565b508015610e7d576000805461ff00191690555b505050505050505050565b60fb546000906001600160a01b03163314610eb55760405162461bcd60e51b81526004016106f490612187565b60fe546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610ef957600080fd5b505afa158015610f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f319190612026565b610101546101025491925090600090610f4a83886121fc565b610f5491906121fc565b905082811415610f6a57600093505050506105b9565b6000610f768285612253565b90506000670de0b6b3a7640000610f8d8884612234565b610f979190612214565b90506000610fa58284612253565b9050610fb182866121fc565b6101015560408051848152602081018a90527ffe4996cd48c364c468cee70dd6b9061874ff01b05c5ea49311cbcabd9b9cb615910160405180910390a198975050505050505050565b60fb546001600160a01b031633146110245760405162461bcd60e51b81526004016106f490612187565b61010254156110615780610102541061104a5780610102600082825461081d9190612253565b610102546110589082612253565b60006101025590505b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110af57600080fd5b505afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190611de3565b60fd546101005460405163e8eda9df60e01b81526001600160a01b03928316600482015260248101859052306044820152600160a01b90910461ffff16606482015291169063e8eda9df90608401600060405180830381600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b5050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152606560205260409020600101546111b18133610844565b610853838361151f565b60fb546001600160a01b031633146111e55760405162461bcd60e51b81526004016106f490612187565b60fd5460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561123357600080fd5b505af1925050508015611263575060408051601f3d908101601f1916820190925261126091810190611f97565b60015b61126c5761127a565b80156112785750610828565b505b80610102600082825461128d9190612253565b909155505060ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b1580156112d757600080fd5b505afa1580156112eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130f9190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b0391821660048201526024810184905284821660448201529116906369328dec90606401602060405180830381600087803b15801561136457600080fd5b505af1158015611378573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190612026565b60fb546001600160a01b031633146113c65760405162461bcd60e51b81526004016106f490612187565b60fc54600160a01b900460ff16156114205760405162461bcd60e51b815260206004820152601f60248201527f5969656c64204d616e6167657220697320616c726561647920696e207573650060448201526064016106f4565b60fc805460ff60a01b1916600160a01b179055565b61143f828261116a565b61082857611457816001600160a01b031660146117b7565b6114628360206117b7565b60405160200161147392919061207b565b60408051601f198184030181529082905262461bcd60e51b82526106f491600401612154565b6114a3828261116a565b6108285760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556114db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611529828261116a565b156108285760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108288133610844565b60006115e47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506115ef846119a0565b6000835111806115fc5750815b1561160d5761160b8484611a45565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661116357805460ff191660011781556040516001600160a01b038316602482015261168c90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611a45565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146117295760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016106f4565b61116385611b30565b600054610100900460ff168061174b575060005460ff16155b6117675760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611789576000805461ffff19166101011790555b611791611b70565b611799611bf3565b6117a282611c51565b8015610828576000805461ff00191690555050565b606060006117c6836002612234565b6117d19060026121fc565b67ffffffffffffffff8111156117f757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611821576020820181803683370190505b509050600360fc1b8160008151811061184a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061188757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006118ab846002612234565b6118b69060016121fc565b90505b600181111561194a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106118f857634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061191c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936119438161229a565b90506118b9565b5083156119995760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106f4565b9392505050565b803b611a045760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016106f4565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611aa45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016106f4565b600080846001600160a01b031684604051611abf919061205f565b600060405180830381855af49150503d8060008114611afa576040519150601f19603f3d011682016040523d82523d6000602084013e611aff565b606091505b5091509150611b2782826040518060600160405280602781526020016122f360279139611d1a565b95945050505050565b611b39816119a0565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611b89575060005460ff16155b611ba55760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bc7576000805461ffff19166101011790555b611bcf611d53565b611bd7611d53565b611bdf611d53565b80156106c7576000805461ff001916905550565b600054610100900460ff1680611c0c575060005460ff16155b611c285760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bcf576000805461ffff1916610101179055611bd7611d53565b600054610100900460ff1680611c6a575060005460ff16155b611c865760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611ca8576000805461ffff19166101011790555b6001600160a01b038216611cbb57600080fd5b611cc6600083611dbd565b611cf07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583611dbd565b6117a27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383611dbd565b60608315611d29575081611999565b825115611d395782518084602001fd5b8160405162461bcd60e51b81526004016106f49190612154565b600054610100900460ff1680611d6c575060005460ff16155b611d885760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bdf576000805461ffff191661010117905580156106c7576000805461ff001916905550565b6108288282611499565b600060208284031215611dd8578081fd5b8135611999816122dd565b600060208284031215611df4578081fd5b8151611999816122dd565b600080600080600080600080610100898b031215611e1b578384fd5b8835611e26816122dd565b97506020890135611e36816122dd565b96506040890135611e46816122dd565b95506060890135611e56816122dd565b94506080890135611e66816122dd565b935060a0890135611e76816122dd565b925060c089013561ffff81168114611e8c578283fd5b915060e0890135611e9c816122dd565b809150509295985092959890939650565b60008060408385031215611ebf578182fd5b8235611eca816122dd565b9150602083013567ffffffffffffffff80821115611ee6578283fd5b818501915085601f830112611ef9578283fd5b813581811115611f0b57611f0b6122c7565b604051601f8201601f19908116603f01168101908382118183101715611f3357611f336122c7565b81604052828152886020848701011115611f4b578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215611f7e578182fd5b8235611f89816122dd565b946020939093013593505050565b600060208284031215611fa8578081fd5b81518015158114611999578182fd5b600060208284031215611fc8578081fd5b5035919050565b60008060408385031215611fe1578182fd5b823591506020830135611ff3816122dd565b809150509250929050565b60006020828403121561200f578081fd5b81356001600160e01b031981168114611999578182fd5b600060208284031215612037578081fd5b5051919050565b60008060408385031215612050578182fd5b50508035926020909101359150565b6000825161207181846020870161226a565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516120b381601785016020880161226a565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120e481602884016020880161226a565b01602801949350505050565b606080825284519082018190526000906020906080840190828801845b828110156121325781516001600160a01b03168452928401929084019060010161210d565b50505090830194909452506001600160a01b0391909116604090910152919050565b600060208252825180602084015261217381604085016020870161226a565b601f01601f19169190910160400192915050565b6020808252600d908201526c139bdd081b1bdb99d4da1bdc9d609a1b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561220f5761220f6122b1565b500190565b60008261222f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561224e5761224e6122b1565b500290565b600082821015612265576122656122b1565b500390565b60005b8381101561228557818101518382015260200161226d565b83811115612294576000848401525b50505050565b6000816122a9576122a96122b1565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146106c757600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122061c70aab4ceb80431078b3b8a133042e3380167471ee409f8beb381cd0e586b464736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c80634f1ef286116100f757806391d1485411610095578063d547741f11610064578063d547741f146104ff578063eb6bffa21461051f578063edf565cc1461053f578063f72c0d8b14610554576101c2565b806391d148541461048a578063a0c1f15e146104aa578063a217fddf146104ca578063bba00ba5146104df576101c2565b806361d027b3116100d157806361d027b3146103f657806375b238fc146104165780638a5599b21461044a5780639063ee201461046a576101c2565b80634f1ef286146103a25780635d3a3890146103b55780635f2475ca146103d5576101c2565b80632f2ff15d1161016457806336568abe1161013e57806336568abe1461032c5780633659cfe61461034c578063392e53cd1461036c578063447479db1461038d576101c2565b80632f2ff15d146102d75780633013ce29146102f757806334944bb014610317576101c2565b80632429e535116101a05780632429e53514610233578063248a9ca31461025857806329949872146102885780632ae320cb146102c0576101c2565b806301ffc9a7146101c757806315429969146101fc5780631c499b5514610213575b600080fd5b3480156101d357600080fd5b506101e76101e2366004611ffe565b610588565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b506102116105bf565b005b34801561021f57600080fd5b5061021161022e366004611fb7565b6106ca565b34801561023f57600080fd5b5061024a6101015481565b6040519081526020016101f3565b34801561026457600080fd5b5061024a610273366004611fb7565b60009081526065602052604090206001015490565b34801561029457600080fd5b5060fb546102a8906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b3480156102cc57600080fd5b5061024a6101025481565b3480156102e357600080fd5b506102116102f2366004611fcf565b61082c565b34801561030357600080fd5b5060fd546102a8906001600160a01b031681565b34801561032357600080fd5b50610211610858565b34801561033857600080fd5b50610211610347366004611fcf565b6109fa565b34801561035857600080fd5b50610211610367366004611dc7565b610a74565b34801561037857600080fd5b5060fc546101e790600160a01b900460ff1681565b34801561039957600080fd5b50610211610a98565b6102116103b0366004611ead565b610bdc565b3480156103c157600080fd5b506102116103d0366004611dff565b610bf1565b3480156103e157600080fd5b50610100546102a8906001600160a01b031681565b34801561040257600080fd5b5060fc546102a8906001600160a01b031681565b34801561042257600080fd5b5061024a7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561045657600080fd5b5061024a61046536600461203e565b610e88565b34801561047657600080fd5b50610211610485366004611fb7565b610ffa565b34801561049657600080fd5b506101e76104a5366004611fcf565b61116a565b3480156104b657600080fd5b5060fe546102a8906001600160a01b031681565b3480156104d657600080fd5b5061024a600081565b3480156104eb57600080fd5b5060ff546102a8906001600160a01b031681565b34801561050b57600080fd5b5061021161051a366004611fcf565b611195565b34801561052b57600080fd5b5061021161053a366004611f6c565b6111bb565b34801561054b57600080fd5b5061021161139c565b34801561056057600080fd5b5061024a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806105b957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60fd5460ff5460408051630261bf8b60e01b815290516001600160a01b039384169363095ea7b3931691630261bf8b916004808301926020929190829003018186803b15801561060e57600080fd5b505afa158015610622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106469190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611f97565b50565b60fb546001600160a01b031633146106fd5760405162461bcd60e51b81526004016106f490612187565b60405180910390fd5b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561074b57600080fd5b505afa15801561075f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107839190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018490523060448201529116906369328dec90606401602060405180830381600087803b1580156107d657600080fd5b505af1925050508015610806575060408051601f3d908101601f1916820190925261080391810190612026565b60015b6108285780610102600082825461081d91906121fc565b909155506106c79050565b5050565b60008281526065602052604090206001015461084981335b611435565b6108538383611499565b505050565b61010054604051630cc7d40f60e11b81523060048201526001600160a01b0390911690600090829063198fa81e9060240160206040518083038186803b1580156108a157600080fd5b505afa1580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190612026565b6040805160018082528183019092529192506000919060208083019080368337505060fe5482519293506001600160a01b03169183915060009061092d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260fc54604051633111e7b360e01b815285831692633111e7b39261096f928692889216906004016120f0565b602060405180830381600087803b15801561098957600080fd5b505af115801561099d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c19190612026565b506040518281527fbdeb6031c2eac1ba6d1bd54a501b8942cf452ed6eb9f9a58512591a1faea22a49060200160405180910390a1505050565b6001600160a01b0381163314610a6a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106f4565b610828828261151f565b610a7d81611586565b6106c7816040518060200160405280600081525060006115b1565b6101018054600090915560ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b158015610ae757600080fd5b505afa158015610afb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1f9190611de3565b60fd5460fc54604051631a4ca37b60e21b81526001600160a01b0392831660048201526024810185905290821660448201529116906369328dec90606401602060405180830381600087803b158015610b7757600080fd5b505af1158015610b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610baf9190612026565b506040517f5b1d5b57337c7653ccd178787bc6e5aa6f8a6ee09b781e7a624d776e69d044cb90600090a150565b610be582611586565b610828828260016115b1565b600054610100900460ff1680610c0a575060005460ff16155b610c265760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015610c48576000805461ffff19166101011790555b6001600160a01b03891615801590610c6857506001600160a01b03881615155b8015610c7c57506001600160a01b03871615155b8015610c9057506001600160a01b03861615155b8015610ca457506001600160a01b03851615155b8015610cb857506001600160a01b03841615155b8015610ccc57506001600160a01b03821615155b610cd557600080fd5b60fb80546001600160a01b03808c166001600160a01b03199283161790925560fc8054928b1692909116919091179055610d0e82611732565b610100805460fd80546001600160a01b03808c166001600160a01b0319928316811790935560fe80548c831690841617905560ff80548b8316908416811790915590891661ffff8916600160a01b02929092166001600160b01b0319909416939093171790925560408051630261bf8b60e01b8152905163095ea7b39291630261bf8b916004808301926020929190829003018186803b158015610db157600080fd5b505afa158015610dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de99190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b158015610e3257600080fd5b505af1158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611f97565b508015610e7d576000805461ff00191690555b505050505050505050565b60fb546000906001600160a01b03163314610eb55760405162461bcd60e51b81526004016106f490612187565b60fe546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610ef957600080fd5b505afa158015610f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f319190612026565b610101546101025491925090600090610f4a83886121fc565b610f5491906121fc565b905082811415610f6a57600093505050506105b9565b6000610f768285612253565b90506000670de0b6b3a7640000610f8d8884612234565b610f979190612214565b90506000610fa58284612253565b9050610fb182866121fc565b6101015560408051848152602081018a90527ffe4996cd48c364c468cee70dd6b9061874ff01b05c5ea49311cbcabd9b9cb615910160405180910390a198975050505050505050565b60fb546001600160a01b031633146110245760405162461bcd60e51b81526004016106f490612187565b61010254156110615780610102541061104a5780610102600082825461081d9190612253565b610102546110589082612253565b60006101025590505b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110af57600080fd5b505afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190611de3565b60fd546101005460405163e8eda9df60e01b81526001600160a01b03928316600482015260248101859052306044820152600160a01b90910461ffff16606482015291169063e8eda9df90608401600060405180830381600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b5050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152606560205260409020600101546111b18133610844565b610853838361151f565b60fb546001600160a01b031633146111e55760405162461bcd60e51b81526004016106f490612187565b60fd5460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561123357600080fd5b505af1925050508015611263575060408051601f3d908101601f1916820190925261126091810190611f97565b60015b61126c5761127a565b80156112785750610828565b505b80610102600082825461128d9190612253565b909155505060ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b1580156112d757600080fd5b505afa1580156112eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130f9190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b0391821660048201526024810184905284821660448201529116906369328dec90606401602060405180830381600087803b15801561136457600080fd5b505af1158015611378573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190612026565b60fb546001600160a01b031633146113c65760405162461bcd60e51b81526004016106f490612187565b60fc54600160a01b900460ff16156114205760405162461bcd60e51b815260206004820152601f60248201527f5969656c64204d616e6167657220697320616c726561647920696e207573650060448201526064016106f4565b60fc805460ff60a01b1916600160a01b179055565b61143f828261116a565b61082857611457816001600160a01b031660146117b7565b6114628360206117b7565b60405160200161147392919061207b565b60408051601f198184030181529082905262461bcd60e51b82526106f491600401612154565b6114a3828261116a565b6108285760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556114db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611529828261116a565b156108285760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108288133610844565b60006115e47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506115ef846119a0565b6000835111806115fc5750815b1561160d5761160b8484611a45565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661116357805460ff191660011781556040516001600160a01b038316602482015261168c90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611a45565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146117295760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016106f4565b61116385611b30565b600054610100900460ff168061174b575060005460ff16155b6117675760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611789576000805461ffff19166101011790555b611791611b70565b611799611bf3565b6117a282611c51565b8015610828576000805461ff00191690555050565b606060006117c6836002612234565b6117d19060026121fc565b67ffffffffffffffff8111156117f757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611821576020820181803683370190505b509050600360fc1b8160008151811061184a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061188757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006118ab846002612234565b6118b69060016121fc565b90505b600181111561194a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106118f857634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061191c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936119438161229a565b90506118b9565b5083156119995760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106f4565b9392505050565b803b611a045760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016106f4565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611aa45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016106f4565b600080846001600160a01b031684604051611abf919061205f565b600060405180830381855af49150503d8060008114611afa576040519150601f19603f3d011682016040523d82523d6000602084013e611aff565b606091505b5091509150611b2782826040518060600160405280602781526020016122f360279139611d1a565b95945050505050565b611b39816119a0565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611b89575060005460ff16155b611ba55760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bc7576000805461ffff19166101011790555b611bcf611d53565b611bd7611d53565b611bdf611d53565b80156106c7576000805461ff001916905550565b600054610100900460ff1680611c0c575060005460ff16155b611c285760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bcf576000805461ffff1916610101179055611bd7611d53565b600054610100900460ff1680611c6a575060005460ff16155b611c865760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611ca8576000805461ffff19166101011790555b6001600160a01b038216611cbb57600080fd5b611cc6600083611dbd565b611cf07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583611dbd565b6117a27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383611dbd565b60608315611d29575081611999565b825115611d395782518084602001fd5b8160405162461bcd60e51b81526004016106f49190612154565b600054610100900460ff1680611d6c575060005460ff16155b611d885760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bdf576000805461ffff191661010117905580156106c7576000805461ff001916905550565b6108288282611499565b600060208284031215611dd8578081fd5b8135611999816122dd565b600060208284031215611df4578081fd5b8151611999816122dd565b600080600080600080600080610100898b031215611e1b578384fd5b8835611e26816122dd565b97506020890135611e36816122dd565b96506040890135611e46816122dd565b95506060890135611e56816122dd565b94506080890135611e66816122dd565b935060a0890135611e76816122dd565b925060c089013561ffff81168114611e8c578283fd5b915060e0890135611e9c816122dd565b809150509295985092959890939650565b60008060408385031215611ebf578182fd5b8235611eca816122dd565b9150602083013567ffffffffffffffff80821115611ee6578283fd5b818501915085601f830112611ef9578283fd5b813581811115611f0b57611f0b6122c7565b604051601f8201601f19908116603f01168101908382118183101715611f3357611f336122c7565b81604052828152886020848701011115611f4b578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215611f7e578182fd5b8235611f89816122dd565b946020939093013593505050565b600060208284031215611fa8578081fd5b81518015158114611999578182fd5b600060208284031215611fc8578081fd5b5035919050565b60008060408385031215611fe1578182fd5b823591506020830135611ff3816122dd565b809150509250929050565b60006020828403121561200f578081fd5b81356001600160e01b031981168114611999578182fd5b600060208284031215612037578081fd5b5051919050565b60008060408385031215612050578182fd5b50508035926020909101359150565b6000825161207181846020870161226a565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516120b381601785016020880161226a565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120e481602884016020880161226a565b01602801949350505050565b606080825284519082018190526000906020906080840190828801845b828110156121325781516001600160a01b03168452928401929084019060010161210d565b50505090830194909452506001600160a01b0391909116604090910152919050565b600060208252825180602084015261217381604085016020870161226a565b601f01601f19169190910160400192915050565b6020808252600d908201526c139bdd081b1bdb99d4da1bdc9d609a1b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561220f5761220f6122b1565b500190565b60008261222f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561224e5761224e6122b1565b500290565b600082821015612265576122656122b1565b500390565b60005b8381101561228557818101518382015260200161226d565b83811115612294576000848401525b50505050565b6000816122a9576122a96122b1565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146106c757600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122061c70aab4ceb80431078b3b8a133042e3380167471ee409f8beb381cd0e586b464736f6c63430008030033", + "devdoc": { + "details": "https://docs.aave.com/portal/", + "kind": "dev", + "methods": { + "claimAaveRewardsToTreasury()": { + "details": "This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued" + }, + "depositPaymentToken(uint256)": { + "params": { + "amount": "Amount of payment token to deposit" + } + }, + "distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)": { + "details": "treasuryPercent = 1 - marketPercent", + "params": { + "totalValueRealizedForMarket": "total value of long and short side of the market", + "treasuryYieldPercent_e18": "Percentage of yield in base 1e18 that is allocated to the treasury" + }, + "returns": { + "_0": "The market allocation of the yield" + } + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,address,address,address,address,address,uint16,address)": { + "details": "referral code will be set to 0, depricated Aave feature", + "params": { + "_aToken": "address of the interest accruing token linked to the payment token", + "_aaveReferralCode": "unique code for aave referrals", + "_admin": "admin for the contract", + "_lendingPoolAddressesProvider": "address of the aave lending pool address provider contract", + "_longShort": "address of the longShort contract", + "_paymentToken": "address of the payment token", + "_treasury": "address of the treasury contract" + } + }, + "removePaymentTokenFromMarket(uint256)": { + "details": "This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave. This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.", + "params": { + "amount": "Amount of payment token to withdraw" + } + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "transferPaymentTokensToUser(address,uint256)": { + "params": { + "amount": "Amount of payment token to pay to user", + "user": "User to recieve the payout" + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "stateVariables": { + "aToken": { + "details": "ADAI token" + }, + "amountReservedInCaseOfInsufficientAaveLiquidity": { + "details": "This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal. In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available." + }, + "paymentToken": { + "details": "DAI token" + }, + "referralCode": { + "details": "An aave specific referralCode that has been a depricated feature. This will be set to 0 for \"no referral\" at deployment" + } + }, + "title": "YieldManagerAave", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "aToken()": { + "notice": "The token representing the interest accruing payment token position from Aave" + }, + "aaveIncentivesController()": { + "notice": "The specific Aave incentives controller contract" + }, + "claimAaveRewardsToTreasury()": { + "notice": "Allows for withdrawal of aave rewards to the treasury contract" + }, + "depositPaymentToken(uint256)": { + "notice": "Allows the LongShort contract to deposit tokens into the aave pool" + }, + "distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)": { + "notice": "Calculates and updates the yield allocation to the treasury and the market" + }, + "initialize(address,address,address,address,address,address,uint16,address)": { + "notice": "Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts" + }, + "initializeForMarket()": { + "notice": "Initializes a specific yield manager to a given market" + }, + "isInitialized()": { + "notice": "boolean to prevent markets using an already initialized market" + }, + "lendingPoolAddressesProvider()": { + "notice": "The specific Aave lending pool address provider contract" + }, + "longShort()": { + "notice": "address of longShort contract" + }, + "paymentToken()": { + "notice": "The payment token the yield manager supports" + }, + "removePaymentTokenFromMarket(uint256)": { + "notice": "Allows the LongShort contract to redeem aTokens for the payment token" + }, + "totalReservedForTreasury()": { + "notice": "distributed yield not yet transferred to the treasury" + }, + "transferPaymentTokensToUser(address,uint256)": { + "notice": "Allows the LongShort pay out a user from tokens already withdrawn from Aave" + }, + "treasury()": { + "notice": "address of treasury contract - this is the address that can claim aave incentives rewards" + }, + "withdrawTreasuryFunds()": { + "notice": "Withdraw treasury allocated accrued yield from the lending pool to the treasury contract" + } + }, + "notice": "contract is used to manage the yield generated by the underlying tokens. YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol. Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that continuously accrues interest based on a lend/borrow liquidity ratio.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 17257, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "longShort", + "offset": 0, + "slot": "251", + "type": "t_address" + }, + { + "astId": 17260, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "treasury", + "offset": 0, + "slot": "252", + "type": "t_address" + }, + { + "astId": 17263, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "isInitialized", + "offset": 20, + "slot": "252", + "type": "t_bool" + }, + { + "astId": 17267, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "paymentToken", + "offset": 0, + "slot": "253", + "type": "t_contract(IERC20)7293" + }, + { + "astId": 17271, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "aToken", + "offset": 0, + "slot": "254", + "type": "t_contract(IERC20Upgradeable)1983" + }, + { + "astId": 17275, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "lendingPoolAddressesProvider", + "offset": 0, + "slot": "255", + "type": "t_contract(ILendingPoolAddressesProvider)18905" + }, + { + "astId": 17279, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "aaveIncentivesController", + "offset": 0, + "slot": "256", + "type": "t_contract(IAaveIncentivesController)18518" + }, + { + "astId": 17282, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "referralCode", + "offset": 20, + "slot": "256", + "type": "t_uint16" + }, + { + "astId": 17286, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "totalReservedForTreasury", + "offset": 0, + "slot": "257", + "type": "t_uint256" + }, + { + "astId": 17289, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "amountReservedInCaseOfInsufficientAaveLiquidity", + "offset": 0, + "slot": "258", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IAaveIncentivesController)18518": { + "encoding": "inplace", + "label": "contract IAaveIncentivesController", + "numberOfBytes": "20" + }, + "t_contract(IERC20)7293": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_contract(IERC20Upgradeable)1983": { + "encoding": "inplace", + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(ILendingPoolAddressesProvider)18905": { + "encoding": "inplace", + "label": "contract ILendingPoolAddressesProvider", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/YieldManagerBTC_Proxy.json b/deployments/mumbai/YieldManagerBTC_Proxy.json new file mode 100644 index 0000000..f3829b6 --- /dev/null +++ b/deployments/mumbai/YieldManagerBTC_Proxy.json @@ -0,0 +1,206 @@ +{ + "address": "0x5E7e616e0Ed478e6B8f4c142f261D9A66d512951", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x5E7e616e0Ed478e6B8f4c142f261D9A66d512951", + "transactionIndex": 0, + "gasUsed": "519957", + "logsBloom": "0x00000004000000000000000000000040410000000000000000000000000000020000000002000000000000008000000000018020000000000000000000208000000000000000000000000000000002800000000220000000000100000000000000000000020000000000000000000800008000000000000880010000000000000002000000000000000000000000004020000000800000000000008000000000220000000000004000000000000000000000080000000000001000000000024000000020000000400001000000000000100000000000008100504000000020000090000000000000000000000000000000000000800000000000002000100000", + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c", + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869336, + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "address": "0x5E7e616e0Ed478e6B8f4c142f261D9A66d512951", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000001f65033ef6890e63517fe8fbbcdd5489938c7f99" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c" + }, + { + "transactionIndex": 0, + "blockNumber": 18869336, + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "address": "0x5E7e616e0Ed478e6B8f4c142f261D9A66d512951", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c" + }, + { + "transactionIndex": 0, + "blockNumber": 18869336, + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "address": "0x5E7e616e0Ed478e6B8f4c142f261D9A66d512951", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c" + }, + { + "transactionIndex": 0, + "blockNumber": 18869336, + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "address": "0x5E7e616e0Ed478e6B8f4c142f261D9A66d512951", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c" + }, + { + "transactionIndex": 0, + "blockNumber": 18869336, + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "address": "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000005e7e616e0ed478e6b8f4c142f261d9a66d512951", + "0x0000000000000000000000009198f13b08e299d85e096929fa9781a1e3d5d827" + ], + "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "logIndex": 4, + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c" + }, + { + "transactionIndex": 0, + "blockNumber": 18869336, + "transactionHash": "0x63aaec72a76633c3f7967e5de25dbfff5cd1e8c86c9613ea0111b991d43ae3f8", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" + ], + "data": "0x00000000000000000000000000000000000000000000000000058ab1c4d9b60000000000000000000000000000000000000000000000000006ee758d9285d4cd0000000000000000000000000000000000000000000000000ddc5d6db7f04c3400000000000000000000000000000000000000000000000006e8eadbcdac1ecd0000000000000000000000000000000000000000000000000de1e81f7cca0234", + "logIndex": 5, + "blockHash": "0xb3018982aaf7628b36a060ec58d33d6e572ec9be97d587a7c05e99553fd10f4c" + } + ], + "blockNumber": 18869336, + "cumulativeGasUsed": "519957", + "status": 1, + "byzantium": true + }, + "args": [ + "0x1f65033EF6890E63517Fe8fbBcDD5489938C7f99", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x5d3a389000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000733fc3a395a35904045ab6a3678601512c244003000000000000000000000000001b3b4d0f3714ca98ba10f6042daebf0b1b7b6f000000000000000000000000639cb7b21ee2161df9c882483c9d55c90c20ca3e000000000000000000000000178113104fecbcd7ff8669a0150721e231f0fd4b000000000000000000000000d41ae58e803edf4304334acce4dc4ec34a63c64400000000000000000000000000000000000000000000000000000000000000000000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/YieldManagerETH.json b/deployments/mumbai/YieldManagerETH.json new file mode 100644 index 0000000..59af14a --- /dev/null +++ b/deployments/mumbai/YieldManagerETH.json @@ -0,0 +1,780 @@ +{ + "address": "0xD5627DEe8700213aE9F074bE68b5Ac61AE41c5B0", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ClaimAaveRewardTokenToTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "WithdrawTreasuryFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unrealizedYield", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "YieldDistributed", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aaveIncentivesController", + "outputs": [ + { + "internalType": "contract IAaveIncentivesController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "amountReservedInCaseOfInsufficientAaveLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimAaveRewardsToTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositPaymentToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "totalValueRealizedForMarket", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "distributeYieldForTreasuryAndReturnMarketAllocation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_aToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_lendingPoolAddressesProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "_aaveIncentivesController", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_aaveReferralCode", + "type": "uint16" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeForMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lendingPoolAddressesProvider", + "outputs": [ + { + "internalType": "contract ILendingPoolAddressesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paymentToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "removePaymentTokenFromMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalReservedForTreasury", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferPaymentTokensToUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateLatestLendingPoolAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawTreasuryFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xD5627DEe8700213aE9F074bE68b5Ac61AE41c5B0", + "transactionIndex": 3, + "gasUsed": "519957", + "logsBloom": "0x00000004000000000000000000000041410000000000000000000000000000000000000002000000000000008000000000018020000000000000000000200000000000000000000000000000000002800000000020000000000100000000000000000000020000000000000000000800000000000000000880010000000000000000000000000000000000000000004020000000000100000000000000000000220000002000004000000200000000000000080000000000001000000000024000000020000000400001000000000000108000000000018100500000000020000090000000000000000000000000020000000000010000000000002000100000", + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c", + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 18869069, + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "address": "0xD5627DEe8700213aE9F074bE68b5Ac61AE41c5B0", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000027528cc6da40c9e01a4e1d226b7cc23a914f36c9" + ], + "data": "0x", + "logIndex": 13, + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869069, + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "address": "0xD5627DEe8700213aE9F074bE68b5Ac61AE41c5B0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 14, + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869069, + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "address": "0xD5627DEe8700213aE9F074bE68b5Ac61AE41c5B0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 15, + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869069, + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "address": "0xD5627DEe8700213aE9F074bE68b5Ac61AE41c5B0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 16, + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869069, + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "address": "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000d5627dee8700213ae9f074be68b5ac61ae41c5b0", + "0x0000000000000000000000009198f13b08e299d85e096929fa9781a1e3d5d827" + ], + "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "logIndex": 17, + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869069, + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" + ], + "data": "0x00000000000000000000000000000000000000000000000000058ab1c4d9b60000000000000000000000000000000000000000000000000007aaea7792f41ccd00000000000000000000000000000000000000000000000009dee724d74e8a3400000000000000000000000000000000000000000000000007a55fc5ce1a66cd00000000000000000000000000000000000000000000000009e471d69c284034", + "logIndex": 18, + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c" + } + ], + "blockNumber": 18869069, + "cumulativeGasUsed": "1146294", + "status": 1, + "byzantium": true + }, + "args": [ + "0x27528cc6Da40c9e01a4e1D226b7Cc23a914f36C9", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x5d3a389000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000733fc3a395a35904045ab6a3678601512c244003000000000000000000000000001b3b4d0f3714ca98ba10f6042daebf0b1b7b6f000000000000000000000000639cb7b21ee2161df9c882483c9d55c90c20ca3e000000000000000000000000178113104fecbcd7ff8669a0150721e231f0fd4b000000000000000000000000d41ae58e803edf4304334acce4dc4ec34a63c64400000000000000000000000000000000000000000000000000000000000000000000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "0x733FC3a395a35904045Ab6a3678601512c244003", + "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F", + "0x639cB7b21ee2161DF9c882483C9D55c90c20Ca3e", + "0x178113104fEcbcD7fF8669a0150721e231F0FD4B", + "0xd41aE58e803Edf4304334acCE4DC4Ec34a63C644", + 0, + "0x2740EA9F72B23372621D8D718F52609b80c24E61" + ] + }, + "implementation": "0x27528cc6Da40c9e01a4e1D226b7Cc23a914f36C9", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/YieldManagerETH_Implementation.json b/deployments/mumbai/YieldManagerETH_Implementation.json new file mode 100644 index 0000000..dddfb8c --- /dev/null +++ b/deployments/mumbai/YieldManagerETH_Implementation.json @@ -0,0 +1,1034 @@ +{ + "address": "0x27528cc6Da40c9e01a4e1D226b7Cc23a914f36C9", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ClaimAaveRewardTokenToTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "WithdrawTreasuryFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unrealizedYield", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "YieldDistributed", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aaveIncentivesController", + "outputs": [ + { + "internalType": "contract IAaveIncentivesController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "amountReservedInCaseOfInsufficientAaveLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimAaveRewardsToTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositPaymentToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "totalValueRealizedForMarket", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "distributeYieldForTreasuryAndReturnMarketAllocation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_aToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_lendingPoolAddressesProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "_aaveIncentivesController", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_aaveReferralCode", + "type": "uint16" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeForMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lendingPoolAddressesProvider", + "outputs": [ + { + "internalType": "contract ILendingPoolAddressesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paymentToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "removePaymentTokenFromMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalReservedForTreasury", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferPaymentTokensToUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateLatestLendingPoolAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawTreasuryFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x5bbc73266c24364f2b882a867ee02fe4d79787d4d699cf141aa0d57880b38e12", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x27528cc6Da40c9e01a4e1D226b7Cc23a914f36C9", + "transactionIndex": 0, + "gasUsed": "2004865", + "logsBloom": "0x00000000000000020000000000000000010000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x6307e32d91d4923e10058421759f3a61bd128426216edbb4d17129ddc9eaf689", + "transactionHash": "0x5bbc73266c24364f2b882a867ee02fe4d79787d4d699cf141aa0d57880b38e12", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869021, + "transactionHash": "0x5bbc73266c24364f2b882a867ee02fe4d79787d4d699cf141aa0d57880b38e12", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000155e3e06715e0000000000000000000000000000000000000000000000000007c048b599657acd00000000000000000000000000000000000000000000016686919bd6a1b8faad00000000000000000000000000000000000000000000000007aaea7792f41ccd00000000000000000000000000000000000000000000016686a6fa14a82a58ad", + "logIndex": 0, + "blockHash": "0x6307e32d91d4923e10058421759f3a61bd128426216edbb4d17129ddc9eaf689" + } + ], + "blockNumber": 18869021, + "cumulativeGasUsed": "2004865", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ClaimAaveRewardTokenToTreasury\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"WithdrawTreasuryFunds\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unrealizedYield\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryYieldPercent_e18\",\"type\":\"uint256\"}],\"name\":\"YieldDistributed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"aToken\",\"outputs\":[{\"internalType\":\"contract IERC20Upgradeable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"aaveIncentivesController\",\"outputs\":[{\"internalType\":\"contract IAaveIncentivesController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amountReservedInCaseOfInsufficientAaveLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimAaveRewardsToTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositPaymentToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"totalValueRealizedForMarket\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"treasuryYieldPercent_e18\",\"type\":\"uint256\"}],\"name\":\"distributeYieldForTreasuryAndReturnMarketAllocation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_treasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_paymentToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_aToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_lendingPoolAddressesProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_aaveIncentivesController\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_aaveReferralCode\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeForMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lendingPoolAddressesProvider\",\"outputs\":[{\"internalType\":\"contract ILendingPoolAddressesProvider\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paymentToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"removePaymentTokenFromMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalReservedForTreasury\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferPaymentTokensToUser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateLatestLendingPoolAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawTreasuryFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"https://docs.aave.com/portal/\",\"kind\":\"dev\",\"methods\":{\"claimAaveRewardsToTreasury()\":{\"details\":\"This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued\"},\"depositPaymentToken(uint256)\":{\"params\":{\"amount\":\"Amount of payment token to deposit\"}},\"distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)\":{\"details\":\"treasuryPercent = 1 - marketPercent\",\"params\":{\"totalValueRealizedForMarket\":\"total value of long and short side of the market\",\"treasuryYieldPercent_e18\":\"Percentage of yield in base 1e18 that is allocated to the treasury\"},\"returns\":{\"_0\":\"The market allocation of the yield\"}},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address,address,address,address,uint16,address)\":{\"details\":\"referral code will be set to 0, depricated Aave feature\",\"params\":{\"_aToken\":\"address of the interest accruing token linked to the payment token\",\"_aaveReferralCode\":\"unique code for aave referrals\",\"_admin\":\"admin for the contract\",\"_lendingPoolAddressesProvider\":\"address of the aave lending pool address provider contract\",\"_longShort\":\"address of the longShort contract\",\"_paymentToken\":\"address of the payment token\",\"_treasury\":\"address of the treasury contract\"}},\"removePaymentTokenFromMarket(uint256)\":{\"details\":\"This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave. This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.\",\"params\":{\"amount\":\"Amount of payment token to withdraw\"}},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"transferPaymentTokensToUser(address,uint256)\":{\"params\":{\"amount\":\"Amount of payment token to pay to user\",\"user\":\"User to recieve the payout\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"stateVariables\":{\"aToken\":{\"details\":\"ADAI token\"},\"amountReservedInCaseOfInsufficientAaveLiquidity\":{\"details\":\"This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal. In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available.\"},\"paymentToken\":{\"details\":\"DAI token\"},\"referralCode\":{\"details\":\"An aave specific referralCode that has been a depricated feature. This will be set to 0 for \\\"no referral\\\" at deployment\"}},\"title\":\"YieldManagerAave\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"aToken()\":{\"notice\":\"The token representing the interest accruing payment token position from Aave\"},\"aaveIncentivesController()\":{\"notice\":\"The specific Aave incentives controller contract\"},\"claimAaveRewardsToTreasury()\":{\"notice\":\"Allows for withdrawal of aave rewards to the treasury contract\"},\"depositPaymentToken(uint256)\":{\"notice\":\"Allows the LongShort contract to deposit tokens into the aave pool\"},\"distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)\":{\"notice\":\"Calculates and updates the yield allocation to the treasury and the market\"},\"initialize(address,address,address,address,address,address,uint16,address)\":{\"notice\":\"Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts\"},\"initializeForMarket()\":{\"notice\":\"Initializes a specific yield manager to a given market\"},\"isInitialized()\":{\"notice\":\"boolean to prevent markets using an already initialized market\"},\"lendingPoolAddressesProvider()\":{\"notice\":\"The specific Aave lending pool address provider contract\"},\"longShort()\":{\"notice\":\"address of longShort contract\"},\"paymentToken()\":{\"notice\":\"The payment token the yield manager supports\"},\"removePaymentTokenFromMarket(uint256)\":{\"notice\":\"Allows the LongShort contract to redeem aTokens for the payment token\"},\"totalReservedForTreasury()\":{\"notice\":\"distributed yield not yet transferred to the treasury\"},\"transferPaymentTokensToUser(address,uint256)\":{\"notice\":\"Allows the LongShort pay out a user from tokens already withdrawn from Aave\"},\"treasury()\":{\"notice\":\"address of treasury contract - this is the address that can claim aave incentives rewards\"},\"withdrawTreasuryFunds()\":{\"notice\":\"Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\"}},\"notice\":\"contract is used to manage the yield generated by the underlying tokens. YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol. Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that continuously accrues interest based on a lend/borrow liquidity ratio.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/YieldManagerAave.sol\":\"YieldManagerAave\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"contracts/YieldManagerAave.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\n\\nimport \\\"hardhat/console.sol\\\";\\n\\nimport \\\"./interfaces/IYieldManager.sol\\\";\\nimport \\\"./interfaces/aave/ILendingPool.sol\\\";\\nimport \\\"./interfaces/aave/ILendingPoolAddressesProvider.sol\\\";\\nimport \\\"./interfaces/aave/IAaveIncentivesController.sol\\\";\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\n/** @title YieldManagerAave\\n @notice contract is used to manage the yield generated by the underlying tokens.\\n YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol.\\n Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that\\n continuously accrues interest based on a lend/borrow liquidity ratio.\\n @dev https://docs.aave.com/portal/\\n */\\ncontract YieldManagerAave is IYieldManager, AccessControlledAndUpgradeable {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 VARIABLES \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice address of longShort contract\\n address public longShort;\\n /// @notice address of treasury contract - this is the address that can claim aave incentives rewards\\n address public treasury;\\n\\n /// @notice boolean to prevent markets using an already initialized market\\n bool public isInitialized;\\n\\n /// @notice The payment token the yield manager supports\\n /// @dev DAI token\\n IERC20 public paymentToken;\\n /// @notice The token representing the interest accruing payment token position from Aave\\n /// @dev ADAI token\\n IERC20Upgradeable public aToken;\\n /// @notice The specific Aave lending pool address provider contract\\n ILendingPoolAddressesProvider public lendingPoolAddressesProvider;\\n /// @notice The specific Aave incentives controller contract\\n IAaveIncentivesController public aaveIncentivesController;\\n\\n /// @dev An aave specific referralCode that has been a depricated feature. This will be set to 0 for \\\"no referral\\\" at deployment\\n uint16 referralCode;\\n\\n /// @notice distributed yield not yet transferred to the treasury\\n uint256 public override totalReservedForTreasury;\\n\\n /// @dev This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal.\\n /// In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available.\\n uint256 public amountReservedInCaseOfInsufficientAaveLiquidity;\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MODIFIERS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @dev only allow longShort contract to execute modified functions\\n modifier longShortOnly() {\\n require(msg.sender == longShort, \\\"Not longShort\\\");\\n _;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 CONTRACT SET-UP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts\\n @param _longShort address of the longShort contract\\n @param _treasury address of the treasury contract\\n @param _paymentToken address of the payment token\\n @param _aToken address of the interest accruing token linked to the payment token\\n @param _lendingPoolAddressesProvider address of the aave lending pool address provider contract\\n @param _aaveReferralCode unique code for aave referrals\\n @param _admin admin for the contract\\n @dev referral code will be set to 0, depricated Aave feature\\n */\\n function initialize(\\n address _longShort,\\n address _treasury,\\n address _paymentToken,\\n address _aToken,\\n address _lendingPoolAddressesProvider,\\n address _aaveIncentivesController,\\n uint16 _aaveReferralCode,\\n address _admin\\n ) external initializer {\\n require(\\n _longShort != address(0) &&\\n _treasury != address(0) &&\\n _paymentToken != address(0) &&\\n _aToken != address(0) &&\\n _lendingPoolAddressesProvider != address(0) &&\\n _aaveIncentivesController != address(0) &&\\n _admin != address(0)\\n );\\n\\n longShort = _longShort;\\n treasury = _treasury;\\n\\n _AccessControlledAndUpgradeable_init(_admin);\\n\\n referralCode = _aaveReferralCode;\\n\\n paymentToken = IERC20(_paymentToken);\\n aToken = IERC20Upgradeable(_aToken);\\n lendingPoolAddressesProvider = ILendingPoolAddressesProvider(_lendingPoolAddressesProvider);\\n aaveIncentivesController = IAaveIncentivesController(_aaveIncentivesController);\\n\\n // Approve tokens for aave lending pool maximally.\\n IERC20(_paymentToken).approve(\\n ILendingPoolAddressesProvider(_lendingPoolAddressesProvider).getLendingPool(),\\n type(uint256).max\\n );\\n }\\n\\n function updateLatestLendingPoolAddress() external {\\n IERC20(paymentToken).approve(lendingPoolAddressesProvider.getLendingPool(), type(uint256).max);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 IMPLEMENTATION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Allows the LongShort contract to deposit tokens into the aave pool\\n @param amount Amount of payment token to deposit\\n */\\n function depositPaymentToken(uint256 amount) external override longShortOnly {\\n // If amountReservedInCaseOfInsufficientAaveLiquidity isn't zero, then efficiently net the difference between the amount\\n // It basically always be zero besides extreme and unlikely situations with aave.\\n if (amountReservedInCaseOfInsufficientAaveLiquidity != 0) {\\n if (amountReservedInCaseOfInsufficientAaveLiquidity >= amount) {\\n amountReservedInCaseOfInsufficientAaveLiquidity -= amount;\\n // Return early, nothing to deposit into the lending pool\\n return;\\n } else {\\n amount -= amountReservedInCaseOfInsufficientAaveLiquidity;\\n amountReservedInCaseOfInsufficientAaveLiquidity = 0;\\n }\\n }\\n\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).deposit(\\n address(paymentToken),\\n amount,\\n address(this),\\n referralCode\\n );\\n }\\n\\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\\n /// @param user User to recieve the payout\\n /// @param amount Amount of payment token to pay to user\\n function transferPaymentTokensToUser(address user, uint256 amount)\\n external\\n override\\n longShortOnly\\n {\\n try paymentToken.transfer(user, amount) returns (bool transferSuccess) {\\n if (transferSuccess) {\\n // If the transfer is successful return early, otherwise try pay the user out with the amountReservedInCaseOfInsufficientAaveLiquidity\\n return;\\n }\\n } catch {}\\n\\n amountReservedInCaseOfInsufficientAaveLiquidity -= amount;\\n\\n // If this reverts (ie aave unable to make payout), then the whole transaction will revert. User will have to wait until sufficient liquidity available.\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\\n address(paymentToken),\\n amount,\\n user\\n );\\n }\\n\\n /// @notice Allows the LongShort contract to redeem aTokens for the payment token\\n /// @param amount Amount of payment token to withdraw\\n /// @dev This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave.\\n /// This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.\\n function removePaymentTokenFromMarket(uint256 amount) external override longShortOnly {\\n try\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\\n address(paymentToken),\\n amount,\\n address(this)\\n )\\n {} catch {\\n // In theory we should only catch `VL_CURRENT_AVAILABLE_LIQUIDITY_NOT_ENOUGH` errors.\\n // Safe to revert on all errors, if aave completely blocks withdrawals the amountReservedInCaseOfInsufficientAaveLiquidity can grow until it is fixed without problems.\\n amountReservedInCaseOfInsufficientAaveLiquidity += amount;\\n }\\n }\\n\\n /**\\n @notice Allows for withdrawal of aave rewards to the treasury contract\\n @dev This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued\\n */\\n function claimAaveRewardsToTreasury() external {\\n IAaveIncentivesController _aaveIncentivesController = IAaveIncentivesController(\\n aaveIncentivesController\\n );\\n uint256 amount = _aaveIncentivesController.getUserUnclaimedRewards(address(this));\\n\\n address[] memory aTokenAddresses = new address[](1);\\n aTokenAddresses[0] = address(aToken);\\n\\n _aaveIncentivesController.claimRewards(aTokenAddresses, amount, treasury);\\n\\n emit ClaimAaveRewardTokenToTreasury(amount);\\n }\\n\\n /**\\n @notice Calculates and updates the yield allocation to the treasury and the market\\n @dev treasuryPercent = 1 - marketPercent\\n @param totalValueRealizedForMarket total value of long and short side of the market\\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\\n @return The market allocation of the yield\\n */\\n function distributeYieldForTreasuryAndReturnMarketAllocation(\\n uint256 totalValueRealizedForMarket,\\n uint256 treasuryYieldPercent_e18\\n ) external override longShortOnly returns (uint256) {\\n uint256 totalHeld = aToken.balanceOf(address(this));\\n uint256 _totalReservedForTreasury = totalReservedForTreasury;\\n\\n uint256 totalRealized = totalValueRealizedForMarket +\\n _totalReservedForTreasury +\\n amountReservedInCaseOfInsufficientAaveLiquidity;\\n\\n if (totalRealized == totalHeld) {\\n return 0;\\n }\\n\\n // will revert in case totalRealized > totalHeld which should never occur since yield is always possitive with aave.\\n uint256 unrealizedYield = totalHeld - totalRealized;\\n\\n uint256 amountForTreasury = (unrealizedYield * treasuryYieldPercent_e18) / 1e18;\\n uint256 amountForMarketIncentives = unrealizedYield - amountForTreasury;\\n\\n totalReservedForTreasury = _totalReservedForTreasury + amountForTreasury;\\n\\n emit YieldDistributed(unrealizedYield, treasuryYieldPercent_e18);\\n\\n return amountForMarketIncentives;\\n }\\n\\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\\n function withdrawTreasuryFunds() external override {\\n uint256 amountToWithdrawForTreasury = totalReservedForTreasury;\\n totalReservedForTreasury = 0;\\n\\n // Redeem aToken for payment tokens.\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\\n address(paymentToken),\\n amountToWithdrawForTreasury,\\n treasury\\n );\\n\\n emit WithdrawTreasuryFunds();\\n }\\n\\n /// @notice Initializes a specific yield manager to a given market\\n function initializeForMarket() external override longShortOnly {\\n require(!isInitialized, \\\"Yield Manager is already in use\\\");\\n isInitialized = true;\\n }\\n}\\n\",\"keccak256\":\"0xd3a5c43ccb432cbffbbeed4df6a43898269be3869b9639d14a15db75d29531ce\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IYieldManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/// @notice Manages yield accumulation for the LongShort contract. Each market is deployed with its own yield manager to simplify the bookkeeping, as different markets may share a payment token and yield pool.\\nabstract contract IYieldManager {\\n event ClaimAaveRewardTokenToTreasury(uint256 amount);\\n\\n event YieldDistributed(uint256 unrealizedYield, uint256 treasuryYieldPercent_e18);\\n\\n /// @dev This is purely saving some gas, but the subgraph will know how much is due for the treasury at all times - no need to include in event.\\n event WithdrawTreasuryFunds();\\n\\n /// @notice distributed yield not yet transferred to the treasury\\n function totalReservedForTreasury() external virtual returns (uint256);\\n\\n /// @notice Deposits the given amount of payment tokens into this yield manager.\\n /// @param amount Amount of payment token to deposit\\n function depositPaymentToken(uint256 amount) external virtual;\\n\\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\\n /// @param user User to recieve the payout\\n /// @param amount Amount of payment token to pay to user\\n function transferPaymentTokensToUser(address user, uint256 amount) external virtual;\\n\\n /// @notice Withdraws the given amount of tokens from this yield manager.\\n /// @param amount Amount of payment token to withdraw\\n function removePaymentTokenFromMarket(uint256 amount) external virtual;\\n\\n /** \\n @notice Calculates and updates the yield allocation to the treasury and the market\\n @dev treasuryPercent = 1 - marketPercent\\n @param totalValueRealizedForMarket total value of long and short side of the market\\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\\n @return amountForMarketIncentives The market allocation of the yield\\n */\\n function distributeYieldForTreasuryAndReturnMarketAllocation(\\n uint256 totalValueRealizedForMarket,\\n uint256 treasuryYieldPercent_e18\\n ) external virtual returns (uint256 amountForMarketIncentives);\\n\\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\\n function withdrawTreasuryFunds() external virtual;\\n\\n /// @notice Initializes a specific yield manager to a given market\\n function initializeForMarket() external virtual;\\n}\\n\",\"keccak256\":\"0x20116e375d536c6ee7bec74d1ee5c1a552465a79fc8f1f2a9e2428078d3648f6\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/DataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\nlibrary DataTypes {\\n // refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.\\n struct ReserveData {\\n //stores the reserve configuration\\n ReserveConfigurationMap configuration;\\n //the liquidity index. Expressed in ray\\n uint128 liquidityIndex;\\n //variable borrow index. Expressed in ray\\n uint128 variableBorrowIndex;\\n //the current supply rate. Expressed in ray\\n uint128 currentLiquidityRate;\\n //the current variable borrow rate. Expressed in ray\\n uint128 currentVariableBorrowRate;\\n //the current stable borrow rate. Expressed in ray\\n uint128 currentStableBorrowRate;\\n uint40 lastUpdateTimestamp;\\n //tokens addresses\\n address aTokenAddress;\\n address stableDebtTokenAddress;\\n address variableDebtTokenAddress;\\n //address of the interest rate strategy\\n address interestRateStrategyAddress;\\n //the id of the reserve. Represents the position in the list of the active reserves\\n uint8 id;\\n }\\n\\n struct ReserveConfigurationMap {\\n //bit 0-15: LTV\\n //bit 16-31: Liq. threshold\\n //bit 32-47: Liq. bonus\\n //bit 48-55: Decimals\\n //bit 56: Reserve is active\\n //bit 57: reserve is frozen\\n //bit 58: borrowing is enabled\\n //bit 59: stable rate borrowing enabled\\n //bit 60-63: reserved\\n //bit 64-79: reserve factor\\n uint256 data;\\n }\\n\\n struct UserConfigurationMap {\\n uint256 data;\\n }\\n\\n enum InterestRateMode {\\n NONE,\\n STABLE,\\n VARIABLE\\n }\\n}\\n\",\"keccak256\":\"0xdfb8a94fa45a4d85eb7003871c10282ce4cbd709becb01a6cba988f6444fdbfd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/IAaveIncentivesController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\ninterface IAaveIncentivesController {\\n event RewardsClaimed(address indexed user, address indexed to, uint256 amount);\\n\\n function claimRewards(\\n address[] calldata assets,\\n uint256 amount,\\n address to\\n ) external returns (uint256);\\n\\n function getUserUnclaimedRewards(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xad57de8f82dee132c99314f6e7d80a003082aa7354671f09e45ed496fc56fc02\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/ILendingPool.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\nimport {ILendingPoolAddressesProvider} from \\\"./ILendingPoolAddressesProvider.sol\\\";\\nimport {DataTypes} from \\\"./DataTypes.sol\\\";\\n\\ninterface ILendingPool {\\n /**\\n * @dev Emitted on deposit()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address initiating the deposit\\n * @param onBehalfOf The beneficiary of the deposit, receiving the aTokens\\n * @param amount The amount deposited\\n * @param referral The referral code used\\n **/\\n event Deposit(\\n address indexed reserve,\\n address user,\\n address indexed onBehalfOf,\\n uint256 amount,\\n uint16 indexed referral\\n );\\n\\n /**\\n * @dev Emitted on withdraw()\\n * @param reserve The address of the underlyng asset being withdrawn\\n * @param user The address initiating the withdrawal, owner of aTokens\\n * @param to Address that will receive the underlying\\n * @param amount The amount to be withdrawn\\n **/\\n event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);\\n\\n /**\\n * @dev Emitted on borrow() and flashLoan() when debt needs to be opened\\n * @param reserve The address of the underlying asset being borrowed\\n * @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just\\n * initiator of the transaction on flashLoan()\\n * @param onBehalfOf The address that will be getting the debt\\n * @param amount The amount borrowed out\\n * @param borrowRateMode The rate mode: 1 for Stable, 2 for Variable\\n * @param borrowRate The numeric rate at which the user has borrowed\\n * @param referral The referral code used\\n **/\\n event Borrow(\\n address indexed reserve,\\n address user,\\n address indexed onBehalfOf,\\n uint256 amount,\\n uint256 borrowRateMode,\\n uint256 borrowRate,\\n uint16 indexed referral\\n );\\n\\n /**\\n * @dev Emitted on repay()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The beneficiary of the repayment, getting his debt reduced\\n * @param repayer The address of the user initiating the repay(), providing the funds\\n * @param amount The amount repaid\\n **/\\n event Repay(\\n address indexed reserve,\\n address indexed user,\\n address indexed repayer,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Emitted on swapBorrowRateMode()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user swapping his rate mode\\n * @param rateMode The rate mode that the user wants to swap to\\n **/\\n event Swap(address indexed reserve, address indexed user, uint256 rateMode);\\n\\n /**\\n * @dev Emitted on setUserUseReserveAsCollateral()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user enabling the usage as collateral\\n **/\\n event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on setUserUseReserveAsCollateral()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user enabling the usage as collateral\\n **/\\n event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on rebalanceStableBorrowRate()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user for which the rebalance has been executed\\n **/\\n event RebalanceStableBorrowRate(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on flashLoan()\\n * @param target The address of the flash loan receiver contract\\n * @param initiator The address initiating the flash loan\\n * @param asset The address of the asset being flash borrowed\\n * @param amount The amount flash borrowed\\n * @param premium The fee flash borrowed\\n * @param referralCode The referral code used\\n **/\\n event FlashLoan(\\n address indexed target,\\n address indexed initiator,\\n address indexed asset,\\n uint256 amount,\\n uint256 premium,\\n uint16 referralCode\\n );\\n\\n /**\\n * @dev Emitted when the pause is triggered.\\n */\\n event Paused();\\n\\n /**\\n * @dev Emitted when the pause is lifted.\\n */\\n event Unpaused();\\n\\n /**\\n * @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via\\n * LendingPoolCollateral manager using a DELEGATECALL\\n * This allows to have the events in the generated ABI for LendingPool.\\n * @param collateralAsset The address of the underlying asset used as collateral,\\n * to receive as result of the liquidation.\\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\\n * @param user The address of the borrower getting liquidated\\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\\n * @param liquidatedCollateralAmount The amount of collateral received by the liiquidator\\n * @param liquidator The address of the liquidator\\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\\n * to receive the underlying collateral asset directly\\n **/\\n event LiquidationCall(\\n address indexed collateralAsset,\\n address indexed debtAsset,\\n address indexed user,\\n uint256 debtToCover,\\n uint256 liquidatedCollateralAmount,\\n address liquidator,\\n bool receiveAToken\\n );\\n\\n /**\\n * @dev Emitted when the state of a reserve is updated. NOTE: This event is actually declared\\n * in the ReserveLogic library and emitted in the updateInterestRates() function. Since the function is internal,\\n * the event will actually be fired by the LendingPool contract. The event is therefore replicated here so it\\n * gets added to the LendingPool ABI\\n * @param reserve The address of the underlying asset of the reserve\\n * @param liquidityRate The new liquidity rate\\n * @param stableBorrowRate The new stable borrow rate\\n * @param variableBorrowRate The new variable borrow rate\\n * @param liquidityIndex The new liquidity index\\n * @param variableBorrowIndex The new variable borrow index\\n **/\\n event ReserveDataUpdated(\\n address indexed reserve,\\n uint256 liquidityRate,\\n uint256 stableBorrowRate,\\n uint256 variableBorrowRate,\\n uint256 liquidityIndex,\\n uint256 variableBorrowIndex\\n );\\n\\n /**\\n * @dev Deposits an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\\n * - E.g. User deposits 100 USDC and gets in return 100 aUSDC\\n * @param asset The address of the underlying asset to deposit\\n * @param amount The amount to be deposited\\n * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\\n * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\\n * is a different wallet\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n **/\\n function deposit(\\n address asset,\\n uint256 amount,\\n address onBehalfOf,\\n uint16 referralCode\\n ) external;\\n\\n /**\\n * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned\\n * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC\\n * @param asset The address of the underlying asset to withdraw\\n * @param amount The underlying amount to be withdrawn\\n * - Send the value type(uint256).max in order to withdraw the whole aToken balance\\n * @param to Address that will receive the underlying, same as msg.sender if the user\\n * wants to receive it on his own wallet, or a different address if the beneficiary is a\\n * different wallet\\n * @return The final amount withdrawn\\n **/\\n function withdraw(\\n address asset,\\n uint256 amount,\\n address to\\n ) external returns (uint256);\\n\\n /**\\n * @dev Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower\\n * already deposited enough collateral, or he was given enough allowance by a credit delegator on the\\n * corresponding debt token (StableDebtToken or VariableDebtToken)\\n * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet\\n * and 100 stable/variable debt tokens, depending on the `interestRateMode`\\n * @param asset The address of the underlying asset to borrow\\n * @param amount The amount to be borrowed\\n * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n * @param onBehalfOf Address of the user who will receive the debt. Should be the address of the borrower itself\\n * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator\\n * if he has been given credit delegation allowance\\n **/\\n function borrow(\\n address asset,\\n uint256 amount,\\n uint256 interestRateMode,\\n uint16 referralCode,\\n address onBehalfOf\\n ) external;\\n\\n /**\\n * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned\\n * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address\\n * @param asset The address of the borrowed underlying asset previously borrowed\\n * @param amount The amount to repay\\n * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\\n * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable\\n * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the\\n * user calling the function if he wants to reduce/remove his own debt, or the address of any other\\n * other borrower whose debt should be removed\\n * @return The final amount repaid\\n **/\\n function repay(\\n address asset,\\n uint256 amount,\\n uint256 rateMode,\\n address onBehalfOf\\n ) external returns (uint256);\\n\\n /**\\n * @dev Allows a borrower to swap his debt between stable and variable mode, or viceversa\\n * @param asset The address of the underlying asset borrowed\\n * @param rateMode The rate mode that the user wants to swap to\\n **/\\n function swapBorrowRateMode(address asset, uint256 rateMode) external;\\n\\n /**\\n * @dev Rebalances the stable interest rate of a user to the current stable rate defined on the reserve.\\n * - Users can be rebalanced if the following conditions are satisfied:\\n * 1. Usage ratio is above 95%\\n * 2. the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate,\\n * which means that too much has been borrowed at a stable rate and depositors are not earning enough\\n * @param asset The address of the underlying asset borrowed\\n * @param user The address of the user to be rebalanced\\n **/\\n function rebalanceStableBorrowRate(address asset, address user) external;\\n\\n /**\\n * @dev Allows depositors to enable/disable a specific deposited asset as collateral\\n * @param asset The address of the underlying asset deposited\\n * @param useAsCollateral `true` if the user wants to use the deposit as collateral, `false` otherwise\\n **/\\n function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external;\\n\\n /**\\n * @dev Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1\\n * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives\\n * a proportionally amount of the `collateralAsset` plus a bonus to cover market risk\\n * @param collateralAsset The address of the underlying asset used as collateral,\\n * to receive as result of the liquidation.\\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\\n * @param user The address of the borrower getting liquidated\\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\\n * to receive the underlying collateral asset directly\\n **/\\n function liquidationCall(\\n address collateralAsset,\\n address debtAsset,\\n address user,\\n uint256 debtToCover,\\n bool receiveAToken\\n ) external;\\n\\n /**\\n * @dev Allows smartcontracts to access the liquidity of the pool within one transaction,\\n * as long as the amount taken plus a fee is returned.\\n * IMPORTANT There are security concerns for developers of flashloan receiver\\n * contracts that must be kept into consideration.\\n * For further details please visit https://developers.aave.com\\n * @param receiverAddress The address of the contract receiving the funds,\\n * implementing the IFlashLoanReceiver interface.\\n * @param assets The addresses of the assets being flash-borrowed\\n * @param amounts The amounts amounts being flash-borrowed\\n * @param modes Types of the debt to open if the flash loan is not returned:\\n * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver\\n * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\\n * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\\n * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2\\n * @param params Variadic packed params to pass to the receiver as extra information\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n **/\\n function flashLoan(\\n address receiverAddress,\\n address[] calldata assets,\\n uint256[] calldata amounts,\\n uint256[] calldata modes,\\n address onBehalfOf,\\n bytes calldata params,\\n uint16 referralCode\\n ) external;\\n\\n /**\\n * @dev Returns the user account data across all the reserves\\n * @param user The address of the user\\n * @return totalCollateralETH the total collateral in ETH of the user\\n * @return totalDebtETH the total debt in ETH of the user\\n * @return availableBorrowsETH the borrowing power left of the user\\n * @return currentLiquidationThreshold the liquidation threshold of the user\\n * @return ltv the loan to value of the user\\n * @return healthFactor the current health factor of the user\\n **/\\n function getUserAccountData(address user)\\n external\\n view\\n returns (\\n uint256 totalCollateralETH,\\n uint256 totalDebtETH,\\n uint256 availableBorrowsETH,\\n uint256 currentLiquidationThreshold,\\n uint256 ltv,\\n uint256 healthFactor\\n );\\n\\n function initReserve(\\n address reserve,\\n address aTokenAddress,\\n address stableDebtAddress,\\n address variableDebtAddress,\\n address interestRateStrategyAddress\\n ) external;\\n\\n function setReserveInterestRateStrategyAddress(address reserve, address rateStrategyAddress)\\n external;\\n\\n function setConfiguration(address reserve, uint256 configuration) external;\\n\\n /**\\n * @dev Returns the configuration of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The configuration of the reserve\\n **/\\n function getConfiguration(address asset)\\n external\\n view\\n returns (DataTypes.ReserveConfigurationMap memory);\\n\\n /**\\n * @dev Returns the configuration of the user across all the reserves\\n * @param user The user address\\n * @return The configuration of the user\\n **/\\n function getUserConfiguration(address user)\\n external\\n view\\n returns (DataTypes.UserConfigurationMap memory);\\n\\n /**\\n * @dev Returns the normalized income normalized income of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The reserve's normalized income\\n */\\n function getReserveNormalizedIncome(address asset) external view returns (uint256);\\n\\n /**\\n * @dev Returns the normalized variable debt per unit of asset\\n * @param asset The address of the underlying asset of the reserve\\n * @return The reserve normalized variable debt\\n */\\n function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);\\n\\n /**\\n * @dev Returns the state and configuration of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The state of the reserve\\n **/\\n function getReserveData(address asset) external view returns (DataTypes.ReserveData memory);\\n\\n function finalizeTransfer(\\n address asset,\\n address from,\\n address to,\\n uint256 amount,\\n uint256 balanceFromAfter,\\n uint256 balanceToBefore\\n ) external;\\n\\n function getReservesList() external view returns (address[] memory);\\n\\n function getAddressesProvider() external view returns (ILendingPoolAddressesProvider);\\n\\n function setPause(bool val) external;\\n\\n function paused() external view returns (bool);\\n}\\n\",\"keccak256\":\"0xdf61949ab12c334f8ae028eafec802ef963fa96c9107309a178e5c7a46b1de37\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/ILendingPoolAddressesProvider.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\n/**\\n * @title LendingPoolAddressesProvider contract\\n * @dev Main registry of addresses part of or connected to the protocol, including permissioned roles\\n * - Acting also as factory of proxies and admin of those, so with right to change its implementations\\n * - Owned by the Aave Governance\\n * @author Aave\\n **/\\ninterface ILendingPoolAddressesProvider {\\n // event MarketIdSet(string newMarketId);\\n // event LendingPoolUpdated(address indexed newAddress);\\n // event ConfigurationAdminUpdated(address indexed newAddress);\\n // event EmergencyAdminUpdated(address indexed newAddress);\\n // event LendingPoolConfiguratorUpdated(address indexed newAddress);\\n // event LendingPoolCollateralManagerUpdated(address indexed newAddress);\\n // event PriceOracleUpdated(address indexed newAddress);\\n // event LendingRateOracleUpdated(address indexed newAddress);\\n // event ProxyCreated(bytes32 id, address indexed newAddress);\\n // event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy);\\n\\n // function getMarketId() external view returns (string memory);\\n\\n // function setMarketId(string calldata marketId) external;\\n\\n // function setAddress(bytes32 id, address newAddress) external;\\n\\n // function setAddressAsProxy(bytes32 id, address impl) external;\\n\\n // function getAddress(bytes32 id) external view returns (address);\\n\\n function getLendingPool() external view returns (address);\\n\\n // function setLendingPoolImpl(address pool) external;\\n\\n // function getLendingPoolConfigurator() external view returns (address);\\n\\n // function setLendingPoolConfiguratorImpl(address configurator) external;\\n\\n // function getLendingPoolCollateralManager() external view returns (address);\\n\\n // function setLendingPoolCollateralManager(address manager) external;\\n\\n // function getPoolAdmin() external view returns (address);\\n\\n // function setPoolAdmin(address admin) external;\\n\\n // function getEmergencyAdmin() external view returns (address);\\n\\n // function setEmergencyAdmin(address admin) external;\\n\\n // function getPriceOracle() external view returns (address);\\n\\n // function setPriceOracle(address priceOracle) external;\\n\\n // function getLendingRateOracle() external view returns (address);\\n\\n // function setLendingRateOracle(address lendingRateOracle) external;\\n}\\n\",\"keccak256\":\"0x706ba21943e504614721ec3a797cfac48edf00cb4c705c4522616f76d3306ff7\",\"license\":\"BUSL-1.1\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061234f806100206000396000f3fe6080604052600436106101c25760003560e01c80634f1ef286116100f757806391d1485411610095578063d547741f11610064578063d547741f146104ff578063eb6bffa21461051f578063edf565cc1461053f578063f72c0d8b14610554576101c2565b806391d148541461048a578063a0c1f15e146104aa578063a217fddf146104ca578063bba00ba5146104df576101c2565b806361d027b3116100d157806361d027b3146103f657806375b238fc146104165780638a5599b21461044a5780639063ee201461046a576101c2565b80634f1ef286146103a25780635d3a3890146103b55780635f2475ca146103d5576101c2565b80632f2ff15d1161016457806336568abe1161013e57806336568abe1461032c5780633659cfe61461034c578063392e53cd1461036c578063447479db1461038d576101c2565b80632f2ff15d146102d75780633013ce29146102f757806334944bb014610317576101c2565b80632429e535116101a05780632429e53514610233578063248a9ca31461025857806329949872146102885780632ae320cb146102c0576101c2565b806301ffc9a7146101c757806315429969146101fc5780631c499b5514610213575b600080fd5b3480156101d357600080fd5b506101e76101e2366004611ffe565b610588565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b506102116105bf565b005b34801561021f57600080fd5b5061021161022e366004611fb7565b6106ca565b34801561023f57600080fd5b5061024a6101015481565b6040519081526020016101f3565b34801561026457600080fd5b5061024a610273366004611fb7565b60009081526065602052604090206001015490565b34801561029457600080fd5b5060fb546102a8906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b3480156102cc57600080fd5b5061024a6101025481565b3480156102e357600080fd5b506102116102f2366004611fcf565b61082c565b34801561030357600080fd5b5060fd546102a8906001600160a01b031681565b34801561032357600080fd5b50610211610858565b34801561033857600080fd5b50610211610347366004611fcf565b6109fa565b34801561035857600080fd5b50610211610367366004611dc7565b610a74565b34801561037857600080fd5b5060fc546101e790600160a01b900460ff1681565b34801561039957600080fd5b50610211610a98565b6102116103b0366004611ead565b610bdc565b3480156103c157600080fd5b506102116103d0366004611dff565b610bf1565b3480156103e157600080fd5b50610100546102a8906001600160a01b031681565b34801561040257600080fd5b5060fc546102a8906001600160a01b031681565b34801561042257600080fd5b5061024a7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561045657600080fd5b5061024a61046536600461203e565b610e88565b34801561047657600080fd5b50610211610485366004611fb7565b610ffa565b34801561049657600080fd5b506101e76104a5366004611fcf565b61116a565b3480156104b657600080fd5b5060fe546102a8906001600160a01b031681565b3480156104d657600080fd5b5061024a600081565b3480156104eb57600080fd5b5060ff546102a8906001600160a01b031681565b34801561050b57600080fd5b5061021161051a366004611fcf565b611195565b34801561052b57600080fd5b5061021161053a366004611f6c565b6111bb565b34801561054b57600080fd5b5061021161139c565b34801561056057600080fd5b5061024a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806105b957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60fd5460ff5460408051630261bf8b60e01b815290516001600160a01b039384169363095ea7b3931691630261bf8b916004808301926020929190829003018186803b15801561060e57600080fd5b505afa158015610622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106469190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611f97565b50565b60fb546001600160a01b031633146106fd5760405162461bcd60e51b81526004016106f490612187565b60405180910390fd5b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561074b57600080fd5b505afa15801561075f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107839190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018490523060448201529116906369328dec90606401602060405180830381600087803b1580156107d657600080fd5b505af1925050508015610806575060408051601f3d908101601f1916820190925261080391810190612026565b60015b6108285780610102600082825461081d91906121fc565b909155506106c79050565b5050565b60008281526065602052604090206001015461084981335b611435565b6108538383611499565b505050565b61010054604051630cc7d40f60e11b81523060048201526001600160a01b0390911690600090829063198fa81e9060240160206040518083038186803b1580156108a157600080fd5b505afa1580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190612026565b6040805160018082528183019092529192506000919060208083019080368337505060fe5482519293506001600160a01b03169183915060009061092d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260fc54604051633111e7b360e01b815285831692633111e7b39261096f928692889216906004016120f0565b602060405180830381600087803b15801561098957600080fd5b505af115801561099d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c19190612026565b506040518281527fbdeb6031c2eac1ba6d1bd54a501b8942cf452ed6eb9f9a58512591a1faea22a49060200160405180910390a1505050565b6001600160a01b0381163314610a6a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106f4565b610828828261151f565b610a7d81611586565b6106c7816040518060200160405280600081525060006115b1565b6101018054600090915560ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b158015610ae757600080fd5b505afa158015610afb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1f9190611de3565b60fd5460fc54604051631a4ca37b60e21b81526001600160a01b0392831660048201526024810185905290821660448201529116906369328dec90606401602060405180830381600087803b158015610b7757600080fd5b505af1158015610b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610baf9190612026565b506040517f5b1d5b57337c7653ccd178787bc6e5aa6f8a6ee09b781e7a624d776e69d044cb90600090a150565b610be582611586565b610828828260016115b1565b600054610100900460ff1680610c0a575060005460ff16155b610c265760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015610c48576000805461ffff19166101011790555b6001600160a01b03891615801590610c6857506001600160a01b03881615155b8015610c7c57506001600160a01b03871615155b8015610c9057506001600160a01b03861615155b8015610ca457506001600160a01b03851615155b8015610cb857506001600160a01b03841615155b8015610ccc57506001600160a01b03821615155b610cd557600080fd5b60fb80546001600160a01b03808c166001600160a01b03199283161790925560fc8054928b1692909116919091179055610d0e82611732565b610100805460fd80546001600160a01b03808c166001600160a01b0319928316811790935560fe80548c831690841617905560ff80548b8316908416811790915590891661ffff8916600160a01b02929092166001600160b01b0319909416939093171790925560408051630261bf8b60e01b8152905163095ea7b39291630261bf8b916004808301926020929190829003018186803b158015610db157600080fd5b505afa158015610dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de99190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b158015610e3257600080fd5b505af1158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611f97565b508015610e7d576000805461ff00191690555b505050505050505050565b60fb546000906001600160a01b03163314610eb55760405162461bcd60e51b81526004016106f490612187565b60fe546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610ef957600080fd5b505afa158015610f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f319190612026565b610101546101025491925090600090610f4a83886121fc565b610f5491906121fc565b905082811415610f6a57600093505050506105b9565b6000610f768285612253565b90506000670de0b6b3a7640000610f8d8884612234565b610f979190612214565b90506000610fa58284612253565b9050610fb182866121fc565b6101015560408051848152602081018a90527ffe4996cd48c364c468cee70dd6b9061874ff01b05c5ea49311cbcabd9b9cb615910160405180910390a198975050505050505050565b60fb546001600160a01b031633146110245760405162461bcd60e51b81526004016106f490612187565b61010254156110615780610102541061104a5780610102600082825461081d9190612253565b610102546110589082612253565b60006101025590505b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110af57600080fd5b505afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190611de3565b60fd546101005460405163e8eda9df60e01b81526001600160a01b03928316600482015260248101859052306044820152600160a01b90910461ffff16606482015291169063e8eda9df90608401600060405180830381600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b5050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152606560205260409020600101546111b18133610844565b610853838361151f565b60fb546001600160a01b031633146111e55760405162461bcd60e51b81526004016106f490612187565b60fd5460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561123357600080fd5b505af1925050508015611263575060408051601f3d908101601f1916820190925261126091810190611f97565b60015b61126c5761127a565b80156112785750610828565b505b80610102600082825461128d9190612253565b909155505060ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b1580156112d757600080fd5b505afa1580156112eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130f9190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b0391821660048201526024810184905284821660448201529116906369328dec90606401602060405180830381600087803b15801561136457600080fd5b505af1158015611378573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190612026565b60fb546001600160a01b031633146113c65760405162461bcd60e51b81526004016106f490612187565b60fc54600160a01b900460ff16156114205760405162461bcd60e51b815260206004820152601f60248201527f5969656c64204d616e6167657220697320616c726561647920696e207573650060448201526064016106f4565b60fc805460ff60a01b1916600160a01b179055565b61143f828261116a565b61082857611457816001600160a01b031660146117b7565b6114628360206117b7565b60405160200161147392919061207b565b60408051601f198184030181529082905262461bcd60e51b82526106f491600401612154565b6114a3828261116a565b6108285760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556114db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611529828261116a565b156108285760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108288133610844565b60006115e47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506115ef846119a0565b6000835111806115fc5750815b1561160d5761160b8484611a45565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661116357805460ff191660011781556040516001600160a01b038316602482015261168c90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611a45565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146117295760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016106f4565b61116385611b30565b600054610100900460ff168061174b575060005460ff16155b6117675760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611789576000805461ffff19166101011790555b611791611b70565b611799611bf3565b6117a282611c51565b8015610828576000805461ff00191690555050565b606060006117c6836002612234565b6117d19060026121fc565b67ffffffffffffffff8111156117f757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611821576020820181803683370190505b509050600360fc1b8160008151811061184a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061188757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006118ab846002612234565b6118b69060016121fc565b90505b600181111561194a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106118f857634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061191c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936119438161229a565b90506118b9565b5083156119995760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106f4565b9392505050565b803b611a045760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016106f4565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611aa45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016106f4565b600080846001600160a01b031684604051611abf919061205f565b600060405180830381855af49150503d8060008114611afa576040519150601f19603f3d011682016040523d82523d6000602084013e611aff565b606091505b5091509150611b2782826040518060600160405280602781526020016122f360279139611d1a565b95945050505050565b611b39816119a0565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611b89575060005460ff16155b611ba55760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bc7576000805461ffff19166101011790555b611bcf611d53565b611bd7611d53565b611bdf611d53565b80156106c7576000805461ff001916905550565b600054610100900460ff1680611c0c575060005460ff16155b611c285760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bcf576000805461ffff1916610101179055611bd7611d53565b600054610100900460ff1680611c6a575060005460ff16155b611c865760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611ca8576000805461ffff19166101011790555b6001600160a01b038216611cbb57600080fd5b611cc6600083611dbd565b611cf07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583611dbd565b6117a27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383611dbd565b60608315611d29575081611999565b825115611d395782518084602001fd5b8160405162461bcd60e51b81526004016106f49190612154565b600054610100900460ff1680611d6c575060005460ff16155b611d885760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bdf576000805461ffff191661010117905580156106c7576000805461ff001916905550565b6108288282611499565b600060208284031215611dd8578081fd5b8135611999816122dd565b600060208284031215611df4578081fd5b8151611999816122dd565b600080600080600080600080610100898b031215611e1b578384fd5b8835611e26816122dd565b97506020890135611e36816122dd565b96506040890135611e46816122dd565b95506060890135611e56816122dd565b94506080890135611e66816122dd565b935060a0890135611e76816122dd565b925060c089013561ffff81168114611e8c578283fd5b915060e0890135611e9c816122dd565b809150509295985092959890939650565b60008060408385031215611ebf578182fd5b8235611eca816122dd565b9150602083013567ffffffffffffffff80821115611ee6578283fd5b818501915085601f830112611ef9578283fd5b813581811115611f0b57611f0b6122c7565b604051601f8201601f19908116603f01168101908382118183101715611f3357611f336122c7565b81604052828152886020848701011115611f4b578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215611f7e578182fd5b8235611f89816122dd565b946020939093013593505050565b600060208284031215611fa8578081fd5b81518015158114611999578182fd5b600060208284031215611fc8578081fd5b5035919050565b60008060408385031215611fe1578182fd5b823591506020830135611ff3816122dd565b809150509250929050565b60006020828403121561200f578081fd5b81356001600160e01b031981168114611999578182fd5b600060208284031215612037578081fd5b5051919050565b60008060408385031215612050578182fd5b50508035926020909101359150565b6000825161207181846020870161226a565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516120b381601785016020880161226a565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120e481602884016020880161226a565b01602801949350505050565b606080825284519082018190526000906020906080840190828801845b828110156121325781516001600160a01b03168452928401929084019060010161210d565b50505090830194909452506001600160a01b0391909116604090910152919050565b600060208252825180602084015261217381604085016020870161226a565b601f01601f19169190910160400192915050565b6020808252600d908201526c139bdd081b1bdb99d4da1bdc9d609a1b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561220f5761220f6122b1565b500190565b60008261222f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561224e5761224e6122b1565b500290565b600082821015612265576122656122b1565b500390565b60005b8381101561228557818101518382015260200161226d565b83811115612294576000848401525b50505050565b6000816122a9576122a96122b1565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146106c757600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122061c70aab4ceb80431078b3b8a133042e3380167471ee409f8beb381cd0e586b464736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c80634f1ef286116100f757806391d1485411610095578063d547741f11610064578063d547741f146104ff578063eb6bffa21461051f578063edf565cc1461053f578063f72c0d8b14610554576101c2565b806391d148541461048a578063a0c1f15e146104aa578063a217fddf146104ca578063bba00ba5146104df576101c2565b806361d027b3116100d157806361d027b3146103f657806375b238fc146104165780638a5599b21461044a5780639063ee201461046a576101c2565b80634f1ef286146103a25780635d3a3890146103b55780635f2475ca146103d5576101c2565b80632f2ff15d1161016457806336568abe1161013e57806336568abe1461032c5780633659cfe61461034c578063392e53cd1461036c578063447479db1461038d576101c2565b80632f2ff15d146102d75780633013ce29146102f757806334944bb014610317576101c2565b80632429e535116101a05780632429e53514610233578063248a9ca31461025857806329949872146102885780632ae320cb146102c0576101c2565b806301ffc9a7146101c757806315429969146101fc5780631c499b5514610213575b600080fd5b3480156101d357600080fd5b506101e76101e2366004611ffe565b610588565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b506102116105bf565b005b34801561021f57600080fd5b5061021161022e366004611fb7565b6106ca565b34801561023f57600080fd5b5061024a6101015481565b6040519081526020016101f3565b34801561026457600080fd5b5061024a610273366004611fb7565b60009081526065602052604090206001015490565b34801561029457600080fd5b5060fb546102a8906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b3480156102cc57600080fd5b5061024a6101025481565b3480156102e357600080fd5b506102116102f2366004611fcf565b61082c565b34801561030357600080fd5b5060fd546102a8906001600160a01b031681565b34801561032357600080fd5b50610211610858565b34801561033857600080fd5b50610211610347366004611fcf565b6109fa565b34801561035857600080fd5b50610211610367366004611dc7565b610a74565b34801561037857600080fd5b5060fc546101e790600160a01b900460ff1681565b34801561039957600080fd5b50610211610a98565b6102116103b0366004611ead565b610bdc565b3480156103c157600080fd5b506102116103d0366004611dff565b610bf1565b3480156103e157600080fd5b50610100546102a8906001600160a01b031681565b34801561040257600080fd5b5060fc546102a8906001600160a01b031681565b34801561042257600080fd5b5061024a7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561045657600080fd5b5061024a61046536600461203e565b610e88565b34801561047657600080fd5b50610211610485366004611fb7565b610ffa565b34801561049657600080fd5b506101e76104a5366004611fcf565b61116a565b3480156104b657600080fd5b5060fe546102a8906001600160a01b031681565b3480156104d657600080fd5b5061024a600081565b3480156104eb57600080fd5b5060ff546102a8906001600160a01b031681565b34801561050b57600080fd5b5061021161051a366004611fcf565b611195565b34801561052b57600080fd5b5061021161053a366004611f6c565b6111bb565b34801561054b57600080fd5b5061021161139c565b34801561056057600080fd5b5061024a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806105b957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60fd5460ff5460408051630261bf8b60e01b815290516001600160a01b039384169363095ea7b3931691630261bf8b916004808301926020929190829003018186803b15801561060e57600080fd5b505afa158015610622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106469190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611f97565b50565b60fb546001600160a01b031633146106fd5760405162461bcd60e51b81526004016106f490612187565b60405180910390fd5b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561074b57600080fd5b505afa15801561075f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107839190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018490523060448201529116906369328dec90606401602060405180830381600087803b1580156107d657600080fd5b505af1925050508015610806575060408051601f3d908101601f1916820190925261080391810190612026565b60015b6108285780610102600082825461081d91906121fc565b909155506106c79050565b5050565b60008281526065602052604090206001015461084981335b611435565b6108538383611499565b505050565b61010054604051630cc7d40f60e11b81523060048201526001600160a01b0390911690600090829063198fa81e9060240160206040518083038186803b1580156108a157600080fd5b505afa1580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190612026565b6040805160018082528183019092529192506000919060208083019080368337505060fe5482519293506001600160a01b03169183915060009061092d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260fc54604051633111e7b360e01b815285831692633111e7b39261096f928692889216906004016120f0565b602060405180830381600087803b15801561098957600080fd5b505af115801561099d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c19190612026565b506040518281527fbdeb6031c2eac1ba6d1bd54a501b8942cf452ed6eb9f9a58512591a1faea22a49060200160405180910390a1505050565b6001600160a01b0381163314610a6a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106f4565b610828828261151f565b610a7d81611586565b6106c7816040518060200160405280600081525060006115b1565b6101018054600090915560ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b158015610ae757600080fd5b505afa158015610afb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1f9190611de3565b60fd5460fc54604051631a4ca37b60e21b81526001600160a01b0392831660048201526024810185905290821660448201529116906369328dec90606401602060405180830381600087803b158015610b7757600080fd5b505af1158015610b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610baf9190612026565b506040517f5b1d5b57337c7653ccd178787bc6e5aa6f8a6ee09b781e7a624d776e69d044cb90600090a150565b610be582611586565b610828828260016115b1565b600054610100900460ff1680610c0a575060005460ff16155b610c265760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015610c48576000805461ffff19166101011790555b6001600160a01b03891615801590610c6857506001600160a01b03881615155b8015610c7c57506001600160a01b03871615155b8015610c9057506001600160a01b03861615155b8015610ca457506001600160a01b03851615155b8015610cb857506001600160a01b03841615155b8015610ccc57506001600160a01b03821615155b610cd557600080fd5b60fb80546001600160a01b03808c166001600160a01b03199283161790925560fc8054928b1692909116919091179055610d0e82611732565b610100805460fd80546001600160a01b03808c166001600160a01b0319928316811790935560fe80548c831690841617905560ff80548b8316908416811790915590891661ffff8916600160a01b02929092166001600160b01b0319909416939093171790925560408051630261bf8b60e01b8152905163095ea7b39291630261bf8b916004808301926020929190829003018186803b158015610db157600080fd5b505afa158015610dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de99190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b158015610e3257600080fd5b505af1158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611f97565b508015610e7d576000805461ff00191690555b505050505050505050565b60fb546000906001600160a01b03163314610eb55760405162461bcd60e51b81526004016106f490612187565b60fe546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610ef957600080fd5b505afa158015610f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f319190612026565b610101546101025491925090600090610f4a83886121fc565b610f5491906121fc565b905082811415610f6a57600093505050506105b9565b6000610f768285612253565b90506000670de0b6b3a7640000610f8d8884612234565b610f979190612214565b90506000610fa58284612253565b9050610fb182866121fc565b6101015560408051848152602081018a90527ffe4996cd48c364c468cee70dd6b9061874ff01b05c5ea49311cbcabd9b9cb615910160405180910390a198975050505050505050565b60fb546001600160a01b031633146110245760405162461bcd60e51b81526004016106f490612187565b61010254156110615780610102541061104a5780610102600082825461081d9190612253565b610102546110589082612253565b60006101025590505b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110af57600080fd5b505afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190611de3565b60fd546101005460405163e8eda9df60e01b81526001600160a01b03928316600482015260248101859052306044820152600160a01b90910461ffff16606482015291169063e8eda9df90608401600060405180830381600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b5050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152606560205260409020600101546111b18133610844565b610853838361151f565b60fb546001600160a01b031633146111e55760405162461bcd60e51b81526004016106f490612187565b60fd5460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561123357600080fd5b505af1925050508015611263575060408051601f3d908101601f1916820190925261126091810190611f97565b60015b61126c5761127a565b80156112785750610828565b505b80610102600082825461128d9190612253565b909155505060ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b1580156112d757600080fd5b505afa1580156112eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130f9190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b0391821660048201526024810184905284821660448201529116906369328dec90606401602060405180830381600087803b15801561136457600080fd5b505af1158015611378573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190612026565b60fb546001600160a01b031633146113c65760405162461bcd60e51b81526004016106f490612187565b60fc54600160a01b900460ff16156114205760405162461bcd60e51b815260206004820152601f60248201527f5969656c64204d616e6167657220697320616c726561647920696e207573650060448201526064016106f4565b60fc805460ff60a01b1916600160a01b179055565b61143f828261116a565b61082857611457816001600160a01b031660146117b7565b6114628360206117b7565b60405160200161147392919061207b565b60408051601f198184030181529082905262461bcd60e51b82526106f491600401612154565b6114a3828261116a565b6108285760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556114db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611529828261116a565b156108285760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108288133610844565b60006115e47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506115ef846119a0565b6000835111806115fc5750815b1561160d5761160b8484611a45565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661116357805460ff191660011781556040516001600160a01b038316602482015261168c90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611a45565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146117295760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016106f4565b61116385611b30565b600054610100900460ff168061174b575060005460ff16155b6117675760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611789576000805461ffff19166101011790555b611791611b70565b611799611bf3565b6117a282611c51565b8015610828576000805461ff00191690555050565b606060006117c6836002612234565b6117d19060026121fc565b67ffffffffffffffff8111156117f757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611821576020820181803683370190505b509050600360fc1b8160008151811061184a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061188757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006118ab846002612234565b6118b69060016121fc565b90505b600181111561194a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106118f857634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061191c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936119438161229a565b90506118b9565b5083156119995760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106f4565b9392505050565b803b611a045760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016106f4565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611aa45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016106f4565b600080846001600160a01b031684604051611abf919061205f565b600060405180830381855af49150503d8060008114611afa576040519150601f19603f3d011682016040523d82523d6000602084013e611aff565b606091505b5091509150611b2782826040518060600160405280602781526020016122f360279139611d1a565b95945050505050565b611b39816119a0565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611b89575060005460ff16155b611ba55760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bc7576000805461ffff19166101011790555b611bcf611d53565b611bd7611d53565b611bdf611d53565b80156106c7576000805461ff001916905550565b600054610100900460ff1680611c0c575060005460ff16155b611c285760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bcf576000805461ffff1916610101179055611bd7611d53565b600054610100900460ff1680611c6a575060005460ff16155b611c865760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611ca8576000805461ffff19166101011790555b6001600160a01b038216611cbb57600080fd5b611cc6600083611dbd565b611cf07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583611dbd565b6117a27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383611dbd565b60608315611d29575081611999565b825115611d395782518084602001fd5b8160405162461bcd60e51b81526004016106f49190612154565b600054610100900460ff1680611d6c575060005460ff16155b611d885760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bdf576000805461ffff191661010117905580156106c7576000805461ff001916905550565b6108288282611499565b600060208284031215611dd8578081fd5b8135611999816122dd565b600060208284031215611df4578081fd5b8151611999816122dd565b600080600080600080600080610100898b031215611e1b578384fd5b8835611e26816122dd565b97506020890135611e36816122dd565b96506040890135611e46816122dd565b95506060890135611e56816122dd565b94506080890135611e66816122dd565b935060a0890135611e76816122dd565b925060c089013561ffff81168114611e8c578283fd5b915060e0890135611e9c816122dd565b809150509295985092959890939650565b60008060408385031215611ebf578182fd5b8235611eca816122dd565b9150602083013567ffffffffffffffff80821115611ee6578283fd5b818501915085601f830112611ef9578283fd5b813581811115611f0b57611f0b6122c7565b604051601f8201601f19908116603f01168101908382118183101715611f3357611f336122c7565b81604052828152886020848701011115611f4b578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215611f7e578182fd5b8235611f89816122dd565b946020939093013593505050565b600060208284031215611fa8578081fd5b81518015158114611999578182fd5b600060208284031215611fc8578081fd5b5035919050565b60008060408385031215611fe1578182fd5b823591506020830135611ff3816122dd565b809150509250929050565b60006020828403121561200f578081fd5b81356001600160e01b031981168114611999578182fd5b600060208284031215612037578081fd5b5051919050565b60008060408385031215612050578182fd5b50508035926020909101359150565b6000825161207181846020870161226a565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516120b381601785016020880161226a565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120e481602884016020880161226a565b01602801949350505050565b606080825284519082018190526000906020906080840190828801845b828110156121325781516001600160a01b03168452928401929084019060010161210d565b50505090830194909452506001600160a01b0391909116604090910152919050565b600060208252825180602084015261217381604085016020870161226a565b601f01601f19169190910160400192915050565b6020808252600d908201526c139bdd081b1bdb99d4da1bdc9d609a1b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561220f5761220f6122b1565b500190565b60008261222f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561224e5761224e6122b1565b500290565b600082821015612265576122656122b1565b500390565b60005b8381101561228557818101518382015260200161226d565b83811115612294576000848401525b50505050565b6000816122a9576122a96122b1565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146106c757600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122061c70aab4ceb80431078b3b8a133042e3380167471ee409f8beb381cd0e586b464736f6c63430008030033", + "devdoc": { + "details": "https://docs.aave.com/portal/", + "kind": "dev", + "methods": { + "claimAaveRewardsToTreasury()": { + "details": "This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued" + }, + "depositPaymentToken(uint256)": { + "params": { + "amount": "Amount of payment token to deposit" + } + }, + "distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)": { + "details": "treasuryPercent = 1 - marketPercent", + "params": { + "totalValueRealizedForMarket": "total value of long and short side of the market", + "treasuryYieldPercent_e18": "Percentage of yield in base 1e18 that is allocated to the treasury" + }, + "returns": { + "_0": "The market allocation of the yield" + } + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,address,address,address,address,address,uint16,address)": { + "details": "referral code will be set to 0, depricated Aave feature", + "params": { + "_aToken": "address of the interest accruing token linked to the payment token", + "_aaveReferralCode": "unique code for aave referrals", + "_admin": "admin for the contract", + "_lendingPoolAddressesProvider": "address of the aave lending pool address provider contract", + "_longShort": "address of the longShort contract", + "_paymentToken": "address of the payment token", + "_treasury": "address of the treasury contract" + } + }, + "removePaymentTokenFromMarket(uint256)": { + "details": "This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave. This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.", + "params": { + "amount": "Amount of payment token to withdraw" + } + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "transferPaymentTokensToUser(address,uint256)": { + "params": { + "amount": "Amount of payment token to pay to user", + "user": "User to recieve the payout" + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "stateVariables": { + "aToken": { + "details": "ADAI token" + }, + "amountReservedInCaseOfInsufficientAaveLiquidity": { + "details": "This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal. In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available." + }, + "paymentToken": { + "details": "DAI token" + }, + "referralCode": { + "details": "An aave specific referralCode that has been a depricated feature. This will be set to 0 for \"no referral\" at deployment" + } + }, + "title": "YieldManagerAave", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "aToken()": { + "notice": "The token representing the interest accruing payment token position from Aave" + }, + "aaveIncentivesController()": { + "notice": "The specific Aave incentives controller contract" + }, + "claimAaveRewardsToTreasury()": { + "notice": "Allows for withdrawal of aave rewards to the treasury contract" + }, + "depositPaymentToken(uint256)": { + "notice": "Allows the LongShort contract to deposit tokens into the aave pool" + }, + "distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)": { + "notice": "Calculates and updates the yield allocation to the treasury and the market" + }, + "initialize(address,address,address,address,address,address,uint16,address)": { + "notice": "Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts" + }, + "initializeForMarket()": { + "notice": "Initializes a specific yield manager to a given market" + }, + "isInitialized()": { + "notice": "boolean to prevent markets using an already initialized market" + }, + "lendingPoolAddressesProvider()": { + "notice": "The specific Aave lending pool address provider contract" + }, + "longShort()": { + "notice": "address of longShort contract" + }, + "paymentToken()": { + "notice": "The payment token the yield manager supports" + }, + "removePaymentTokenFromMarket(uint256)": { + "notice": "Allows the LongShort contract to redeem aTokens for the payment token" + }, + "totalReservedForTreasury()": { + "notice": "distributed yield not yet transferred to the treasury" + }, + "transferPaymentTokensToUser(address,uint256)": { + "notice": "Allows the LongShort pay out a user from tokens already withdrawn from Aave" + }, + "treasury()": { + "notice": "address of treasury contract - this is the address that can claim aave incentives rewards" + }, + "withdrawTreasuryFunds()": { + "notice": "Withdraw treasury allocated accrued yield from the lending pool to the treasury contract" + } + }, + "notice": "contract is used to manage the yield generated by the underlying tokens. YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol. Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that continuously accrues interest based on a lend/borrow liquidity ratio.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 17257, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "longShort", + "offset": 0, + "slot": "251", + "type": "t_address" + }, + { + "astId": 17260, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "treasury", + "offset": 0, + "slot": "252", + "type": "t_address" + }, + { + "astId": 17263, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "isInitialized", + "offset": 20, + "slot": "252", + "type": "t_bool" + }, + { + "astId": 17267, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "paymentToken", + "offset": 0, + "slot": "253", + "type": "t_contract(IERC20)7293" + }, + { + "astId": 17271, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "aToken", + "offset": 0, + "slot": "254", + "type": "t_contract(IERC20Upgradeable)1983" + }, + { + "astId": 17275, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "lendingPoolAddressesProvider", + "offset": 0, + "slot": "255", + "type": "t_contract(ILendingPoolAddressesProvider)18905" + }, + { + "astId": 17279, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "aaveIncentivesController", + "offset": 0, + "slot": "256", + "type": "t_contract(IAaveIncentivesController)18518" + }, + { + "astId": 17282, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "referralCode", + "offset": 20, + "slot": "256", + "type": "t_uint16" + }, + { + "astId": 17286, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "totalReservedForTreasury", + "offset": 0, + "slot": "257", + "type": "t_uint256" + }, + { + "astId": 17289, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "amountReservedInCaseOfInsufficientAaveLiquidity", + "offset": 0, + "slot": "258", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IAaveIncentivesController)18518": { + "encoding": "inplace", + "label": "contract IAaveIncentivesController", + "numberOfBytes": "20" + }, + "t_contract(IERC20)7293": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_contract(IERC20Upgradeable)1983": { + "encoding": "inplace", + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(ILendingPoolAddressesProvider)18905": { + "encoding": "inplace", + "label": "contract ILendingPoolAddressesProvider", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/YieldManagerETH_Proxy.json b/deployments/mumbai/YieldManagerETH_Proxy.json new file mode 100644 index 0000000..cfca513 --- /dev/null +++ b/deployments/mumbai/YieldManagerETH_Proxy.json @@ -0,0 +1,206 @@ +{ + "address": "0xD5627DEe8700213aE9F074bE68b5Ac61AE41c5B0", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xD5627DEe8700213aE9F074bE68b5Ac61AE41c5B0", + "transactionIndex": 3, + "gasUsed": "519957", + "logsBloom": "0x00000004000000000000000000000041410000000000000000000000000000000000000002000000000000008000000000018020000000000000000000200000000000000000000000000000000002800000000020000000000100000000000000000000020000000000000000000800000000000000000880010000000000000000000000000000000000000000004020000000000100000000000000000000220000002000004000000200000000000000080000000000001000000000024000000020000000400001000000000000108000000000018100500000000020000090000000000000000000000000020000000000010000000000002000100000", + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c", + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 18869069, + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "address": "0xD5627DEe8700213aE9F074bE68b5Ac61AE41c5B0", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000027528cc6da40c9e01a4e1d226b7cc23a914f36c9" + ], + "data": "0x", + "logIndex": 13, + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869069, + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "address": "0xD5627DEe8700213aE9F074bE68b5Ac61AE41c5B0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 14, + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869069, + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "address": "0xD5627DEe8700213aE9F074bE68b5Ac61AE41c5B0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 15, + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869069, + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "address": "0xD5627DEe8700213aE9F074bE68b5Ac61AE41c5B0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 16, + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869069, + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "address": "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000d5627dee8700213ae9f074be68b5ac61ae41c5b0", + "0x0000000000000000000000009198f13b08e299d85e096929fa9781a1e3d5d827" + ], + "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "logIndex": 17, + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c" + }, + { + "transactionIndex": 3, + "blockNumber": 18869069, + "transactionHash": "0xe68ed48b7b039128c69d0f9bd56470009539e98ceebb9136dad0ee6c2993b04b", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" + ], + "data": "0x00000000000000000000000000000000000000000000000000058ab1c4d9b60000000000000000000000000000000000000000000000000007aaea7792f41ccd00000000000000000000000000000000000000000000000009dee724d74e8a3400000000000000000000000000000000000000000000000007a55fc5ce1a66cd00000000000000000000000000000000000000000000000009e471d69c284034", + "logIndex": 18, + "blockHash": "0x651e492772040e49e6d549deed137c3ca511f13b58e1e28adf4a6aa60138ea7c" + } + ], + "blockNumber": 18869069, + "cumulativeGasUsed": "1146294", + "status": 1, + "byzantium": true + }, + "args": [ + "0x27528cc6Da40c9e01a4e1D226b7Cc23a914f36C9", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x5d3a389000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000733fc3a395a35904045ab6a3678601512c244003000000000000000000000000001b3b4d0f3714ca98ba10f6042daebf0b1b7b6f000000000000000000000000639cb7b21ee2161df9c882483c9d55c90c20ca3e000000000000000000000000178113104fecbcd7ff8669a0150721e231f0fd4b000000000000000000000000d41ae58e803edf4304334acce4dc4ec34a63c64400000000000000000000000000000000000000000000000000000000000000000000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/YieldManagerMATIC.json b/deployments/mumbai/YieldManagerMATIC.json new file mode 100644 index 0000000..ee3242a --- /dev/null +++ b/deployments/mumbai/YieldManagerMATIC.json @@ -0,0 +1,780 @@ +{ + "address": "0x1c2760728CfF0ceaF41ED5A37d441AB90DcA2Cc1", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ClaimAaveRewardTokenToTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "WithdrawTreasuryFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unrealizedYield", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "YieldDistributed", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aaveIncentivesController", + "outputs": [ + { + "internalType": "contract IAaveIncentivesController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "amountReservedInCaseOfInsufficientAaveLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimAaveRewardsToTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositPaymentToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "totalValueRealizedForMarket", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "distributeYieldForTreasuryAndReturnMarketAllocation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_aToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_lendingPoolAddressesProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "_aaveIncentivesController", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_aaveReferralCode", + "type": "uint16" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeForMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lendingPoolAddressesProvider", + "outputs": [ + { + "internalType": "contract ILendingPoolAddressesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paymentToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "removePaymentTokenFromMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalReservedForTreasury", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferPaymentTokensToUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateLatestLendingPoolAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawTreasuryFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x1c2760728CfF0ceaF41ED5A37d441AB90DcA2Cc1", + "transactionIndex": 0, + "gasUsed": "519957", + "logsBloom": "0x00000004000000020000000000000040410000000000020000400000000000000000000002000008000000008002000000008000000000000000000000200000000000000000000000000000000003800000000020000000000100000000000000000000030000000000000000000800000000000000000880010000000000000000000000000000000000000000004020000000000000000000000000000000220000000400004020000000000000008001080000000000001000000000004000000020000000400001000000000000100000000000008104500000000020000090000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8", + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869287, + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "address": "0x1c2760728CfF0ceaF41ED5A37d441AB90DcA2Cc1", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000b44587e3d6f361266f293a43c94815f391964c28" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8" + }, + { + "transactionIndex": 0, + "blockNumber": 18869287, + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "address": "0x1c2760728CfF0ceaF41ED5A37d441AB90DcA2Cc1", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8" + }, + { + "transactionIndex": 0, + "blockNumber": 18869287, + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "address": "0x1c2760728CfF0ceaF41ED5A37d441AB90DcA2Cc1", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8" + }, + { + "transactionIndex": 0, + "blockNumber": 18869287, + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "address": "0x1c2760728CfF0ceaF41ED5A37d441AB90DcA2Cc1", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8" + }, + { + "transactionIndex": 0, + "blockNumber": 18869287, + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "address": "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000001c2760728cff0ceaf41ed5a37d441ab90dca2cc1", + "0x0000000000000000000000009198f13b08e299d85e096929fa9781a1e3d5d827" + ], + "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "logIndex": 4, + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8" + }, + { + "transactionIndex": 0, + "blockNumber": 18869287, + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000058ab1c4d9b600000000000000000000000000000000000000000000000000074cafdcdac924cd000000000000000000000000000000000000000000000166888752b6be466cad0000000000000000000000000000000000000000000000000747252b15ef6ecd000000000000000000000000000000000000000000000166888cdd68832022ad", + "logIndex": 5, + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8" + } + ], + "blockNumber": 18869287, + "cumulativeGasUsed": "519957", + "status": 1, + "byzantium": true + }, + "args": [ + "0xb44587E3d6F361266F293A43C94815f391964C28", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x5d3a389000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000733fc3a395a35904045ab6a3678601512c244003000000000000000000000000001b3b4d0f3714ca98ba10f6042daebf0b1b7b6f000000000000000000000000639cb7b21ee2161df9c882483c9d55c90c20ca3e000000000000000000000000178113104fecbcd7ff8669a0150721e231f0fd4b000000000000000000000000d41ae58e803edf4304334acce4dc4ec34a63c64400000000000000000000000000000000000000000000000000000000000000000000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "0x51565F132c5B25BC9EA6e4D112ab6A680d553d2A", + "0x733FC3a395a35904045Ab6a3678601512c244003", + "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F", + "0x639cB7b21ee2161DF9c882483C9D55c90c20Ca3e", + "0x178113104fEcbcD7fF8669a0150721e231F0FD4B", + "0xd41aE58e803Edf4304334acCE4DC4Ec34a63C644", + 0, + "0x2740EA9F72B23372621D8D718F52609b80c24E61" + ] + }, + "implementation": "0xb44587E3d6F361266F293A43C94815f391964C28", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/YieldManagerMATIC_Implementation.json b/deployments/mumbai/YieldManagerMATIC_Implementation.json new file mode 100644 index 0000000..2b99dae --- /dev/null +++ b/deployments/mumbai/YieldManagerMATIC_Implementation.json @@ -0,0 +1,1034 @@ +{ + "address": "0xb44587E3d6F361266F293A43C94815f391964C28", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ClaimAaveRewardTokenToTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "WithdrawTreasuryFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unrealizedYield", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "YieldDistributed", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aaveIncentivesController", + "outputs": [ + { + "internalType": "contract IAaveIncentivesController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "amountReservedInCaseOfInsufficientAaveLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimAaveRewardsToTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositPaymentToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "totalValueRealizedForMarket", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "distributeYieldForTreasuryAndReturnMarketAllocation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_aToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_lendingPoolAddressesProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "_aaveIncentivesController", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_aaveReferralCode", + "type": "uint16" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeForMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lendingPoolAddressesProvider", + "outputs": [ + { + "internalType": "contract ILendingPoolAddressesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paymentToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "removePaymentTokenFromMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalReservedForTreasury", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferPaymentTokensToUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateLatestLendingPoolAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawTreasuryFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xd2817ce00fd76b95416a06f62092f36abb3909413cb0b4fb29c17f176430dc3a", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0xb44587E3d6F361266F293A43C94815f391964C28", + "transactionIndex": 0, + "gasUsed": "2004865", + "logsBloom": "0x00000000000000020000000000000000010000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000008000500000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0xdc89050a8f3aeb352fa2a3aaad1b0da8d3d4d69fcaef222bd3178e222cfe4f2d", + "transactionHash": "0xd2817ce00fd76b95416a06f62092f36abb3909413cb0b4fb29c17f176430dc3a", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869283, + "transactionHash": "0xd2817ce00fd76b95416a06f62092f36abb3909413cb0b4fb29c17f176430dc3a", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000155e3e06715e0000000000000000000000000000000000000000000000000007620e1ae13a82cd000000000000000000000000000000000000000000000166886f7d76d1497ead000000000000000000000000000000000000000000000000074cafdcdac924cd0000000000000000000000000000000000000000000001668884dbb4d7badcad", + "logIndex": 0, + "blockHash": "0xdc89050a8f3aeb352fa2a3aaad1b0da8d3d4d69fcaef222bd3178e222cfe4f2d" + } + ], + "blockNumber": 18869283, + "cumulativeGasUsed": "2004865", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ClaimAaveRewardTokenToTreasury\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"WithdrawTreasuryFunds\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unrealizedYield\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryYieldPercent_e18\",\"type\":\"uint256\"}],\"name\":\"YieldDistributed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"aToken\",\"outputs\":[{\"internalType\":\"contract IERC20Upgradeable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"aaveIncentivesController\",\"outputs\":[{\"internalType\":\"contract IAaveIncentivesController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amountReservedInCaseOfInsufficientAaveLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimAaveRewardsToTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositPaymentToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"totalValueRealizedForMarket\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"treasuryYieldPercent_e18\",\"type\":\"uint256\"}],\"name\":\"distributeYieldForTreasuryAndReturnMarketAllocation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_treasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_paymentToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_aToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_lendingPoolAddressesProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_aaveIncentivesController\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_aaveReferralCode\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeForMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lendingPoolAddressesProvider\",\"outputs\":[{\"internalType\":\"contract ILendingPoolAddressesProvider\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paymentToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"removePaymentTokenFromMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalReservedForTreasury\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferPaymentTokensToUser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateLatestLendingPoolAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawTreasuryFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"https://docs.aave.com/portal/\",\"kind\":\"dev\",\"methods\":{\"claimAaveRewardsToTreasury()\":{\"details\":\"This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued\"},\"depositPaymentToken(uint256)\":{\"params\":{\"amount\":\"Amount of payment token to deposit\"}},\"distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)\":{\"details\":\"treasuryPercent = 1 - marketPercent\",\"params\":{\"totalValueRealizedForMarket\":\"total value of long and short side of the market\",\"treasuryYieldPercent_e18\":\"Percentage of yield in base 1e18 that is allocated to the treasury\"},\"returns\":{\"_0\":\"The market allocation of the yield\"}},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address,address,address,address,uint16,address)\":{\"details\":\"referral code will be set to 0, depricated Aave feature\",\"params\":{\"_aToken\":\"address of the interest accruing token linked to the payment token\",\"_aaveReferralCode\":\"unique code for aave referrals\",\"_admin\":\"admin for the contract\",\"_lendingPoolAddressesProvider\":\"address of the aave lending pool address provider contract\",\"_longShort\":\"address of the longShort contract\",\"_paymentToken\":\"address of the payment token\",\"_treasury\":\"address of the treasury contract\"}},\"removePaymentTokenFromMarket(uint256)\":{\"details\":\"This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave. This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.\",\"params\":{\"amount\":\"Amount of payment token to withdraw\"}},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"transferPaymentTokensToUser(address,uint256)\":{\"params\":{\"amount\":\"Amount of payment token to pay to user\",\"user\":\"User to recieve the payout\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"stateVariables\":{\"aToken\":{\"details\":\"ADAI token\"},\"amountReservedInCaseOfInsufficientAaveLiquidity\":{\"details\":\"This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal. In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available.\"},\"paymentToken\":{\"details\":\"DAI token\"},\"referralCode\":{\"details\":\"An aave specific referralCode that has been a depricated feature. This will be set to 0 for \\\"no referral\\\" at deployment\"}},\"title\":\"YieldManagerAave\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"aToken()\":{\"notice\":\"The token representing the interest accruing payment token position from Aave\"},\"aaveIncentivesController()\":{\"notice\":\"The specific Aave incentives controller contract\"},\"claimAaveRewardsToTreasury()\":{\"notice\":\"Allows for withdrawal of aave rewards to the treasury contract\"},\"depositPaymentToken(uint256)\":{\"notice\":\"Allows the LongShort contract to deposit tokens into the aave pool\"},\"distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)\":{\"notice\":\"Calculates and updates the yield allocation to the treasury and the market\"},\"initialize(address,address,address,address,address,address,uint16,address)\":{\"notice\":\"Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts\"},\"initializeForMarket()\":{\"notice\":\"Initializes a specific yield manager to a given market\"},\"isInitialized()\":{\"notice\":\"boolean to prevent markets using an already initialized market\"},\"lendingPoolAddressesProvider()\":{\"notice\":\"The specific Aave lending pool address provider contract\"},\"longShort()\":{\"notice\":\"address of longShort contract\"},\"paymentToken()\":{\"notice\":\"The payment token the yield manager supports\"},\"removePaymentTokenFromMarket(uint256)\":{\"notice\":\"Allows the LongShort contract to redeem aTokens for the payment token\"},\"totalReservedForTreasury()\":{\"notice\":\"distributed yield not yet transferred to the treasury\"},\"transferPaymentTokensToUser(address,uint256)\":{\"notice\":\"Allows the LongShort pay out a user from tokens already withdrawn from Aave\"},\"treasury()\":{\"notice\":\"address of treasury contract - this is the address that can claim aave incentives rewards\"},\"withdrawTreasuryFunds()\":{\"notice\":\"Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\"}},\"notice\":\"contract is used to manage the yield generated by the underlying tokens. YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol. Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that continuously accrues interest based on a lend/borrow liquidity ratio.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/YieldManagerAave.sol\":\"YieldManagerAave\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"contracts/YieldManagerAave.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\n\\nimport \\\"hardhat/console.sol\\\";\\n\\nimport \\\"./interfaces/IYieldManager.sol\\\";\\nimport \\\"./interfaces/aave/ILendingPool.sol\\\";\\nimport \\\"./interfaces/aave/ILendingPoolAddressesProvider.sol\\\";\\nimport \\\"./interfaces/aave/IAaveIncentivesController.sol\\\";\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\n/** @title YieldManagerAave\\n @notice contract is used to manage the yield generated by the underlying tokens.\\n YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol.\\n Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that\\n continuously accrues interest based on a lend/borrow liquidity ratio.\\n @dev https://docs.aave.com/portal/\\n */\\ncontract YieldManagerAave is IYieldManager, AccessControlledAndUpgradeable {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 VARIABLES \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice address of longShort contract\\n address public longShort;\\n /// @notice address of treasury contract - this is the address that can claim aave incentives rewards\\n address public treasury;\\n\\n /// @notice boolean to prevent markets using an already initialized market\\n bool public isInitialized;\\n\\n /// @notice The payment token the yield manager supports\\n /// @dev DAI token\\n IERC20 public paymentToken;\\n /// @notice The token representing the interest accruing payment token position from Aave\\n /// @dev ADAI token\\n IERC20Upgradeable public aToken;\\n /// @notice The specific Aave lending pool address provider contract\\n ILendingPoolAddressesProvider public lendingPoolAddressesProvider;\\n /// @notice The specific Aave incentives controller contract\\n IAaveIncentivesController public aaveIncentivesController;\\n\\n /// @dev An aave specific referralCode that has been a depricated feature. This will be set to 0 for \\\"no referral\\\" at deployment\\n uint16 referralCode;\\n\\n /// @notice distributed yield not yet transferred to the treasury\\n uint256 public override totalReservedForTreasury;\\n\\n /// @dev This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal.\\n /// In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available.\\n uint256 public amountReservedInCaseOfInsufficientAaveLiquidity;\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MODIFIERS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @dev only allow longShort contract to execute modified functions\\n modifier longShortOnly() {\\n require(msg.sender == longShort, \\\"Not longShort\\\");\\n _;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 CONTRACT SET-UP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts\\n @param _longShort address of the longShort contract\\n @param _treasury address of the treasury contract\\n @param _paymentToken address of the payment token\\n @param _aToken address of the interest accruing token linked to the payment token\\n @param _lendingPoolAddressesProvider address of the aave lending pool address provider contract\\n @param _aaveReferralCode unique code for aave referrals\\n @param _admin admin for the contract\\n @dev referral code will be set to 0, depricated Aave feature\\n */\\n function initialize(\\n address _longShort,\\n address _treasury,\\n address _paymentToken,\\n address _aToken,\\n address _lendingPoolAddressesProvider,\\n address _aaveIncentivesController,\\n uint16 _aaveReferralCode,\\n address _admin\\n ) external initializer {\\n require(\\n _longShort != address(0) &&\\n _treasury != address(0) &&\\n _paymentToken != address(0) &&\\n _aToken != address(0) &&\\n _lendingPoolAddressesProvider != address(0) &&\\n _aaveIncentivesController != address(0) &&\\n _admin != address(0)\\n );\\n\\n longShort = _longShort;\\n treasury = _treasury;\\n\\n _AccessControlledAndUpgradeable_init(_admin);\\n\\n referralCode = _aaveReferralCode;\\n\\n paymentToken = IERC20(_paymentToken);\\n aToken = IERC20Upgradeable(_aToken);\\n lendingPoolAddressesProvider = ILendingPoolAddressesProvider(_lendingPoolAddressesProvider);\\n aaveIncentivesController = IAaveIncentivesController(_aaveIncentivesController);\\n\\n // Approve tokens for aave lending pool maximally.\\n IERC20(_paymentToken).approve(\\n ILendingPoolAddressesProvider(_lendingPoolAddressesProvider).getLendingPool(),\\n type(uint256).max\\n );\\n }\\n\\n function updateLatestLendingPoolAddress() external {\\n IERC20(paymentToken).approve(lendingPoolAddressesProvider.getLendingPool(), type(uint256).max);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 IMPLEMENTATION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Allows the LongShort contract to deposit tokens into the aave pool\\n @param amount Amount of payment token to deposit\\n */\\n function depositPaymentToken(uint256 amount) external override longShortOnly {\\n // If amountReservedInCaseOfInsufficientAaveLiquidity isn't zero, then efficiently net the difference between the amount\\n // It basically always be zero besides extreme and unlikely situations with aave.\\n if (amountReservedInCaseOfInsufficientAaveLiquidity != 0) {\\n if (amountReservedInCaseOfInsufficientAaveLiquidity >= amount) {\\n amountReservedInCaseOfInsufficientAaveLiquidity -= amount;\\n // Return early, nothing to deposit into the lending pool\\n return;\\n } else {\\n amount -= amountReservedInCaseOfInsufficientAaveLiquidity;\\n amountReservedInCaseOfInsufficientAaveLiquidity = 0;\\n }\\n }\\n\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).deposit(\\n address(paymentToken),\\n amount,\\n address(this),\\n referralCode\\n );\\n }\\n\\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\\n /// @param user User to recieve the payout\\n /// @param amount Amount of payment token to pay to user\\n function transferPaymentTokensToUser(address user, uint256 amount)\\n external\\n override\\n longShortOnly\\n {\\n try paymentToken.transfer(user, amount) returns (bool transferSuccess) {\\n if (transferSuccess) {\\n // If the transfer is successful return early, otherwise try pay the user out with the amountReservedInCaseOfInsufficientAaveLiquidity\\n return;\\n }\\n } catch {}\\n\\n amountReservedInCaseOfInsufficientAaveLiquidity -= amount;\\n\\n // If this reverts (ie aave unable to make payout), then the whole transaction will revert. User will have to wait until sufficient liquidity available.\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\\n address(paymentToken),\\n amount,\\n user\\n );\\n }\\n\\n /// @notice Allows the LongShort contract to redeem aTokens for the payment token\\n /// @param amount Amount of payment token to withdraw\\n /// @dev This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave.\\n /// This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.\\n function removePaymentTokenFromMarket(uint256 amount) external override longShortOnly {\\n try\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\\n address(paymentToken),\\n amount,\\n address(this)\\n )\\n {} catch {\\n // In theory we should only catch `VL_CURRENT_AVAILABLE_LIQUIDITY_NOT_ENOUGH` errors.\\n // Safe to revert on all errors, if aave completely blocks withdrawals the amountReservedInCaseOfInsufficientAaveLiquidity can grow until it is fixed without problems.\\n amountReservedInCaseOfInsufficientAaveLiquidity += amount;\\n }\\n }\\n\\n /**\\n @notice Allows for withdrawal of aave rewards to the treasury contract\\n @dev This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued\\n */\\n function claimAaveRewardsToTreasury() external {\\n IAaveIncentivesController _aaveIncentivesController = IAaveIncentivesController(\\n aaveIncentivesController\\n );\\n uint256 amount = _aaveIncentivesController.getUserUnclaimedRewards(address(this));\\n\\n address[] memory aTokenAddresses = new address[](1);\\n aTokenAddresses[0] = address(aToken);\\n\\n _aaveIncentivesController.claimRewards(aTokenAddresses, amount, treasury);\\n\\n emit ClaimAaveRewardTokenToTreasury(amount);\\n }\\n\\n /**\\n @notice Calculates and updates the yield allocation to the treasury and the market\\n @dev treasuryPercent = 1 - marketPercent\\n @param totalValueRealizedForMarket total value of long and short side of the market\\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\\n @return The market allocation of the yield\\n */\\n function distributeYieldForTreasuryAndReturnMarketAllocation(\\n uint256 totalValueRealizedForMarket,\\n uint256 treasuryYieldPercent_e18\\n ) external override longShortOnly returns (uint256) {\\n uint256 totalHeld = aToken.balanceOf(address(this));\\n uint256 _totalReservedForTreasury = totalReservedForTreasury;\\n\\n uint256 totalRealized = totalValueRealizedForMarket +\\n _totalReservedForTreasury +\\n amountReservedInCaseOfInsufficientAaveLiquidity;\\n\\n if (totalRealized == totalHeld) {\\n return 0;\\n }\\n\\n // will revert in case totalRealized > totalHeld which should never occur since yield is always possitive with aave.\\n uint256 unrealizedYield = totalHeld - totalRealized;\\n\\n uint256 amountForTreasury = (unrealizedYield * treasuryYieldPercent_e18) / 1e18;\\n uint256 amountForMarketIncentives = unrealizedYield - amountForTreasury;\\n\\n totalReservedForTreasury = _totalReservedForTreasury + amountForTreasury;\\n\\n emit YieldDistributed(unrealizedYield, treasuryYieldPercent_e18);\\n\\n return amountForMarketIncentives;\\n }\\n\\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\\n function withdrawTreasuryFunds() external override {\\n uint256 amountToWithdrawForTreasury = totalReservedForTreasury;\\n totalReservedForTreasury = 0;\\n\\n // Redeem aToken for payment tokens.\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\\n address(paymentToken),\\n amountToWithdrawForTreasury,\\n treasury\\n );\\n\\n emit WithdrawTreasuryFunds();\\n }\\n\\n /// @notice Initializes a specific yield manager to a given market\\n function initializeForMarket() external override longShortOnly {\\n require(!isInitialized, \\\"Yield Manager is already in use\\\");\\n isInitialized = true;\\n }\\n}\\n\",\"keccak256\":\"0xd3a5c43ccb432cbffbbeed4df6a43898269be3869b9639d14a15db75d29531ce\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IYieldManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/// @notice Manages yield accumulation for the LongShort contract. Each market is deployed with its own yield manager to simplify the bookkeeping, as different markets may share a payment token and yield pool.\\nabstract contract IYieldManager {\\n event ClaimAaveRewardTokenToTreasury(uint256 amount);\\n\\n event YieldDistributed(uint256 unrealizedYield, uint256 treasuryYieldPercent_e18);\\n\\n /// @dev This is purely saving some gas, but the subgraph will know how much is due for the treasury at all times - no need to include in event.\\n event WithdrawTreasuryFunds();\\n\\n /// @notice distributed yield not yet transferred to the treasury\\n function totalReservedForTreasury() external virtual returns (uint256);\\n\\n /// @notice Deposits the given amount of payment tokens into this yield manager.\\n /// @param amount Amount of payment token to deposit\\n function depositPaymentToken(uint256 amount) external virtual;\\n\\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\\n /// @param user User to recieve the payout\\n /// @param amount Amount of payment token to pay to user\\n function transferPaymentTokensToUser(address user, uint256 amount) external virtual;\\n\\n /// @notice Withdraws the given amount of tokens from this yield manager.\\n /// @param amount Amount of payment token to withdraw\\n function removePaymentTokenFromMarket(uint256 amount) external virtual;\\n\\n /** \\n @notice Calculates and updates the yield allocation to the treasury and the market\\n @dev treasuryPercent = 1 - marketPercent\\n @param totalValueRealizedForMarket total value of long and short side of the market\\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\\n @return amountForMarketIncentives The market allocation of the yield\\n */\\n function distributeYieldForTreasuryAndReturnMarketAllocation(\\n uint256 totalValueRealizedForMarket,\\n uint256 treasuryYieldPercent_e18\\n ) external virtual returns (uint256 amountForMarketIncentives);\\n\\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\\n function withdrawTreasuryFunds() external virtual;\\n\\n /// @notice Initializes a specific yield manager to a given market\\n function initializeForMarket() external virtual;\\n}\\n\",\"keccak256\":\"0x20116e375d536c6ee7bec74d1ee5c1a552465a79fc8f1f2a9e2428078d3648f6\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/DataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\nlibrary DataTypes {\\n // refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.\\n struct ReserveData {\\n //stores the reserve configuration\\n ReserveConfigurationMap configuration;\\n //the liquidity index. Expressed in ray\\n uint128 liquidityIndex;\\n //variable borrow index. Expressed in ray\\n uint128 variableBorrowIndex;\\n //the current supply rate. Expressed in ray\\n uint128 currentLiquidityRate;\\n //the current variable borrow rate. Expressed in ray\\n uint128 currentVariableBorrowRate;\\n //the current stable borrow rate. Expressed in ray\\n uint128 currentStableBorrowRate;\\n uint40 lastUpdateTimestamp;\\n //tokens addresses\\n address aTokenAddress;\\n address stableDebtTokenAddress;\\n address variableDebtTokenAddress;\\n //address of the interest rate strategy\\n address interestRateStrategyAddress;\\n //the id of the reserve. Represents the position in the list of the active reserves\\n uint8 id;\\n }\\n\\n struct ReserveConfigurationMap {\\n //bit 0-15: LTV\\n //bit 16-31: Liq. threshold\\n //bit 32-47: Liq. bonus\\n //bit 48-55: Decimals\\n //bit 56: Reserve is active\\n //bit 57: reserve is frozen\\n //bit 58: borrowing is enabled\\n //bit 59: stable rate borrowing enabled\\n //bit 60-63: reserved\\n //bit 64-79: reserve factor\\n uint256 data;\\n }\\n\\n struct UserConfigurationMap {\\n uint256 data;\\n }\\n\\n enum InterestRateMode {\\n NONE,\\n STABLE,\\n VARIABLE\\n }\\n}\\n\",\"keccak256\":\"0xdfb8a94fa45a4d85eb7003871c10282ce4cbd709becb01a6cba988f6444fdbfd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/IAaveIncentivesController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\ninterface IAaveIncentivesController {\\n event RewardsClaimed(address indexed user, address indexed to, uint256 amount);\\n\\n function claimRewards(\\n address[] calldata assets,\\n uint256 amount,\\n address to\\n ) external returns (uint256);\\n\\n function getUserUnclaimedRewards(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xad57de8f82dee132c99314f6e7d80a003082aa7354671f09e45ed496fc56fc02\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/ILendingPool.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\nimport {ILendingPoolAddressesProvider} from \\\"./ILendingPoolAddressesProvider.sol\\\";\\nimport {DataTypes} from \\\"./DataTypes.sol\\\";\\n\\ninterface ILendingPool {\\n /**\\n * @dev Emitted on deposit()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address initiating the deposit\\n * @param onBehalfOf The beneficiary of the deposit, receiving the aTokens\\n * @param amount The amount deposited\\n * @param referral The referral code used\\n **/\\n event Deposit(\\n address indexed reserve,\\n address user,\\n address indexed onBehalfOf,\\n uint256 amount,\\n uint16 indexed referral\\n );\\n\\n /**\\n * @dev Emitted on withdraw()\\n * @param reserve The address of the underlyng asset being withdrawn\\n * @param user The address initiating the withdrawal, owner of aTokens\\n * @param to Address that will receive the underlying\\n * @param amount The amount to be withdrawn\\n **/\\n event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);\\n\\n /**\\n * @dev Emitted on borrow() and flashLoan() when debt needs to be opened\\n * @param reserve The address of the underlying asset being borrowed\\n * @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just\\n * initiator of the transaction on flashLoan()\\n * @param onBehalfOf The address that will be getting the debt\\n * @param amount The amount borrowed out\\n * @param borrowRateMode The rate mode: 1 for Stable, 2 for Variable\\n * @param borrowRate The numeric rate at which the user has borrowed\\n * @param referral The referral code used\\n **/\\n event Borrow(\\n address indexed reserve,\\n address user,\\n address indexed onBehalfOf,\\n uint256 amount,\\n uint256 borrowRateMode,\\n uint256 borrowRate,\\n uint16 indexed referral\\n );\\n\\n /**\\n * @dev Emitted on repay()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The beneficiary of the repayment, getting his debt reduced\\n * @param repayer The address of the user initiating the repay(), providing the funds\\n * @param amount The amount repaid\\n **/\\n event Repay(\\n address indexed reserve,\\n address indexed user,\\n address indexed repayer,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Emitted on swapBorrowRateMode()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user swapping his rate mode\\n * @param rateMode The rate mode that the user wants to swap to\\n **/\\n event Swap(address indexed reserve, address indexed user, uint256 rateMode);\\n\\n /**\\n * @dev Emitted on setUserUseReserveAsCollateral()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user enabling the usage as collateral\\n **/\\n event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on setUserUseReserveAsCollateral()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user enabling the usage as collateral\\n **/\\n event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on rebalanceStableBorrowRate()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user for which the rebalance has been executed\\n **/\\n event RebalanceStableBorrowRate(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on flashLoan()\\n * @param target The address of the flash loan receiver contract\\n * @param initiator The address initiating the flash loan\\n * @param asset The address of the asset being flash borrowed\\n * @param amount The amount flash borrowed\\n * @param premium The fee flash borrowed\\n * @param referralCode The referral code used\\n **/\\n event FlashLoan(\\n address indexed target,\\n address indexed initiator,\\n address indexed asset,\\n uint256 amount,\\n uint256 premium,\\n uint16 referralCode\\n );\\n\\n /**\\n * @dev Emitted when the pause is triggered.\\n */\\n event Paused();\\n\\n /**\\n * @dev Emitted when the pause is lifted.\\n */\\n event Unpaused();\\n\\n /**\\n * @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via\\n * LendingPoolCollateral manager using a DELEGATECALL\\n * This allows to have the events in the generated ABI for LendingPool.\\n * @param collateralAsset The address of the underlying asset used as collateral,\\n * to receive as result of the liquidation.\\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\\n * @param user The address of the borrower getting liquidated\\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\\n * @param liquidatedCollateralAmount The amount of collateral received by the liiquidator\\n * @param liquidator The address of the liquidator\\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\\n * to receive the underlying collateral asset directly\\n **/\\n event LiquidationCall(\\n address indexed collateralAsset,\\n address indexed debtAsset,\\n address indexed user,\\n uint256 debtToCover,\\n uint256 liquidatedCollateralAmount,\\n address liquidator,\\n bool receiveAToken\\n );\\n\\n /**\\n * @dev Emitted when the state of a reserve is updated. NOTE: This event is actually declared\\n * in the ReserveLogic library and emitted in the updateInterestRates() function. Since the function is internal,\\n * the event will actually be fired by the LendingPool contract. The event is therefore replicated here so it\\n * gets added to the LendingPool ABI\\n * @param reserve The address of the underlying asset of the reserve\\n * @param liquidityRate The new liquidity rate\\n * @param stableBorrowRate The new stable borrow rate\\n * @param variableBorrowRate The new variable borrow rate\\n * @param liquidityIndex The new liquidity index\\n * @param variableBorrowIndex The new variable borrow index\\n **/\\n event ReserveDataUpdated(\\n address indexed reserve,\\n uint256 liquidityRate,\\n uint256 stableBorrowRate,\\n uint256 variableBorrowRate,\\n uint256 liquidityIndex,\\n uint256 variableBorrowIndex\\n );\\n\\n /**\\n * @dev Deposits an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\\n * - E.g. User deposits 100 USDC and gets in return 100 aUSDC\\n * @param asset The address of the underlying asset to deposit\\n * @param amount The amount to be deposited\\n * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\\n * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\\n * is a different wallet\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n **/\\n function deposit(\\n address asset,\\n uint256 amount,\\n address onBehalfOf,\\n uint16 referralCode\\n ) external;\\n\\n /**\\n * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned\\n * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC\\n * @param asset The address of the underlying asset to withdraw\\n * @param amount The underlying amount to be withdrawn\\n * - Send the value type(uint256).max in order to withdraw the whole aToken balance\\n * @param to Address that will receive the underlying, same as msg.sender if the user\\n * wants to receive it on his own wallet, or a different address if the beneficiary is a\\n * different wallet\\n * @return The final amount withdrawn\\n **/\\n function withdraw(\\n address asset,\\n uint256 amount,\\n address to\\n ) external returns (uint256);\\n\\n /**\\n * @dev Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower\\n * already deposited enough collateral, or he was given enough allowance by a credit delegator on the\\n * corresponding debt token (StableDebtToken or VariableDebtToken)\\n * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet\\n * and 100 stable/variable debt tokens, depending on the `interestRateMode`\\n * @param asset The address of the underlying asset to borrow\\n * @param amount The amount to be borrowed\\n * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n * @param onBehalfOf Address of the user who will receive the debt. Should be the address of the borrower itself\\n * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator\\n * if he has been given credit delegation allowance\\n **/\\n function borrow(\\n address asset,\\n uint256 amount,\\n uint256 interestRateMode,\\n uint16 referralCode,\\n address onBehalfOf\\n ) external;\\n\\n /**\\n * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned\\n * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address\\n * @param asset The address of the borrowed underlying asset previously borrowed\\n * @param amount The amount to repay\\n * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\\n * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable\\n * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the\\n * user calling the function if he wants to reduce/remove his own debt, or the address of any other\\n * other borrower whose debt should be removed\\n * @return The final amount repaid\\n **/\\n function repay(\\n address asset,\\n uint256 amount,\\n uint256 rateMode,\\n address onBehalfOf\\n ) external returns (uint256);\\n\\n /**\\n * @dev Allows a borrower to swap his debt between stable and variable mode, or viceversa\\n * @param asset The address of the underlying asset borrowed\\n * @param rateMode The rate mode that the user wants to swap to\\n **/\\n function swapBorrowRateMode(address asset, uint256 rateMode) external;\\n\\n /**\\n * @dev Rebalances the stable interest rate of a user to the current stable rate defined on the reserve.\\n * - Users can be rebalanced if the following conditions are satisfied:\\n * 1. Usage ratio is above 95%\\n * 2. the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate,\\n * which means that too much has been borrowed at a stable rate and depositors are not earning enough\\n * @param asset The address of the underlying asset borrowed\\n * @param user The address of the user to be rebalanced\\n **/\\n function rebalanceStableBorrowRate(address asset, address user) external;\\n\\n /**\\n * @dev Allows depositors to enable/disable a specific deposited asset as collateral\\n * @param asset The address of the underlying asset deposited\\n * @param useAsCollateral `true` if the user wants to use the deposit as collateral, `false` otherwise\\n **/\\n function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external;\\n\\n /**\\n * @dev Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1\\n * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives\\n * a proportionally amount of the `collateralAsset` plus a bonus to cover market risk\\n * @param collateralAsset The address of the underlying asset used as collateral,\\n * to receive as result of the liquidation.\\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\\n * @param user The address of the borrower getting liquidated\\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\\n * to receive the underlying collateral asset directly\\n **/\\n function liquidationCall(\\n address collateralAsset,\\n address debtAsset,\\n address user,\\n uint256 debtToCover,\\n bool receiveAToken\\n ) external;\\n\\n /**\\n * @dev Allows smartcontracts to access the liquidity of the pool within one transaction,\\n * as long as the amount taken plus a fee is returned.\\n * IMPORTANT There are security concerns for developers of flashloan receiver\\n * contracts that must be kept into consideration.\\n * For further details please visit https://developers.aave.com\\n * @param receiverAddress The address of the contract receiving the funds,\\n * implementing the IFlashLoanReceiver interface.\\n * @param assets The addresses of the assets being flash-borrowed\\n * @param amounts The amounts amounts being flash-borrowed\\n * @param modes Types of the debt to open if the flash loan is not returned:\\n * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver\\n * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\\n * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\\n * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2\\n * @param params Variadic packed params to pass to the receiver as extra information\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n **/\\n function flashLoan(\\n address receiverAddress,\\n address[] calldata assets,\\n uint256[] calldata amounts,\\n uint256[] calldata modes,\\n address onBehalfOf,\\n bytes calldata params,\\n uint16 referralCode\\n ) external;\\n\\n /**\\n * @dev Returns the user account data across all the reserves\\n * @param user The address of the user\\n * @return totalCollateralETH the total collateral in ETH of the user\\n * @return totalDebtETH the total debt in ETH of the user\\n * @return availableBorrowsETH the borrowing power left of the user\\n * @return currentLiquidationThreshold the liquidation threshold of the user\\n * @return ltv the loan to value of the user\\n * @return healthFactor the current health factor of the user\\n **/\\n function getUserAccountData(address user)\\n external\\n view\\n returns (\\n uint256 totalCollateralETH,\\n uint256 totalDebtETH,\\n uint256 availableBorrowsETH,\\n uint256 currentLiquidationThreshold,\\n uint256 ltv,\\n uint256 healthFactor\\n );\\n\\n function initReserve(\\n address reserve,\\n address aTokenAddress,\\n address stableDebtAddress,\\n address variableDebtAddress,\\n address interestRateStrategyAddress\\n ) external;\\n\\n function setReserveInterestRateStrategyAddress(address reserve, address rateStrategyAddress)\\n external;\\n\\n function setConfiguration(address reserve, uint256 configuration) external;\\n\\n /**\\n * @dev Returns the configuration of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The configuration of the reserve\\n **/\\n function getConfiguration(address asset)\\n external\\n view\\n returns (DataTypes.ReserveConfigurationMap memory);\\n\\n /**\\n * @dev Returns the configuration of the user across all the reserves\\n * @param user The user address\\n * @return The configuration of the user\\n **/\\n function getUserConfiguration(address user)\\n external\\n view\\n returns (DataTypes.UserConfigurationMap memory);\\n\\n /**\\n * @dev Returns the normalized income normalized income of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The reserve's normalized income\\n */\\n function getReserveNormalizedIncome(address asset) external view returns (uint256);\\n\\n /**\\n * @dev Returns the normalized variable debt per unit of asset\\n * @param asset The address of the underlying asset of the reserve\\n * @return The reserve normalized variable debt\\n */\\n function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);\\n\\n /**\\n * @dev Returns the state and configuration of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The state of the reserve\\n **/\\n function getReserveData(address asset) external view returns (DataTypes.ReserveData memory);\\n\\n function finalizeTransfer(\\n address asset,\\n address from,\\n address to,\\n uint256 amount,\\n uint256 balanceFromAfter,\\n uint256 balanceToBefore\\n ) external;\\n\\n function getReservesList() external view returns (address[] memory);\\n\\n function getAddressesProvider() external view returns (ILendingPoolAddressesProvider);\\n\\n function setPause(bool val) external;\\n\\n function paused() external view returns (bool);\\n}\\n\",\"keccak256\":\"0xdf61949ab12c334f8ae028eafec802ef963fa96c9107309a178e5c7a46b1de37\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/ILendingPoolAddressesProvider.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\n/**\\n * @title LendingPoolAddressesProvider contract\\n * @dev Main registry of addresses part of or connected to the protocol, including permissioned roles\\n * - Acting also as factory of proxies and admin of those, so with right to change its implementations\\n * - Owned by the Aave Governance\\n * @author Aave\\n **/\\ninterface ILendingPoolAddressesProvider {\\n // event MarketIdSet(string newMarketId);\\n // event LendingPoolUpdated(address indexed newAddress);\\n // event ConfigurationAdminUpdated(address indexed newAddress);\\n // event EmergencyAdminUpdated(address indexed newAddress);\\n // event LendingPoolConfiguratorUpdated(address indexed newAddress);\\n // event LendingPoolCollateralManagerUpdated(address indexed newAddress);\\n // event PriceOracleUpdated(address indexed newAddress);\\n // event LendingRateOracleUpdated(address indexed newAddress);\\n // event ProxyCreated(bytes32 id, address indexed newAddress);\\n // event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy);\\n\\n // function getMarketId() external view returns (string memory);\\n\\n // function setMarketId(string calldata marketId) external;\\n\\n // function setAddress(bytes32 id, address newAddress) external;\\n\\n // function setAddressAsProxy(bytes32 id, address impl) external;\\n\\n // function getAddress(bytes32 id) external view returns (address);\\n\\n function getLendingPool() external view returns (address);\\n\\n // function setLendingPoolImpl(address pool) external;\\n\\n // function getLendingPoolConfigurator() external view returns (address);\\n\\n // function setLendingPoolConfiguratorImpl(address configurator) external;\\n\\n // function getLendingPoolCollateralManager() external view returns (address);\\n\\n // function setLendingPoolCollateralManager(address manager) external;\\n\\n // function getPoolAdmin() external view returns (address);\\n\\n // function setPoolAdmin(address admin) external;\\n\\n // function getEmergencyAdmin() external view returns (address);\\n\\n // function setEmergencyAdmin(address admin) external;\\n\\n // function getPriceOracle() external view returns (address);\\n\\n // function setPriceOracle(address priceOracle) external;\\n\\n // function getLendingRateOracle() external view returns (address);\\n\\n // function setLendingRateOracle(address lendingRateOracle) external;\\n}\\n\",\"keccak256\":\"0x706ba21943e504614721ec3a797cfac48edf00cb4c705c4522616f76d3306ff7\",\"license\":\"BUSL-1.1\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061234f806100206000396000f3fe6080604052600436106101c25760003560e01c80634f1ef286116100f757806391d1485411610095578063d547741f11610064578063d547741f146104ff578063eb6bffa21461051f578063edf565cc1461053f578063f72c0d8b14610554576101c2565b806391d148541461048a578063a0c1f15e146104aa578063a217fddf146104ca578063bba00ba5146104df576101c2565b806361d027b3116100d157806361d027b3146103f657806375b238fc146104165780638a5599b21461044a5780639063ee201461046a576101c2565b80634f1ef286146103a25780635d3a3890146103b55780635f2475ca146103d5576101c2565b80632f2ff15d1161016457806336568abe1161013e57806336568abe1461032c5780633659cfe61461034c578063392e53cd1461036c578063447479db1461038d576101c2565b80632f2ff15d146102d75780633013ce29146102f757806334944bb014610317576101c2565b80632429e535116101a05780632429e53514610233578063248a9ca31461025857806329949872146102885780632ae320cb146102c0576101c2565b806301ffc9a7146101c757806315429969146101fc5780631c499b5514610213575b600080fd5b3480156101d357600080fd5b506101e76101e2366004611ffe565b610588565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b506102116105bf565b005b34801561021f57600080fd5b5061021161022e366004611fb7565b6106ca565b34801561023f57600080fd5b5061024a6101015481565b6040519081526020016101f3565b34801561026457600080fd5b5061024a610273366004611fb7565b60009081526065602052604090206001015490565b34801561029457600080fd5b5060fb546102a8906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b3480156102cc57600080fd5b5061024a6101025481565b3480156102e357600080fd5b506102116102f2366004611fcf565b61082c565b34801561030357600080fd5b5060fd546102a8906001600160a01b031681565b34801561032357600080fd5b50610211610858565b34801561033857600080fd5b50610211610347366004611fcf565b6109fa565b34801561035857600080fd5b50610211610367366004611dc7565b610a74565b34801561037857600080fd5b5060fc546101e790600160a01b900460ff1681565b34801561039957600080fd5b50610211610a98565b6102116103b0366004611ead565b610bdc565b3480156103c157600080fd5b506102116103d0366004611dff565b610bf1565b3480156103e157600080fd5b50610100546102a8906001600160a01b031681565b34801561040257600080fd5b5060fc546102a8906001600160a01b031681565b34801561042257600080fd5b5061024a7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561045657600080fd5b5061024a61046536600461203e565b610e88565b34801561047657600080fd5b50610211610485366004611fb7565b610ffa565b34801561049657600080fd5b506101e76104a5366004611fcf565b61116a565b3480156104b657600080fd5b5060fe546102a8906001600160a01b031681565b3480156104d657600080fd5b5061024a600081565b3480156104eb57600080fd5b5060ff546102a8906001600160a01b031681565b34801561050b57600080fd5b5061021161051a366004611fcf565b611195565b34801561052b57600080fd5b5061021161053a366004611f6c565b6111bb565b34801561054b57600080fd5b5061021161139c565b34801561056057600080fd5b5061024a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806105b957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60fd5460ff5460408051630261bf8b60e01b815290516001600160a01b039384169363095ea7b3931691630261bf8b916004808301926020929190829003018186803b15801561060e57600080fd5b505afa158015610622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106469190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611f97565b50565b60fb546001600160a01b031633146106fd5760405162461bcd60e51b81526004016106f490612187565b60405180910390fd5b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561074b57600080fd5b505afa15801561075f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107839190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018490523060448201529116906369328dec90606401602060405180830381600087803b1580156107d657600080fd5b505af1925050508015610806575060408051601f3d908101601f1916820190925261080391810190612026565b60015b6108285780610102600082825461081d91906121fc565b909155506106c79050565b5050565b60008281526065602052604090206001015461084981335b611435565b6108538383611499565b505050565b61010054604051630cc7d40f60e11b81523060048201526001600160a01b0390911690600090829063198fa81e9060240160206040518083038186803b1580156108a157600080fd5b505afa1580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190612026565b6040805160018082528183019092529192506000919060208083019080368337505060fe5482519293506001600160a01b03169183915060009061092d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260fc54604051633111e7b360e01b815285831692633111e7b39261096f928692889216906004016120f0565b602060405180830381600087803b15801561098957600080fd5b505af115801561099d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c19190612026565b506040518281527fbdeb6031c2eac1ba6d1bd54a501b8942cf452ed6eb9f9a58512591a1faea22a49060200160405180910390a1505050565b6001600160a01b0381163314610a6a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106f4565b610828828261151f565b610a7d81611586565b6106c7816040518060200160405280600081525060006115b1565b6101018054600090915560ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b158015610ae757600080fd5b505afa158015610afb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1f9190611de3565b60fd5460fc54604051631a4ca37b60e21b81526001600160a01b0392831660048201526024810185905290821660448201529116906369328dec90606401602060405180830381600087803b158015610b7757600080fd5b505af1158015610b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610baf9190612026565b506040517f5b1d5b57337c7653ccd178787bc6e5aa6f8a6ee09b781e7a624d776e69d044cb90600090a150565b610be582611586565b610828828260016115b1565b600054610100900460ff1680610c0a575060005460ff16155b610c265760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015610c48576000805461ffff19166101011790555b6001600160a01b03891615801590610c6857506001600160a01b03881615155b8015610c7c57506001600160a01b03871615155b8015610c9057506001600160a01b03861615155b8015610ca457506001600160a01b03851615155b8015610cb857506001600160a01b03841615155b8015610ccc57506001600160a01b03821615155b610cd557600080fd5b60fb80546001600160a01b03808c166001600160a01b03199283161790925560fc8054928b1692909116919091179055610d0e82611732565b610100805460fd80546001600160a01b03808c166001600160a01b0319928316811790935560fe80548c831690841617905560ff80548b8316908416811790915590891661ffff8916600160a01b02929092166001600160b01b0319909416939093171790925560408051630261bf8b60e01b8152905163095ea7b39291630261bf8b916004808301926020929190829003018186803b158015610db157600080fd5b505afa158015610dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de99190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b158015610e3257600080fd5b505af1158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611f97565b508015610e7d576000805461ff00191690555b505050505050505050565b60fb546000906001600160a01b03163314610eb55760405162461bcd60e51b81526004016106f490612187565b60fe546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610ef957600080fd5b505afa158015610f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f319190612026565b610101546101025491925090600090610f4a83886121fc565b610f5491906121fc565b905082811415610f6a57600093505050506105b9565b6000610f768285612253565b90506000670de0b6b3a7640000610f8d8884612234565b610f979190612214565b90506000610fa58284612253565b9050610fb182866121fc565b6101015560408051848152602081018a90527ffe4996cd48c364c468cee70dd6b9061874ff01b05c5ea49311cbcabd9b9cb615910160405180910390a198975050505050505050565b60fb546001600160a01b031633146110245760405162461bcd60e51b81526004016106f490612187565b61010254156110615780610102541061104a5780610102600082825461081d9190612253565b610102546110589082612253565b60006101025590505b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110af57600080fd5b505afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190611de3565b60fd546101005460405163e8eda9df60e01b81526001600160a01b03928316600482015260248101859052306044820152600160a01b90910461ffff16606482015291169063e8eda9df90608401600060405180830381600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b5050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152606560205260409020600101546111b18133610844565b610853838361151f565b60fb546001600160a01b031633146111e55760405162461bcd60e51b81526004016106f490612187565b60fd5460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561123357600080fd5b505af1925050508015611263575060408051601f3d908101601f1916820190925261126091810190611f97565b60015b61126c5761127a565b80156112785750610828565b505b80610102600082825461128d9190612253565b909155505060ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b1580156112d757600080fd5b505afa1580156112eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130f9190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b0391821660048201526024810184905284821660448201529116906369328dec90606401602060405180830381600087803b15801561136457600080fd5b505af1158015611378573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190612026565b60fb546001600160a01b031633146113c65760405162461bcd60e51b81526004016106f490612187565b60fc54600160a01b900460ff16156114205760405162461bcd60e51b815260206004820152601f60248201527f5969656c64204d616e6167657220697320616c726561647920696e207573650060448201526064016106f4565b60fc805460ff60a01b1916600160a01b179055565b61143f828261116a565b61082857611457816001600160a01b031660146117b7565b6114628360206117b7565b60405160200161147392919061207b565b60408051601f198184030181529082905262461bcd60e51b82526106f491600401612154565b6114a3828261116a565b6108285760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556114db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611529828261116a565b156108285760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108288133610844565b60006115e47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506115ef846119a0565b6000835111806115fc5750815b1561160d5761160b8484611a45565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661116357805460ff191660011781556040516001600160a01b038316602482015261168c90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611a45565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146117295760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016106f4565b61116385611b30565b600054610100900460ff168061174b575060005460ff16155b6117675760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611789576000805461ffff19166101011790555b611791611b70565b611799611bf3565b6117a282611c51565b8015610828576000805461ff00191690555050565b606060006117c6836002612234565b6117d19060026121fc565b67ffffffffffffffff8111156117f757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611821576020820181803683370190505b509050600360fc1b8160008151811061184a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061188757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006118ab846002612234565b6118b69060016121fc565b90505b600181111561194a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106118f857634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061191c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936119438161229a565b90506118b9565b5083156119995760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106f4565b9392505050565b803b611a045760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016106f4565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611aa45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016106f4565b600080846001600160a01b031684604051611abf919061205f565b600060405180830381855af49150503d8060008114611afa576040519150601f19603f3d011682016040523d82523d6000602084013e611aff565b606091505b5091509150611b2782826040518060600160405280602781526020016122f360279139611d1a565b95945050505050565b611b39816119a0565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611b89575060005460ff16155b611ba55760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bc7576000805461ffff19166101011790555b611bcf611d53565b611bd7611d53565b611bdf611d53565b80156106c7576000805461ff001916905550565b600054610100900460ff1680611c0c575060005460ff16155b611c285760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bcf576000805461ffff1916610101179055611bd7611d53565b600054610100900460ff1680611c6a575060005460ff16155b611c865760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611ca8576000805461ffff19166101011790555b6001600160a01b038216611cbb57600080fd5b611cc6600083611dbd565b611cf07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583611dbd565b6117a27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383611dbd565b60608315611d29575081611999565b825115611d395782518084602001fd5b8160405162461bcd60e51b81526004016106f49190612154565b600054610100900460ff1680611d6c575060005460ff16155b611d885760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bdf576000805461ffff191661010117905580156106c7576000805461ff001916905550565b6108288282611499565b600060208284031215611dd8578081fd5b8135611999816122dd565b600060208284031215611df4578081fd5b8151611999816122dd565b600080600080600080600080610100898b031215611e1b578384fd5b8835611e26816122dd565b97506020890135611e36816122dd565b96506040890135611e46816122dd565b95506060890135611e56816122dd565b94506080890135611e66816122dd565b935060a0890135611e76816122dd565b925060c089013561ffff81168114611e8c578283fd5b915060e0890135611e9c816122dd565b809150509295985092959890939650565b60008060408385031215611ebf578182fd5b8235611eca816122dd565b9150602083013567ffffffffffffffff80821115611ee6578283fd5b818501915085601f830112611ef9578283fd5b813581811115611f0b57611f0b6122c7565b604051601f8201601f19908116603f01168101908382118183101715611f3357611f336122c7565b81604052828152886020848701011115611f4b578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215611f7e578182fd5b8235611f89816122dd565b946020939093013593505050565b600060208284031215611fa8578081fd5b81518015158114611999578182fd5b600060208284031215611fc8578081fd5b5035919050565b60008060408385031215611fe1578182fd5b823591506020830135611ff3816122dd565b809150509250929050565b60006020828403121561200f578081fd5b81356001600160e01b031981168114611999578182fd5b600060208284031215612037578081fd5b5051919050565b60008060408385031215612050578182fd5b50508035926020909101359150565b6000825161207181846020870161226a565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516120b381601785016020880161226a565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120e481602884016020880161226a565b01602801949350505050565b606080825284519082018190526000906020906080840190828801845b828110156121325781516001600160a01b03168452928401929084019060010161210d565b50505090830194909452506001600160a01b0391909116604090910152919050565b600060208252825180602084015261217381604085016020870161226a565b601f01601f19169190910160400192915050565b6020808252600d908201526c139bdd081b1bdb99d4da1bdc9d609a1b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561220f5761220f6122b1565b500190565b60008261222f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561224e5761224e6122b1565b500290565b600082821015612265576122656122b1565b500390565b60005b8381101561228557818101518382015260200161226d565b83811115612294576000848401525b50505050565b6000816122a9576122a96122b1565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146106c757600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122061c70aab4ceb80431078b3b8a133042e3380167471ee409f8beb381cd0e586b464736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c80634f1ef286116100f757806391d1485411610095578063d547741f11610064578063d547741f146104ff578063eb6bffa21461051f578063edf565cc1461053f578063f72c0d8b14610554576101c2565b806391d148541461048a578063a0c1f15e146104aa578063a217fddf146104ca578063bba00ba5146104df576101c2565b806361d027b3116100d157806361d027b3146103f657806375b238fc146104165780638a5599b21461044a5780639063ee201461046a576101c2565b80634f1ef286146103a25780635d3a3890146103b55780635f2475ca146103d5576101c2565b80632f2ff15d1161016457806336568abe1161013e57806336568abe1461032c5780633659cfe61461034c578063392e53cd1461036c578063447479db1461038d576101c2565b80632f2ff15d146102d75780633013ce29146102f757806334944bb014610317576101c2565b80632429e535116101a05780632429e53514610233578063248a9ca31461025857806329949872146102885780632ae320cb146102c0576101c2565b806301ffc9a7146101c757806315429969146101fc5780631c499b5514610213575b600080fd5b3480156101d357600080fd5b506101e76101e2366004611ffe565b610588565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b506102116105bf565b005b34801561021f57600080fd5b5061021161022e366004611fb7565b6106ca565b34801561023f57600080fd5b5061024a6101015481565b6040519081526020016101f3565b34801561026457600080fd5b5061024a610273366004611fb7565b60009081526065602052604090206001015490565b34801561029457600080fd5b5060fb546102a8906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b3480156102cc57600080fd5b5061024a6101025481565b3480156102e357600080fd5b506102116102f2366004611fcf565b61082c565b34801561030357600080fd5b5060fd546102a8906001600160a01b031681565b34801561032357600080fd5b50610211610858565b34801561033857600080fd5b50610211610347366004611fcf565b6109fa565b34801561035857600080fd5b50610211610367366004611dc7565b610a74565b34801561037857600080fd5b5060fc546101e790600160a01b900460ff1681565b34801561039957600080fd5b50610211610a98565b6102116103b0366004611ead565b610bdc565b3480156103c157600080fd5b506102116103d0366004611dff565b610bf1565b3480156103e157600080fd5b50610100546102a8906001600160a01b031681565b34801561040257600080fd5b5060fc546102a8906001600160a01b031681565b34801561042257600080fd5b5061024a7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561045657600080fd5b5061024a61046536600461203e565b610e88565b34801561047657600080fd5b50610211610485366004611fb7565b610ffa565b34801561049657600080fd5b506101e76104a5366004611fcf565b61116a565b3480156104b657600080fd5b5060fe546102a8906001600160a01b031681565b3480156104d657600080fd5b5061024a600081565b3480156104eb57600080fd5b5060ff546102a8906001600160a01b031681565b34801561050b57600080fd5b5061021161051a366004611fcf565b611195565b34801561052b57600080fd5b5061021161053a366004611f6c565b6111bb565b34801561054b57600080fd5b5061021161139c565b34801561056057600080fd5b5061024a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806105b957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60fd5460ff5460408051630261bf8b60e01b815290516001600160a01b039384169363095ea7b3931691630261bf8b916004808301926020929190829003018186803b15801561060e57600080fd5b505afa158015610622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106469190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611f97565b50565b60fb546001600160a01b031633146106fd5760405162461bcd60e51b81526004016106f490612187565b60405180910390fd5b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561074b57600080fd5b505afa15801561075f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107839190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018490523060448201529116906369328dec90606401602060405180830381600087803b1580156107d657600080fd5b505af1925050508015610806575060408051601f3d908101601f1916820190925261080391810190612026565b60015b6108285780610102600082825461081d91906121fc565b909155506106c79050565b5050565b60008281526065602052604090206001015461084981335b611435565b6108538383611499565b505050565b61010054604051630cc7d40f60e11b81523060048201526001600160a01b0390911690600090829063198fa81e9060240160206040518083038186803b1580156108a157600080fd5b505afa1580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190612026565b6040805160018082528183019092529192506000919060208083019080368337505060fe5482519293506001600160a01b03169183915060009061092d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260fc54604051633111e7b360e01b815285831692633111e7b39261096f928692889216906004016120f0565b602060405180830381600087803b15801561098957600080fd5b505af115801561099d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c19190612026565b506040518281527fbdeb6031c2eac1ba6d1bd54a501b8942cf452ed6eb9f9a58512591a1faea22a49060200160405180910390a1505050565b6001600160a01b0381163314610a6a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106f4565b610828828261151f565b610a7d81611586565b6106c7816040518060200160405280600081525060006115b1565b6101018054600090915560ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b158015610ae757600080fd5b505afa158015610afb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1f9190611de3565b60fd5460fc54604051631a4ca37b60e21b81526001600160a01b0392831660048201526024810185905290821660448201529116906369328dec90606401602060405180830381600087803b158015610b7757600080fd5b505af1158015610b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610baf9190612026565b506040517f5b1d5b57337c7653ccd178787bc6e5aa6f8a6ee09b781e7a624d776e69d044cb90600090a150565b610be582611586565b610828828260016115b1565b600054610100900460ff1680610c0a575060005460ff16155b610c265760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015610c48576000805461ffff19166101011790555b6001600160a01b03891615801590610c6857506001600160a01b03881615155b8015610c7c57506001600160a01b03871615155b8015610c9057506001600160a01b03861615155b8015610ca457506001600160a01b03851615155b8015610cb857506001600160a01b03841615155b8015610ccc57506001600160a01b03821615155b610cd557600080fd5b60fb80546001600160a01b03808c166001600160a01b03199283161790925560fc8054928b1692909116919091179055610d0e82611732565b610100805460fd80546001600160a01b03808c166001600160a01b0319928316811790935560fe80548c831690841617905560ff80548b8316908416811790915590891661ffff8916600160a01b02929092166001600160b01b0319909416939093171790925560408051630261bf8b60e01b8152905163095ea7b39291630261bf8b916004808301926020929190829003018186803b158015610db157600080fd5b505afa158015610dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de99190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b158015610e3257600080fd5b505af1158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611f97565b508015610e7d576000805461ff00191690555b505050505050505050565b60fb546000906001600160a01b03163314610eb55760405162461bcd60e51b81526004016106f490612187565b60fe546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610ef957600080fd5b505afa158015610f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f319190612026565b610101546101025491925090600090610f4a83886121fc565b610f5491906121fc565b905082811415610f6a57600093505050506105b9565b6000610f768285612253565b90506000670de0b6b3a7640000610f8d8884612234565b610f979190612214565b90506000610fa58284612253565b9050610fb182866121fc565b6101015560408051848152602081018a90527ffe4996cd48c364c468cee70dd6b9061874ff01b05c5ea49311cbcabd9b9cb615910160405180910390a198975050505050505050565b60fb546001600160a01b031633146110245760405162461bcd60e51b81526004016106f490612187565b61010254156110615780610102541061104a5780610102600082825461081d9190612253565b610102546110589082612253565b60006101025590505b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110af57600080fd5b505afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190611de3565b60fd546101005460405163e8eda9df60e01b81526001600160a01b03928316600482015260248101859052306044820152600160a01b90910461ffff16606482015291169063e8eda9df90608401600060405180830381600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b5050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152606560205260409020600101546111b18133610844565b610853838361151f565b60fb546001600160a01b031633146111e55760405162461bcd60e51b81526004016106f490612187565b60fd5460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561123357600080fd5b505af1925050508015611263575060408051601f3d908101601f1916820190925261126091810190611f97565b60015b61126c5761127a565b80156112785750610828565b505b80610102600082825461128d9190612253565b909155505060ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b1580156112d757600080fd5b505afa1580156112eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130f9190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b0391821660048201526024810184905284821660448201529116906369328dec90606401602060405180830381600087803b15801561136457600080fd5b505af1158015611378573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190612026565b60fb546001600160a01b031633146113c65760405162461bcd60e51b81526004016106f490612187565b60fc54600160a01b900460ff16156114205760405162461bcd60e51b815260206004820152601f60248201527f5969656c64204d616e6167657220697320616c726561647920696e207573650060448201526064016106f4565b60fc805460ff60a01b1916600160a01b179055565b61143f828261116a565b61082857611457816001600160a01b031660146117b7565b6114628360206117b7565b60405160200161147392919061207b565b60408051601f198184030181529082905262461bcd60e51b82526106f491600401612154565b6114a3828261116a565b6108285760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556114db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611529828261116a565b156108285760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108288133610844565b60006115e47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506115ef846119a0565b6000835111806115fc5750815b1561160d5761160b8484611a45565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661116357805460ff191660011781556040516001600160a01b038316602482015261168c90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611a45565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146117295760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016106f4565b61116385611b30565b600054610100900460ff168061174b575060005460ff16155b6117675760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611789576000805461ffff19166101011790555b611791611b70565b611799611bf3565b6117a282611c51565b8015610828576000805461ff00191690555050565b606060006117c6836002612234565b6117d19060026121fc565b67ffffffffffffffff8111156117f757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611821576020820181803683370190505b509050600360fc1b8160008151811061184a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061188757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006118ab846002612234565b6118b69060016121fc565b90505b600181111561194a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106118f857634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061191c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936119438161229a565b90506118b9565b5083156119995760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106f4565b9392505050565b803b611a045760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016106f4565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611aa45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016106f4565b600080846001600160a01b031684604051611abf919061205f565b600060405180830381855af49150503d8060008114611afa576040519150601f19603f3d011682016040523d82523d6000602084013e611aff565b606091505b5091509150611b2782826040518060600160405280602781526020016122f360279139611d1a565b95945050505050565b611b39816119a0565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611b89575060005460ff16155b611ba55760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bc7576000805461ffff19166101011790555b611bcf611d53565b611bd7611d53565b611bdf611d53565b80156106c7576000805461ff001916905550565b600054610100900460ff1680611c0c575060005460ff16155b611c285760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bcf576000805461ffff1916610101179055611bd7611d53565b600054610100900460ff1680611c6a575060005460ff16155b611c865760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611ca8576000805461ffff19166101011790555b6001600160a01b038216611cbb57600080fd5b611cc6600083611dbd565b611cf07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583611dbd565b6117a27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383611dbd565b60608315611d29575081611999565b825115611d395782518084602001fd5b8160405162461bcd60e51b81526004016106f49190612154565b600054610100900460ff1680611d6c575060005460ff16155b611d885760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bdf576000805461ffff191661010117905580156106c7576000805461ff001916905550565b6108288282611499565b600060208284031215611dd8578081fd5b8135611999816122dd565b600060208284031215611df4578081fd5b8151611999816122dd565b600080600080600080600080610100898b031215611e1b578384fd5b8835611e26816122dd565b97506020890135611e36816122dd565b96506040890135611e46816122dd565b95506060890135611e56816122dd565b94506080890135611e66816122dd565b935060a0890135611e76816122dd565b925060c089013561ffff81168114611e8c578283fd5b915060e0890135611e9c816122dd565b809150509295985092959890939650565b60008060408385031215611ebf578182fd5b8235611eca816122dd565b9150602083013567ffffffffffffffff80821115611ee6578283fd5b818501915085601f830112611ef9578283fd5b813581811115611f0b57611f0b6122c7565b604051601f8201601f19908116603f01168101908382118183101715611f3357611f336122c7565b81604052828152886020848701011115611f4b578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215611f7e578182fd5b8235611f89816122dd565b946020939093013593505050565b600060208284031215611fa8578081fd5b81518015158114611999578182fd5b600060208284031215611fc8578081fd5b5035919050565b60008060408385031215611fe1578182fd5b823591506020830135611ff3816122dd565b809150509250929050565b60006020828403121561200f578081fd5b81356001600160e01b031981168114611999578182fd5b600060208284031215612037578081fd5b5051919050565b60008060408385031215612050578182fd5b50508035926020909101359150565b6000825161207181846020870161226a565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516120b381601785016020880161226a565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120e481602884016020880161226a565b01602801949350505050565b606080825284519082018190526000906020906080840190828801845b828110156121325781516001600160a01b03168452928401929084019060010161210d565b50505090830194909452506001600160a01b0391909116604090910152919050565b600060208252825180602084015261217381604085016020870161226a565b601f01601f19169190910160400192915050565b6020808252600d908201526c139bdd081b1bdb99d4da1bdc9d609a1b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561220f5761220f6122b1565b500190565b60008261222f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561224e5761224e6122b1565b500290565b600082821015612265576122656122b1565b500390565b60005b8381101561228557818101518382015260200161226d565b83811115612294576000848401525b50505050565b6000816122a9576122a96122b1565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146106c757600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122061c70aab4ceb80431078b3b8a133042e3380167471ee409f8beb381cd0e586b464736f6c63430008030033", + "devdoc": { + "details": "https://docs.aave.com/portal/", + "kind": "dev", + "methods": { + "claimAaveRewardsToTreasury()": { + "details": "This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued" + }, + "depositPaymentToken(uint256)": { + "params": { + "amount": "Amount of payment token to deposit" + } + }, + "distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)": { + "details": "treasuryPercent = 1 - marketPercent", + "params": { + "totalValueRealizedForMarket": "total value of long and short side of the market", + "treasuryYieldPercent_e18": "Percentage of yield in base 1e18 that is allocated to the treasury" + }, + "returns": { + "_0": "The market allocation of the yield" + } + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,address,address,address,address,address,uint16,address)": { + "details": "referral code will be set to 0, depricated Aave feature", + "params": { + "_aToken": "address of the interest accruing token linked to the payment token", + "_aaveReferralCode": "unique code for aave referrals", + "_admin": "admin for the contract", + "_lendingPoolAddressesProvider": "address of the aave lending pool address provider contract", + "_longShort": "address of the longShort contract", + "_paymentToken": "address of the payment token", + "_treasury": "address of the treasury contract" + } + }, + "removePaymentTokenFromMarket(uint256)": { + "details": "This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave. This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.", + "params": { + "amount": "Amount of payment token to withdraw" + } + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "transferPaymentTokensToUser(address,uint256)": { + "params": { + "amount": "Amount of payment token to pay to user", + "user": "User to recieve the payout" + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "stateVariables": { + "aToken": { + "details": "ADAI token" + }, + "amountReservedInCaseOfInsufficientAaveLiquidity": { + "details": "This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal. In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available." + }, + "paymentToken": { + "details": "DAI token" + }, + "referralCode": { + "details": "An aave specific referralCode that has been a depricated feature. This will be set to 0 for \"no referral\" at deployment" + } + }, + "title": "YieldManagerAave", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "aToken()": { + "notice": "The token representing the interest accruing payment token position from Aave" + }, + "aaveIncentivesController()": { + "notice": "The specific Aave incentives controller contract" + }, + "claimAaveRewardsToTreasury()": { + "notice": "Allows for withdrawal of aave rewards to the treasury contract" + }, + "depositPaymentToken(uint256)": { + "notice": "Allows the LongShort contract to deposit tokens into the aave pool" + }, + "distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)": { + "notice": "Calculates and updates the yield allocation to the treasury and the market" + }, + "initialize(address,address,address,address,address,address,uint16,address)": { + "notice": "Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts" + }, + "initializeForMarket()": { + "notice": "Initializes a specific yield manager to a given market" + }, + "isInitialized()": { + "notice": "boolean to prevent markets using an already initialized market" + }, + "lendingPoolAddressesProvider()": { + "notice": "The specific Aave lending pool address provider contract" + }, + "longShort()": { + "notice": "address of longShort contract" + }, + "paymentToken()": { + "notice": "The payment token the yield manager supports" + }, + "removePaymentTokenFromMarket(uint256)": { + "notice": "Allows the LongShort contract to redeem aTokens for the payment token" + }, + "totalReservedForTreasury()": { + "notice": "distributed yield not yet transferred to the treasury" + }, + "transferPaymentTokensToUser(address,uint256)": { + "notice": "Allows the LongShort pay out a user from tokens already withdrawn from Aave" + }, + "treasury()": { + "notice": "address of treasury contract - this is the address that can claim aave incentives rewards" + }, + "withdrawTreasuryFunds()": { + "notice": "Withdraw treasury allocated accrued yield from the lending pool to the treasury contract" + } + }, + "notice": "contract is used to manage the yield generated by the underlying tokens. YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol. Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that continuously accrues interest based on a lend/borrow liquidity ratio.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 17257, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "longShort", + "offset": 0, + "slot": "251", + "type": "t_address" + }, + { + "astId": 17260, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "treasury", + "offset": 0, + "slot": "252", + "type": "t_address" + }, + { + "astId": 17263, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "isInitialized", + "offset": 20, + "slot": "252", + "type": "t_bool" + }, + { + "astId": 17267, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "paymentToken", + "offset": 0, + "slot": "253", + "type": "t_contract(IERC20)7293" + }, + { + "astId": 17271, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "aToken", + "offset": 0, + "slot": "254", + "type": "t_contract(IERC20Upgradeable)1983" + }, + { + "astId": 17275, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "lendingPoolAddressesProvider", + "offset": 0, + "slot": "255", + "type": "t_contract(ILendingPoolAddressesProvider)18905" + }, + { + "astId": 17279, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "aaveIncentivesController", + "offset": 0, + "slot": "256", + "type": "t_contract(IAaveIncentivesController)18518" + }, + { + "astId": 17282, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "referralCode", + "offset": 20, + "slot": "256", + "type": "t_uint16" + }, + { + "astId": 17286, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "totalReservedForTreasury", + "offset": 0, + "slot": "257", + "type": "t_uint256" + }, + { + "astId": 17289, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "amountReservedInCaseOfInsufficientAaveLiquidity", + "offset": 0, + "slot": "258", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IAaveIncentivesController)18518": { + "encoding": "inplace", + "label": "contract IAaveIncentivesController", + "numberOfBytes": "20" + }, + "t_contract(IERC20)7293": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_contract(IERC20Upgradeable)1983": { + "encoding": "inplace", + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(ILendingPoolAddressesProvider)18905": { + "encoding": "inplace", + "label": "contract ILendingPoolAddressesProvider", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/YieldManagerMATIC_Proxy.json b/deployments/mumbai/YieldManagerMATIC_Proxy.json new file mode 100644 index 0000000..f942c90 --- /dev/null +++ b/deployments/mumbai/YieldManagerMATIC_Proxy.json @@ -0,0 +1,206 @@ +{ + "address": "0x1c2760728CfF0ceaF41ED5A37d441AB90DcA2Cc1", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "receipt": { + "to": null, + "from": "0x738edd7F6a625C02030DbFca84885b4De5252903", + "contractAddress": "0x1c2760728CfF0ceaF41ED5A37d441AB90DcA2Cc1", + "transactionIndex": 0, + "gasUsed": "519957", + "logsBloom": "0x00000004000000020000000000000040410000000000020000400000000000000000000002000008000000008002000000008000000000000000000000200000000000000000000000000000000003800000000020000000000100000000000000000000030000000000000000000800000000000000000880010000000000000000000000000000000000000000004020000000000000000000000000000000220000000400004020000000000000008001080000000000001000000000004000000020000000400001000000000000100000000000008104500000000020000090000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8", + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18869287, + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "address": "0x1c2760728CfF0ceaF41ED5A37d441AB90DcA2Cc1", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000b44587e3d6f361266f293a43c94815f391964c28" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8" + }, + { + "transactionIndex": 0, + "blockNumber": 18869287, + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "address": "0x1c2760728CfF0ceaF41ED5A37d441AB90DcA2Cc1", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8" + }, + { + "transactionIndex": 0, + "blockNumber": 18869287, + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "address": "0x1c2760728CfF0ceaF41ED5A37d441AB90DcA2Cc1", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8" + }, + { + "transactionIndex": 0, + "blockNumber": 18869287, + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "address": "0x1c2760728CfF0ceaF41ED5A37d441AB90DcA2Cc1", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x0000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8" + }, + { + "transactionIndex": 0, + "blockNumber": 18869287, + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "address": "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000001c2760728cff0ceaf41ed5a37d441ab90dca2cc1", + "0x0000000000000000000000009198f13b08e299d85e096929fa9781a1e3d5d827" + ], + "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "logIndex": 4, + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8" + }, + { + "transactionIndex": 0, + "blockNumber": 18869287, + "transactionHash": "0xd0422c25ed7de472c4a6ebaf8a1fd062b97b5586f84193e44893852f94c45794", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000738edd7f6a625c02030dbfca84885b4de5252903", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000058ab1c4d9b600000000000000000000000000000000000000000000000000074cafdcdac924cd000000000000000000000000000000000000000000000166888752b6be466cad0000000000000000000000000000000000000000000000000747252b15ef6ecd000000000000000000000000000000000000000000000166888cdd68832022ad", + "logIndex": 5, + "blockHash": "0x378f0c38697a35ef95ad9354facf07f35567a3a0863d043a08c49d1ed9d57ae8" + } + ], + "blockNumber": 18869287, + "cumulativeGasUsed": "519957", + "status": 1, + "byzantium": true + }, + "args": [ + "0xb44587E3d6F361266F293A43C94815f391964C28", + "0x738edd7F6a625C02030DbFca84885b4De5252903", + "0x5d3a389000000000000000000000000051565f132c5b25bc9ea6e4d112ab6a680d553d2a000000000000000000000000733fc3a395a35904045ab6a3678601512c244003000000000000000000000000001b3b4d0f3714ca98ba10f6042daebf0b1b7b6f000000000000000000000000639cb7b21ee2161df9c882483c9d55c90c20ca3e000000000000000000000000178113104fecbcd7ff8669a0150721e231f0fd4b000000000000000000000000d41ae58e803edf4304334acce4dc4ec34a63c64400000000000000000000000000000000000000000000000000000000000000000000000000000000000000002740ea9f72b23372621d8d718f52609b80c24e61" + ], + "solcInputHash": "f992b3c18d8822e024711f3a6d00ccf4", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/solcInputs/f992b3c18d8822e024711f3a6d00ccf4.json b/deployments/mumbai/solcInputs/f992b3c18d8822e024711f3a6d00ccf4.json new file mode 100644 index 0000000..5727ab6 --- /dev/null +++ b/deployments/mumbai/solcInputs/f992b3c18d8822e024711f3a6d00ccf4.json @@ -0,0 +1,355 @@ +{ + "language": "Solidity", + "sources": { + "contracts/abstract/AccessControlledAndUpgradeable.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\nabstract contract AccessControlledAndUpgradeable is\n Initializable,\n AccessControlUpgradeable,\n UUPSUpgradeable\n{\n bytes32 public constant UPGRADER_ROLE = keccak256(\"UPGRADER_ROLE\");\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\");\n\n /// @notice Initializes the contract when called by parent initializers.\n /// @param initialAdmin The initial admin who will hold all roles.\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\n __AccessControl_init();\n __UUPSUpgradeable_init();\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\n }\n\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\n /// and _UUPSUpgradeable_init when initializing.\n /// @param initialAdmin The initial admin who will hold all roles.\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\n internal\n initializer\n {\n require(initialAdmin != address(0));\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\n _setupRole(ADMIN_ROLE, initialAdmin);\n _setupRole(UPGRADER_ROLE, initialAdmin);\n }\n\n /// @notice Authorizes an upgrade to a new address.\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\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, _msgSender());\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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967UpgradeUpgradeable.sol\";\nimport \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\n function __UUPSUpgradeable_init() internal initializer {\n __ERC1967Upgrade_init_unchained();\n __UUPSUpgradeable_init_unchained();\n }\n\n function __UUPSUpgradeable_init_unchained() internal initializer {\n }\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeTo(address newImplementation) external virtual {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallSecure(newImplementation, bytes(\"\"), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n * encoded in `data`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallSecure(newImplementation, data, true);\n }\n\n /**\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n * {upgradeTo} and {upgradeToAndCall}.\n *\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n *\n * ```solidity\n * function _authorizeUpgrade(address) internal override onlyOwner {}\n * ```\n */\n function _authorizeUpgrade(address newImplementation) internal virtual;\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeaconUpgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/StorageSlotUpgradeable.sol\";\nimport \"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\n function __ERC1967Upgrade_init() internal initializer {\n __ERC1967Upgrade_init_unchained();\n }\n\n function __ERC1967Upgrade_init_unchained() internal initializer {\n }\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n address oldImplementation = _getImplementation();\n\n // Initial upgrade and setup call\n _setImplementation(newImplementation);\n if (data.length > 0 || forceCall) {\n _functionDelegateCall(newImplementation, data);\n }\n\n // Perform rollback test if not already in progress\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\n if (!rollbackTesting.value) {\n // Trigger rollback using upgradeTo from the new implementation\n rollbackTesting.value = true;\n _functionDelegateCall(\n newImplementation,\n abi.encodeWithSignature(\"upgradeTo(address)\", oldImplementation)\n );\n rollbackTesting.value = false;\n // Check rollback was effective\n require(oldImplementation == _getImplementation(), \"ERC1967Upgrade: upgrade breaks further upgrades\");\n // Finally reset to the new implementation and log the upgrade\n _upgradeTo(newImplementation);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\n }\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(address target, bytes memory data) private returns (bytes memory) {\n require(AddressUpgradeable.isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return AddressUpgradeable.verifyCallResult(success, returndata, \"Address: low-level delegate call failed\");\n }\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeaconUpgradeable {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 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 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" + }, + "@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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 StorageSlotUpgradeable {\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" + }, + "contracts/YieldManagerAave.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\nimport \"hardhat/console.sol\";\n\nimport \"./interfaces/IYieldManager.sol\";\nimport \"./interfaces/aave/ILendingPool.sol\";\nimport \"./interfaces/aave/ILendingPoolAddressesProvider.sol\";\nimport \"./interfaces/aave/IAaveIncentivesController.sol\";\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\n\n/** @title YieldManagerAave\n @notice contract is used to manage the yield generated by the underlying tokens.\n YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol.\n Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that\n continuously accrues interest based on a lend/borrow liquidity ratio.\n @dev https://docs.aave.com/portal/\n */\ncontract YieldManagerAave is IYieldManager, AccessControlledAndUpgradeable {\n /*╔═════════════════════════════╗\n ║ VARIABLES ║\n ╚═════════════════════════════╝*/\n\n /// @notice address of longShort contract\n address public longShort;\n /// @notice address of treasury contract - this is the address that can claim aave incentives rewards\n address public treasury;\n\n /// @notice boolean to prevent markets using an already initialized market\n bool public isInitialized;\n\n /// @notice The payment token the yield manager supports\n /// @dev DAI token\n IERC20 public paymentToken;\n /// @notice The token representing the interest accruing payment token position from Aave\n /// @dev ADAI token\n IERC20Upgradeable public aToken;\n /// @notice The specific Aave lending pool address provider contract\n ILendingPoolAddressesProvider public lendingPoolAddressesProvider;\n /// @notice The specific Aave incentives controller contract\n IAaveIncentivesController public aaveIncentivesController;\n\n /// @dev An aave specific referralCode that has been a depricated feature. This will be set to 0 for \"no referral\" at deployment\n uint16 referralCode;\n\n /// @notice distributed yield not yet transferred to the treasury\n uint256 public override totalReservedForTreasury;\n\n /// @dev This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal.\n /// In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available.\n uint256 public amountReservedInCaseOfInsufficientAaveLiquidity;\n\n /*╔═════════════════════════════╗\n ║ MODIFIERS ║\n ╚═════════════════════════════╝*/\n\n /// @dev only allow longShort contract to execute modified functions\n modifier longShortOnly() {\n require(msg.sender == longShort, \"Not longShort\");\n _;\n }\n\n /*╔═════════════════════════════╗\n ║ CONTRACT SET-UP ║\n ╚═════════════════════════════╝*/\n\n /**\n @notice Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts\n @param _longShort address of the longShort contract\n @param _treasury address of the treasury contract\n @param _paymentToken address of the payment token\n @param _aToken address of the interest accruing token linked to the payment token\n @param _lendingPoolAddressesProvider address of the aave lending pool address provider contract\n @param _aaveReferralCode unique code for aave referrals\n @param _admin admin for the contract\n @dev referral code will be set to 0, depricated Aave feature\n */\n function initialize(\n address _longShort,\n address _treasury,\n address _paymentToken,\n address _aToken,\n address _lendingPoolAddressesProvider,\n address _aaveIncentivesController,\n uint16 _aaveReferralCode,\n address _admin\n ) external initializer {\n require(\n _longShort != address(0) &&\n _treasury != address(0) &&\n _paymentToken != address(0) &&\n _aToken != address(0) &&\n _lendingPoolAddressesProvider != address(0) &&\n _aaveIncentivesController != address(0) &&\n _admin != address(0)\n );\n\n longShort = _longShort;\n treasury = _treasury;\n\n _AccessControlledAndUpgradeable_init(_admin);\n\n referralCode = _aaveReferralCode;\n\n paymentToken = IERC20(_paymentToken);\n aToken = IERC20Upgradeable(_aToken);\n lendingPoolAddressesProvider = ILendingPoolAddressesProvider(_lendingPoolAddressesProvider);\n aaveIncentivesController = IAaveIncentivesController(_aaveIncentivesController);\n\n // Approve tokens for aave lending pool maximally.\n IERC20(_paymentToken).approve(\n ILendingPoolAddressesProvider(_lendingPoolAddressesProvider).getLendingPool(),\n type(uint256).max\n );\n }\n\n function updateLatestLendingPoolAddress() external {\n IERC20(paymentToken).approve(lendingPoolAddressesProvider.getLendingPool(), type(uint256).max);\n }\n\n /*╔════════════════════════╗\n ║ IMPLEMENTATION ║\n ╚════════════════════════╝*/\n\n /**\n @notice Allows the LongShort contract to deposit tokens into the aave pool\n @param amount Amount of payment token to deposit\n */\n function depositPaymentToken(uint256 amount) external override longShortOnly {\n // If amountReservedInCaseOfInsufficientAaveLiquidity isn't zero, then efficiently net the difference between the amount\n // It basically always be zero besides extreme and unlikely situations with aave.\n if (amountReservedInCaseOfInsufficientAaveLiquidity != 0) {\n if (amountReservedInCaseOfInsufficientAaveLiquidity >= amount) {\n amountReservedInCaseOfInsufficientAaveLiquidity -= amount;\n // Return early, nothing to deposit into the lending pool\n return;\n } else {\n amount -= amountReservedInCaseOfInsufficientAaveLiquidity;\n amountReservedInCaseOfInsufficientAaveLiquidity = 0;\n }\n }\n\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).deposit(\n address(paymentToken),\n amount,\n address(this),\n referralCode\n );\n }\n\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\n /// @param user User to recieve the payout\n /// @param amount Amount of payment token to pay to user\n function transferPaymentTokensToUser(address user, uint256 amount)\n external\n override\n longShortOnly\n {\n try paymentToken.transfer(user, amount) returns (bool transferSuccess) {\n if (transferSuccess) {\n // If the transfer is successful return early, otherwise try pay the user out with the amountReservedInCaseOfInsufficientAaveLiquidity\n return;\n }\n } catch {}\n\n amountReservedInCaseOfInsufficientAaveLiquidity -= amount;\n\n // If this reverts (ie aave unable to make payout), then the whole transaction will revert. User will have to wait until sufficient liquidity available.\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\n address(paymentToken),\n amount,\n user\n );\n }\n\n /// @notice Allows the LongShort contract to redeem aTokens for the payment token\n /// @param amount Amount of payment token to withdraw\n /// @dev This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave.\n /// This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.\n function removePaymentTokenFromMarket(uint256 amount) external override longShortOnly {\n try\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\n address(paymentToken),\n amount,\n address(this)\n )\n {} catch {\n // In theory we should only catch `VL_CURRENT_AVAILABLE_LIQUIDITY_NOT_ENOUGH` errors.\n // Safe to revert on all errors, if aave completely blocks withdrawals the amountReservedInCaseOfInsufficientAaveLiquidity can grow until it is fixed without problems.\n amountReservedInCaseOfInsufficientAaveLiquidity += amount;\n }\n }\n\n /**\n @notice Allows for withdrawal of aave rewards to the treasury contract\n @dev This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued\n */\n function claimAaveRewardsToTreasury() external {\n IAaveIncentivesController _aaveIncentivesController = IAaveIncentivesController(\n aaveIncentivesController\n );\n uint256 amount = _aaveIncentivesController.getUserUnclaimedRewards(address(this));\n\n address[] memory aTokenAddresses = new address[](1);\n aTokenAddresses[0] = address(aToken);\n\n _aaveIncentivesController.claimRewards(aTokenAddresses, amount, treasury);\n\n emit ClaimAaveRewardTokenToTreasury(amount);\n }\n\n /**\n @notice Calculates and updates the yield allocation to the treasury and the market\n @dev treasuryPercent = 1 - marketPercent\n @param totalValueRealizedForMarket total value of long and short side of the market\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\n @return The market allocation of the yield\n */\n function distributeYieldForTreasuryAndReturnMarketAllocation(\n uint256 totalValueRealizedForMarket,\n uint256 treasuryYieldPercent_e18\n ) external override longShortOnly returns (uint256) {\n uint256 totalHeld = aToken.balanceOf(address(this));\n uint256 _totalReservedForTreasury = totalReservedForTreasury;\n\n uint256 totalRealized = totalValueRealizedForMarket +\n _totalReservedForTreasury +\n amountReservedInCaseOfInsufficientAaveLiquidity;\n\n if (totalRealized == totalHeld) {\n return 0;\n }\n\n // will revert in case totalRealized > totalHeld which should never occur since yield is always possitive with aave.\n uint256 unrealizedYield = totalHeld - totalRealized;\n\n uint256 amountForTreasury = (unrealizedYield * treasuryYieldPercent_e18) / 1e18;\n uint256 amountForMarketIncentives = unrealizedYield - amountForTreasury;\n\n totalReservedForTreasury = _totalReservedForTreasury + amountForTreasury;\n\n emit YieldDistributed(unrealizedYield, treasuryYieldPercent_e18);\n\n return amountForMarketIncentives;\n }\n\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\n function withdrawTreasuryFunds() external override {\n uint256 amountToWithdrawForTreasury = totalReservedForTreasury;\n totalReservedForTreasury = 0;\n\n // Redeem aToken for payment tokens.\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\n address(paymentToken),\n amountToWithdrawForTreasury,\n treasury\n );\n\n emit WithdrawTreasuryFunds();\n }\n\n /// @notice Initializes a specific yield manager to a given market\n function initializeForMarket() external override longShortOnly {\n require(!isInitialized, \"Yield Manager is already in use\");\n isInitialized = true;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n /**\n * @dev 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" + }, + "hardhat/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >= 0.4.22 <0.9.0;\n\nlibrary console {\n\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n\tfunction _sendLogPayload(bytes memory payload) private view {\n\t\tuint256 payloadLength = payload.length;\n\t\taddress consoleAddress = CONSOLE_ADDRESS;\n\t\tassembly {\n\t\t\tlet payloadStart := add(payload, 32)\n\t\t\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n\t\t}\n\t}\n\n\tfunction log() internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log()\"));\n\t}\n\n\tfunction logInt(int p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n\t}\n\n\tfunction logUint(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction logString(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction logBool(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction logAddress(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction logBytes(bytes memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n\t}\n\n\tfunction logBytes1(bytes1 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n\t}\n\n\tfunction logBytes2(bytes2 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n\t}\n\n\tfunction logBytes3(bytes3 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n\t}\n\n\tfunction logBytes4(bytes4 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n\t}\n\n\tfunction logBytes5(bytes5 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n\t}\n\n\tfunction logBytes6(bytes6 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n\t}\n\n\tfunction logBytes7(bytes7 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n\t}\n\n\tfunction logBytes8(bytes8 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n\t}\n\n\tfunction logBytes9(bytes9 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n\t}\n\n\tfunction logBytes10(bytes10 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n\t}\n\n\tfunction logBytes11(bytes11 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n\t}\n\n\tfunction logBytes12(bytes12 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n\t}\n\n\tfunction logBytes13(bytes13 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n\t}\n\n\tfunction logBytes14(bytes14 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n\t}\n\n\tfunction logBytes15(bytes15 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n\t}\n\n\tfunction logBytes16(bytes16 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n\t}\n\n\tfunction logBytes17(bytes17 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n\t}\n\n\tfunction logBytes18(bytes18 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n\t}\n\n\tfunction logBytes19(bytes19 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n\t}\n\n\tfunction logBytes20(bytes20 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n\t}\n\n\tfunction logBytes21(bytes21 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n\t}\n\n\tfunction logBytes22(bytes22 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n\t}\n\n\tfunction logBytes23(bytes23 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n\t}\n\n\tfunction logBytes24(bytes24 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n\t}\n\n\tfunction logBytes25(bytes25 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n\t}\n\n\tfunction logBytes26(bytes26 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n\t}\n\n\tfunction logBytes27(bytes27 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n\t}\n\n\tfunction logBytes28(bytes28 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n\t}\n\n\tfunction logBytes29(bytes29 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n\t}\n\n\tfunction logBytes30(bytes30 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n\t}\n\n\tfunction logBytes31(bytes31 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n\t}\n\n\tfunction logBytes32(bytes32 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n\t}\n\n\tfunction log(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction log(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction log(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction log(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction log(uint p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n\t}\n\n\tfunction log(address p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n\t}\n\n\tfunction log(address p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n\t}\n\n\tfunction log(address p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n\t}\n\n\tfunction log(address p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n}\n" + }, + "contracts/interfaces/IYieldManager.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\n/// @notice Manages yield accumulation for the LongShort contract. Each market is deployed with its own yield manager to simplify the bookkeeping, as different markets may share a payment token and yield pool.\nabstract contract IYieldManager {\n event ClaimAaveRewardTokenToTreasury(uint256 amount);\n\n event YieldDistributed(uint256 unrealizedYield, uint256 treasuryYieldPercent_e18);\n\n /// @dev This is purely saving some gas, but the subgraph will know how much is due for the treasury at all times - no need to include in event.\n event WithdrawTreasuryFunds();\n\n /// @notice distributed yield not yet transferred to the treasury\n function totalReservedForTreasury() external virtual returns (uint256);\n\n /// @notice Deposits the given amount of payment tokens into this yield manager.\n /// @param amount Amount of payment token to deposit\n function depositPaymentToken(uint256 amount) external virtual;\n\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\n /// @param user User to recieve the payout\n /// @param amount Amount of payment token to pay to user\n function transferPaymentTokensToUser(address user, uint256 amount) external virtual;\n\n /// @notice Withdraws the given amount of tokens from this yield manager.\n /// @param amount Amount of payment token to withdraw\n function removePaymentTokenFromMarket(uint256 amount) external virtual;\n\n /** \n @notice Calculates and updates the yield allocation to the treasury and the market\n @dev treasuryPercent = 1 - marketPercent\n @param totalValueRealizedForMarket total value of long and short side of the market\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\n @return amountForMarketIncentives The market allocation of the yield\n */\n function distributeYieldForTreasuryAndReturnMarketAllocation(\n uint256 totalValueRealizedForMarket,\n uint256 treasuryYieldPercent_e18\n ) external virtual returns (uint256 amountForMarketIncentives);\n\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\n function withdrawTreasuryFunds() external virtual;\n\n /// @notice Initializes a specific yield manager to a given market\n function initializeForMarket() external virtual;\n}\n" + }, + "contracts/interfaces/aave/ILendingPool.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.3;\n\nimport {ILendingPoolAddressesProvider} from \"./ILendingPoolAddressesProvider.sol\";\nimport {DataTypes} from \"./DataTypes.sol\";\n\ninterface ILendingPool {\n /**\n * @dev Emitted on deposit()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address initiating the deposit\n * @param onBehalfOf The beneficiary of the deposit, receiving the aTokens\n * @param amount The amount deposited\n * @param referral The referral code used\n **/\n event Deposit(\n address indexed reserve,\n address user,\n address indexed onBehalfOf,\n uint256 amount,\n uint16 indexed referral\n );\n\n /**\n * @dev Emitted on withdraw()\n * @param reserve The address of the underlyng asset being withdrawn\n * @param user The address initiating the withdrawal, owner of aTokens\n * @param to Address that will receive the underlying\n * @param amount The amount to be withdrawn\n **/\n event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);\n\n /**\n * @dev Emitted on borrow() and flashLoan() when debt needs to be opened\n * @param reserve The address of the underlying asset being borrowed\n * @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just\n * initiator of the transaction on flashLoan()\n * @param onBehalfOf The address that will be getting the debt\n * @param amount The amount borrowed out\n * @param borrowRateMode The rate mode: 1 for Stable, 2 for Variable\n * @param borrowRate The numeric rate at which the user has borrowed\n * @param referral The referral code used\n **/\n event Borrow(\n address indexed reserve,\n address user,\n address indexed onBehalfOf,\n uint256 amount,\n uint256 borrowRateMode,\n uint256 borrowRate,\n uint16 indexed referral\n );\n\n /**\n * @dev Emitted on repay()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The beneficiary of the repayment, getting his debt reduced\n * @param repayer The address of the user initiating the repay(), providing the funds\n * @param amount The amount repaid\n **/\n event Repay(\n address indexed reserve,\n address indexed user,\n address indexed repayer,\n uint256 amount\n );\n\n /**\n * @dev Emitted on swapBorrowRateMode()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address of the user swapping his rate mode\n * @param rateMode The rate mode that the user wants to swap to\n **/\n event Swap(address indexed reserve, address indexed user, uint256 rateMode);\n\n /**\n * @dev Emitted on setUserUseReserveAsCollateral()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address of the user enabling the usage as collateral\n **/\n event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);\n\n /**\n * @dev Emitted on setUserUseReserveAsCollateral()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address of the user enabling the usage as collateral\n **/\n event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);\n\n /**\n * @dev Emitted on rebalanceStableBorrowRate()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address of the user for which the rebalance has been executed\n **/\n event RebalanceStableBorrowRate(address indexed reserve, address indexed user);\n\n /**\n * @dev Emitted on flashLoan()\n * @param target The address of the flash loan receiver contract\n * @param initiator The address initiating the flash loan\n * @param asset The address of the asset being flash borrowed\n * @param amount The amount flash borrowed\n * @param premium The fee flash borrowed\n * @param referralCode The referral code used\n **/\n event FlashLoan(\n address indexed target,\n address indexed initiator,\n address indexed asset,\n uint256 amount,\n uint256 premium,\n uint16 referralCode\n );\n\n /**\n * @dev Emitted when the pause is triggered.\n */\n event Paused();\n\n /**\n * @dev Emitted when the pause is lifted.\n */\n event Unpaused();\n\n /**\n * @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via\n * LendingPoolCollateral manager using a DELEGATECALL\n * This allows to have the events in the generated ABI for LendingPool.\n * @param collateralAsset The address of the underlying asset used as collateral,\n * to receive as result of the liquidation.\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\n * @param user The address of the borrower getting liquidated\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\n * @param liquidatedCollateralAmount The amount of collateral received by the liiquidator\n * @param liquidator The address of the liquidator\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\n * to receive the underlying collateral asset directly\n **/\n event LiquidationCall(\n address indexed collateralAsset,\n address indexed debtAsset,\n address indexed user,\n uint256 debtToCover,\n uint256 liquidatedCollateralAmount,\n address liquidator,\n bool receiveAToken\n );\n\n /**\n * @dev Emitted when the state of a reserve is updated. NOTE: This event is actually declared\n * in the ReserveLogic library and emitted in the updateInterestRates() function. Since the function is internal,\n * the event will actually be fired by the LendingPool contract. The event is therefore replicated here so it\n * gets added to the LendingPool ABI\n * @param reserve The address of the underlying asset of the reserve\n * @param liquidityRate The new liquidity rate\n * @param stableBorrowRate The new stable borrow rate\n * @param variableBorrowRate The new variable borrow rate\n * @param liquidityIndex The new liquidity index\n * @param variableBorrowIndex The new variable borrow index\n **/\n event ReserveDataUpdated(\n address indexed reserve,\n uint256 liquidityRate,\n uint256 stableBorrowRate,\n uint256 variableBorrowRate,\n uint256 liquidityIndex,\n uint256 variableBorrowIndex\n );\n\n /**\n * @dev Deposits an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\n * - E.g. User deposits 100 USDC and gets in return 100 aUSDC\n * @param asset The address of the underlying asset to deposit\n * @param amount The amount to be deposited\n * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\n * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\n * is a different wallet\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n * 0 if the action is executed directly by the user, without any middle-man\n **/\n function deposit(\n address asset,\n uint256 amount,\n address onBehalfOf,\n uint16 referralCode\n ) external;\n\n /**\n * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned\n * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC\n * @param asset The address of the underlying asset to withdraw\n * @param amount The underlying amount to be withdrawn\n * - Send the value type(uint256).max in order to withdraw the whole aToken balance\n * @param to Address that will receive the underlying, same as msg.sender if the user\n * wants to receive it on his own wallet, or a different address if the beneficiary is a\n * different wallet\n * @return The final amount withdrawn\n **/\n function withdraw(\n address asset,\n uint256 amount,\n address to\n ) external returns (uint256);\n\n /**\n * @dev Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower\n * already deposited enough collateral, or he was given enough allowance by a credit delegator on the\n * corresponding debt token (StableDebtToken or VariableDebtToken)\n * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet\n * and 100 stable/variable debt tokens, depending on the `interestRateMode`\n * @param asset The address of the underlying asset to borrow\n * @param amount The amount to be borrowed\n * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n * 0 if the action is executed directly by the user, without any middle-man\n * @param onBehalfOf Address of the user who will receive the debt. Should be the address of the borrower itself\n * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator\n * if he has been given credit delegation allowance\n **/\n function borrow(\n address asset,\n uint256 amount,\n uint256 interestRateMode,\n uint16 referralCode,\n address onBehalfOf\n ) external;\n\n /**\n * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned\n * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address\n * @param asset The address of the borrowed underlying asset previously borrowed\n * @param amount The amount to repay\n * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\n * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable\n * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the\n * user calling the function if he wants to reduce/remove his own debt, or the address of any other\n * other borrower whose debt should be removed\n * @return The final amount repaid\n **/\n function repay(\n address asset,\n uint256 amount,\n uint256 rateMode,\n address onBehalfOf\n ) external returns (uint256);\n\n /**\n * @dev Allows a borrower to swap his debt between stable and variable mode, or viceversa\n * @param asset The address of the underlying asset borrowed\n * @param rateMode The rate mode that the user wants to swap to\n **/\n function swapBorrowRateMode(address asset, uint256 rateMode) external;\n\n /**\n * @dev Rebalances the stable interest rate of a user to the current stable rate defined on the reserve.\n * - Users can be rebalanced if the following conditions are satisfied:\n * 1. Usage ratio is above 95%\n * 2. the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate,\n * which means that too much has been borrowed at a stable rate and depositors are not earning enough\n * @param asset The address of the underlying asset borrowed\n * @param user The address of the user to be rebalanced\n **/\n function rebalanceStableBorrowRate(address asset, address user) external;\n\n /**\n * @dev Allows depositors to enable/disable a specific deposited asset as collateral\n * @param asset The address of the underlying asset deposited\n * @param useAsCollateral `true` if the user wants to use the deposit as collateral, `false` otherwise\n **/\n function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external;\n\n /**\n * @dev Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1\n * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives\n * a proportionally amount of the `collateralAsset` plus a bonus to cover market risk\n * @param collateralAsset The address of the underlying asset used as collateral,\n * to receive as result of the liquidation.\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\n * @param user The address of the borrower getting liquidated\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\n * to receive the underlying collateral asset directly\n **/\n function liquidationCall(\n address collateralAsset,\n address debtAsset,\n address user,\n uint256 debtToCover,\n bool receiveAToken\n ) external;\n\n /**\n * @dev Allows smartcontracts to access the liquidity of the pool within one transaction,\n * as long as the amount taken plus a fee is returned.\n * IMPORTANT There are security concerns for developers of flashloan receiver\n * contracts that must be kept into consideration.\n * For further details please visit https://developers.aave.com\n * @param receiverAddress The address of the contract receiving the funds,\n * implementing the IFlashLoanReceiver interface.\n * @param assets The addresses of the assets being flash-borrowed\n * @param amounts The amounts amounts being flash-borrowed\n * @param modes Types of the debt to open if the flash loan is not returned:\n * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver\n * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\n * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\n * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2\n * @param params Variadic packed params to pass to the receiver as extra information\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n * 0 if the action is executed directly by the user, without any middle-man\n **/\n function flashLoan(\n address receiverAddress,\n address[] calldata assets,\n uint256[] calldata amounts,\n uint256[] calldata modes,\n address onBehalfOf,\n bytes calldata params,\n uint16 referralCode\n ) external;\n\n /**\n * @dev Returns the user account data across all the reserves\n * @param user The address of the user\n * @return totalCollateralETH the total collateral in ETH of the user\n * @return totalDebtETH the total debt in ETH of the user\n * @return availableBorrowsETH the borrowing power left of the user\n * @return currentLiquidationThreshold the liquidation threshold of the user\n * @return ltv the loan to value of the user\n * @return healthFactor the current health factor of the user\n **/\n function getUserAccountData(address user)\n external\n view\n returns (\n uint256 totalCollateralETH,\n uint256 totalDebtETH,\n uint256 availableBorrowsETH,\n uint256 currentLiquidationThreshold,\n uint256 ltv,\n uint256 healthFactor\n );\n\n function initReserve(\n address reserve,\n address aTokenAddress,\n address stableDebtAddress,\n address variableDebtAddress,\n address interestRateStrategyAddress\n ) external;\n\n function setReserveInterestRateStrategyAddress(address reserve, address rateStrategyAddress)\n external;\n\n function setConfiguration(address reserve, uint256 configuration) external;\n\n /**\n * @dev Returns the configuration of the reserve\n * @param asset The address of the underlying asset of the reserve\n * @return The configuration of the reserve\n **/\n function getConfiguration(address asset)\n external\n view\n returns (DataTypes.ReserveConfigurationMap memory);\n\n /**\n * @dev Returns the configuration of the user across all the reserves\n * @param user The user address\n * @return The configuration of the user\n **/\n function getUserConfiguration(address user)\n external\n view\n returns (DataTypes.UserConfigurationMap memory);\n\n /**\n * @dev Returns the normalized income normalized income of the reserve\n * @param asset The address of the underlying asset of the reserve\n * @return The reserve's normalized income\n */\n function getReserveNormalizedIncome(address asset) external view returns (uint256);\n\n /**\n * @dev Returns the normalized variable debt per unit of asset\n * @param asset The address of the underlying asset of the reserve\n * @return The reserve normalized variable debt\n */\n function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);\n\n /**\n * @dev Returns the state and configuration of the reserve\n * @param asset The address of the underlying asset of the reserve\n * @return The state of the reserve\n **/\n function getReserveData(address asset) external view returns (DataTypes.ReserveData memory);\n\n function finalizeTransfer(\n address asset,\n address from,\n address to,\n uint256 amount,\n uint256 balanceFromAfter,\n uint256 balanceToBefore\n ) external;\n\n function getReservesList() external view returns (address[] memory);\n\n function getAddressesProvider() external view returns (ILendingPoolAddressesProvider);\n\n function setPause(bool val) external;\n\n function paused() external view returns (bool);\n}\n" + }, + "contracts/interfaces/aave/ILendingPoolAddressesProvider.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.3;\n\n/**\n * @title LendingPoolAddressesProvider contract\n * @dev Main registry of addresses part of or connected to the protocol, including permissioned roles\n * - Acting also as factory of proxies and admin of those, so with right to change its implementations\n * - Owned by the Aave Governance\n * @author Aave\n **/\ninterface ILendingPoolAddressesProvider {\n // event MarketIdSet(string newMarketId);\n // event LendingPoolUpdated(address indexed newAddress);\n // event ConfigurationAdminUpdated(address indexed newAddress);\n // event EmergencyAdminUpdated(address indexed newAddress);\n // event LendingPoolConfiguratorUpdated(address indexed newAddress);\n // event LendingPoolCollateralManagerUpdated(address indexed newAddress);\n // event PriceOracleUpdated(address indexed newAddress);\n // event LendingRateOracleUpdated(address indexed newAddress);\n // event ProxyCreated(bytes32 id, address indexed newAddress);\n // event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy);\n\n // function getMarketId() external view returns (string memory);\n\n // function setMarketId(string calldata marketId) external;\n\n // function setAddress(bytes32 id, address newAddress) external;\n\n // function setAddressAsProxy(bytes32 id, address impl) external;\n\n // function getAddress(bytes32 id) external view returns (address);\n\n function getLendingPool() external view returns (address);\n\n // function setLendingPoolImpl(address pool) external;\n\n // function getLendingPoolConfigurator() external view returns (address);\n\n // function setLendingPoolConfiguratorImpl(address configurator) external;\n\n // function getLendingPoolCollateralManager() external view returns (address);\n\n // function setLendingPoolCollateralManager(address manager) external;\n\n // function getPoolAdmin() external view returns (address);\n\n // function setPoolAdmin(address admin) external;\n\n // function getEmergencyAdmin() external view returns (address);\n\n // function setEmergencyAdmin(address admin) external;\n\n // function getPriceOracle() external view returns (address);\n\n // function setPriceOracle(address priceOracle) external;\n\n // function getLendingRateOracle() external view returns (address);\n\n // function setLendingRateOracle(address lendingRateOracle) external;\n}\n" + }, + "contracts/interfaces/aave/IAaveIncentivesController.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.3;\n\ninterface IAaveIncentivesController {\n event RewardsClaimed(address indexed user, address indexed to, uint256 amount);\n\n function claimRewards(\n address[] calldata assets,\n uint256 amount,\n address to\n ) external returns (uint256);\n\n function getUserUnclaimedRewards(address user) external view returns (uint256);\n}\n" + }, + "contracts/interfaces/aave/DataTypes.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.3;\n\nlibrary DataTypes {\n // refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.\n struct ReserveData {\n //stores the reserve configuration\n ReserveConfigurationMap configuration;\n //the liquidity index. Expressed in ray\n uint128 liquidityIndex;\n //variable borrow index. Expressed in ray\n uint128 variableBorrowIndex;\n //the current supply rate. Expressed in ray\n uint128 currentLiquidityRate;\n //the current variable borrow rate. Expressed in ray\n uint128 currentVariableBorrowRate;\n //the current stable borrow rate. Expressed in ray\n uint128 currentStableBorrowRate;\n uint40 lastUpdateTimestamp;\n //tokens addresses\n address aTokenAddress;\n address stableDebtTokenAddress;\n address variableDebtTokenAddress;\n //address of the interest rate strategy\n address interestRateStrategyAddress;\n //the id of the reserve. Represents the position in the list of the active reserves\n uint8 id;\n }\n\n struct ReserveConfigurationMap {\n //bit 0-15: LTV\n //bit 16-31: Liq. threshold\n //bit 32-47: Liq. bonus\n //bit 48-55: Decimals\n //bit 56: Reserve is active\n //bit 57: reserve is frozen\n //bit 58: borrowing is enabled\n //bit 59: stable rate borrowing enabled\n //bit 60-63: reserved\n //bit 64-79: reserve factor\n uint256 data;\n }\n\n struct UserConfigurationMap {\n uint256 data;\n }\n\n enum InterestRateMode {\n NONE,\n STABLE,\n VARIABLE\n }\n}\n" + }, + "contracts/mocks/YieldManagerMock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\";\n\nimport \"../interfaces/IYieldManager.sol\";\nimport \"../interfaces/aave/IAaveIncentivesController.sol\";\n\n/*\n * YieldManagerMock is an implementation of a yield manager that supports\n * configurable, deterministic token yields for testing. Note that the mock\n * needs to be able to mint the underlying token to simulate yield.\n */\ncontract YieldManagerMock is IYieldManager {\n // Admin contracts.\n address public admin;\n address public longShort;\n address public treasury;\n\n bool public isInitialized = false;\n\n // Fixed-precision scale for interest percentages and fees.\n uint256 public constant TEN_TO_THE_18 = 1e18;\n\n // Global state.\n ERC20PresetMinterPauser public token;\n ERC20PresetMinterPauser public tokenOtherRewardERC20;\n\n uint256 public override totalReservedForTreasury;\n uint256 public totalHeld;\n\n uint256 public yieldRate; // pcnt per sec\n uint256 public lastSettled; // secs after epoch\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier longShortOnly() {\n require(msg.sender == longShort, \"Not longShort\");\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n\n constructor(\n address _longShort,\n address _treasury,\n address _token\n ) {\n // Admin contracts.\n longShort = _longShort;\n treasury = _treasury;\n\n // Global state.\n token = ERC20PresetMinterPauser(_token);\n lastSettled = block.timestamp;\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n\n /**\n * Adds the token's accrued yield to the token holdings.\n */\n function settle() public {\n uint256 totalYieldRate = yieldRate * (block.timestamp - lastSettled);\n uint256 totalYield = (totalHeld * totalYieldRate) / TEN_TO_THE_18;\n\n lastSettled = block.timestamp;\n totalHeld = totalHeld + totalYield;\n if (totalYield > 0) {\n token.mint(address(this), totalYield);\n }\n }\n\n /**\n * Adds the given yield percent to the token holdings.\n */\n function settleWithYieldPercent(uint256 yieldPercent) external {\n uint256 totalYield = (totalHeld * yieldPercent) / TEN_TO_THE_18;\n\n lastSettled = block.timestamp;\n totalHeld = totalHeld + totalYield;\n token.mint(address(this), totalYield);\n }\n\n /**\n * Adds the given absolute yield to the token holdings.\n */\n function settleWithYieldAbsolute(uint256 totalYield) external {\n lastSettled = block.timestamp;\n totalHeld = totalHeld + totalYield;\n token.mint(address(this), totalYield);\n }\n\n /**\n * Sets the yield percentage per second for the given token.\n */\n function setYieldRate(uint256 _yieldRate) external {\n yieldRate = _yieldRate;\n }\n\n function depositPaymentToken(uint256 amount) external override longShortOnly {\n // Ensure token state is current.\n settle();\n\n // Transfer tokens to manager contract.\n totalHeld = totalHeld + amount;\n }\n\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\n /// @param user User to recieve the payout\n /// @param amount Amount of payment token to pay to user\n function transferPaymentTokensToUser(address user, uint256 amount)\n external\n override\n longShortOnly\n {\n // Transfer tokens back to LongShort contract.\n token.transfer(user, amount);\n }\n\n function removePaymentTokenFromMarket(uint256 amount) external override longShortOnly {\n // Ensure token state is current.\n settle();\n require(amount <= totalHeld);\n\n totalHeld = totalHeld - amount;\n }\n\n function distributeYieldForTreasuryAndReturnMarketAllocation(\n uint256 totalValueRealizedForMarket,\n uint256 treasuryYieldPercent_e18\n ) external override longShortOnly returns (uint256) {\n uint256 unrealizedYield = totalHeld - totalValueRealizedForMarket - totalReservedForTreasury;\n\n if (unrealizedYield == 0) {\n return 0;\n }\n\n uint256 amountForTreasury = (unrealizedYield * treasuryYieldPercent_e18) / TEN_TO_THE_18;\n uint256 amountForMarketIncentives = unrealizedYield - amountForTreasury;\n\n totalReservedForTreasury += amountForTreasury;\n\n return amountForMarketIncentives;\n }\n\n function withdrawTreasuryFunds() external override longShortOnly {}\n\n function initializeForMarket() external override longShortOnly {\n require(!isInitialized, \"Yield Manager is already in use\");\n isInitialized = true;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../extensions/ERC20Burnable.sol\";\nimport \"../extensions/ERC20Pausable.sol\";\nimport \"../../../access/AccessControlEnumerable.sol\";\nimport \"../../../utils/Context.sol\";\n\n/**\n * @dev {ERC20} token, including:\n *\n * - ability for holders to burn (destroy) their tokens\n * - a minter role that allows for token minting (creation)\n * - a pauser role that allows to stop all token transfers\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable {\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n /**\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\n * account that deploys the contract.\n *\n * See {ERC20-constructor}.\n */\n constructor(string memory name, string memory symbol) ERC20(name, symbol) {\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n _setupRole(MINTER_ROLE, _msgSender());\n _setupRole(PAUSER_ROLE, _msgSender());\n }\n\n /**\n * @dev Creates `amount` new tokens for `to`.\n *\n * See {ERC20-_mint}.\n *\n * Requirements:\n *\n * - the caller must have the `MINTER_ROLE`.\n */\n function mint(address to, uint256 amount) public virtual {\n require(hasRole(MINTER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have minter role to mint\");\n _mint(to, amount);\n }\n\n /**\n * @dev Pauses all token transfers.\n *\n * See {ERC20Pausable} and {Pausable-_pause}.\n *\n * Requirements:\n *\n * - the caller must have the `PAUSER_ROLE`.\n */\n function pause() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to pause\");\n _pause();\n }\n\n /**\n * @dev Unpauses all token transfers.\n *\n * See {ERC20Pausable} and {Pausable-_unpause}.\n *\n * Requirements:\n *\n * - the caller must have the `PAUSER_ROLE`.\n */\n function unpause() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to unpause\");\n _unpause();\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override(ERC20, ERC20Pausable) {\n super._beforeTokenTransfer(from, to, amount);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../utils/Context.sol\";\n\n/**\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\n * tokens and those that they have an allowance for, in a way that can be\n * recognized off-chain (via event analysis).\n */\nabstract contract ERC20Burnable is Context, ERC20 {\n /**\n * @dev Destroys `amount` tokens from the caller.\n *\n * See {ERC20-_burn}.\n */\n function burn(uint256 amount) public virtual {\n _burn(_msgSender(), amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\n * allowance.\n *\n * See {ERC20-_burn} and {ERC20-allowance}.\n *\n * Requirements:\n *\n * - the caller must have allowance for ``accounts``'s tokens of at least\n * `amount`.\n */\n function burnFrom(address account, uint256 amount) public virtual {\n uint256 currentAllowance = allowance(account, _msgSender());\n require(currentAllowance >= amount, \"ERC20: burn amount exceeds allowance\");\n unchecked {\n _approve(account, _msgSender(), currentAllowance - amount);\n }\n _burn(account, amount);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../security/Pausable.sol\";\n\n/**\n * @dev ERC20 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n */\nabstract contract ERC20Pausable is ERC20, Pausable {\n /**\n * @dev See {ERC20-_beforeTokenTransfer}.\n *\n * Requirements:\n *\n * - the contract must not be paused.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n require(!paused(), \"ERC20Pausable: token transfer while paused\");\n }\n}\n" + }, + "@openzeppelin/contracts/access/AccessControlEnumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlEnumerable.sol\";\nimport \"./AccessControl.sol\";\nimport \"../utils/structs/EnumerableSet.sol\";\n\n/**\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\n */\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\n using EnumerableSet for EnumerableSet.AddressSet;\n\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {\n return _roleMembers[role].at(index);\n }\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) public view override returns (uint256) {\n return _roleMembers[role].length();\n }\n\n /**\n * @dev Overload {grantRole} to track enumerable memberships\n */\n function grantRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) {\n super.grantRole(role, account);\n _roleMembers[role].add(account);\n }\n\n /**\n * @dev Overload {revokeRole} to track enumerable memberships\n */\n function revokeRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) {\n super.revokeRole(role, account);\n _roleMembers[role].remove(account);\n }\n\n /**\n * @dev Overload {renounceRole} to track enumerable memberships\n */\n function renounceRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) {\n super.renounceRole(role, account);\n _roleMembers[role].remove(account);\n }\n\n /**\n * @dev Overload {_setupRole} to track enumerable memberships\n */\n function _setupRole(bytes32 role, address account) internal virtual override {\n super._setupRole(role, account);\n _roleMembers[role].add(account);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n require(!paused(), \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n require(paused(), \"Pausable: not paused\");\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/access/IAccessControlEnumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\n\n/**\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\n */\ninterface IAccessControlEnumerable is IAccessControl {\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\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, _msgSender());\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(IAccessControl).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(uint160(account), 20),\n \" is missing role \",\n Strings.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastvalue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastvalue;\n // Update the index for the moved value\n set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n return _values(set._inner);\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "@openzeppelin/contracts/access/IAccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\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/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "contracts/testing/generated/LongShortMockable.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport \"../../interfaces/ITokenFactory.sol\";\nimport \"../../interfaces/ISyntheticToken.sol\";\nimport \"../../interfaces/IStaker.sol\";\nimport \"../../interfaces/ILongShort.sol\";\nimport \"../../interfaces/IYieldManager.sol\";\nimport \"../../interfaces/IOracleManager.sol\";\nimport \"../../abstract/AccessControlledAndUpgradeable.sol\";\nimport \"../../GEMS.sol\";\nimport \"hardhat/console.sol\";\n\nimport \"./LongShortForInternalMocking.sol\";\nimport \"../LongShortInternalStateSetters.sol\";\n\ncontract LongShortMockable is LongShortInternalStateSetters {\n LongShortForInternalMocking mocker;\n bool shouldUseMock;\n string functionToNotMock;\n\n function setMocker(LongShortForInternalMocking _mocker) external {\n mocker = _mocker;\n shouldUseMock = true;\n }\n\n function setFunctionToNotMock(string calldata _functionToNotMock) external {\n functionToNotMock = _functionToNotMock;\n shouldUseMock = true;\n }\n\n function adminOnlyModifierLogicExposed() external {\n return super.adminOnlyModifierLogic();\n }\n\n function adminOnlyModifierLogic() internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"adminOnlyModifierLogic\"))\n ) {\n return mocker.adminOnlyModifierLogicMock();\n } else {\n return super.adminOnlyModifierLogic();\n }\n }\n\n function requireMarketExistsModifierLogicExposed(uint32 marketIndex) external view {\n return super.requireMarketExistsModifierLogic(marketIndex);\n }\n\n function requireMarketExistsModifierLogic(uint32 marketIndex) internal view override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"requireMarketExistsModifierLogic\"))\n ) {\n return mocker.requireMarketExistsModifierLogicMock(marketIndex);\n } else {\n return super.requireMarketExistsModifierLogic(marketIndex);\n }\n }\n\n function gemCollectingModifierLogicExposed() external {\n return super.gemCollectingModifierLogic();\n }\n\n function gemCollectingModifierLogic() internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"gemCollectingModifierLogic\"))\n ) {\n return mocker.gemCollectingModifierLogicMock();\n } else {\n return super.gemCollectingModifierLogic();\n }\n }\n\n function _seedMarketInitiallyExposed(\n uint256 initialMarketSeedForEachMarketSide,\n uint32 marketIndex\n ) external {\n return super._seedMarketInitially(initialMarketSeedForEachMarketSide, marketIndex);\n }\n\n function _seedMarketInitially(uint256 initialMarketSeedForEachMarketSide, uint32 marketIndex)\n internal\n override\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_seedMarketInitially\"))\n ) {\n return mocker._seedMarketInitiallyMock(initialMarketSeedForEachMarketSide, marketIndex);\n } else {\n return super._seedMarketInitially(initialMarketSeedForEachMarketSide, marketIndex);\n }\n }\n\n function _getSyntheticTokenPriceExposed(\n uint256 amountPaymentTokenBackingSynth,\n uint256 amountSyntheticToken\n ) external pure returns (uint256 syntheticTokenPrice) {\n return super._getSyntheticTokenPrice(amountPaymentTokenBackingSynth, amountSyntheticToken);\n }\n\n function _getAmountPaymentTokenExposed(\n uint256 amountSyntheticToken,\n uint256 syntheticTokenPriceInPaymentTokens\n ) external pure returns (uint256 amountPaymentToken) {\n return super._getAmountPaymentToken(amountSyntheticToken, syntheticTokenPriceInPaymentTokens);\n }\n\n function _getAmountSyntheticTokenExposed(\n uint256 amountPaymentTokenBackingSynth,\n uint256 syntheticTokenPriceInPaymentTokens\n ) external pure returns (uint256 amountSyntheticToken) {\n return\n super._getAmountSyntheticToken(\n amountPaymentTokenBackingSynth,\n syntheticTokenPriceInPaymentTokens\n );\n }\n\n function _getEquivalentAmountSyntheticTokensOnTargetSideExposed(\n uint256 amountSyntheticTokens_originSide,\n uint256 syntheticTokenPrice_originSide,\n uint256 syntheticTokenPrice_targetSide\n ) external pure returns (uint256 equivalentAmountSyntheticTokensOnTargetSide) {\n return\n super._getEquivalentAmountSyntheticTokensOnTargetSide(\n amountSyntheticTokens_originSide,\n syntheticTokenPrice_originSide,\n syntheticTokenPrice_targetSide\n );\n }\n\n function getAmountSyntheticTokenToMintOnTargetSide(\n uint32 marketIndex,\n uint256 amountSyntheticToken_redeemOnOriginSide,\n bool isShiftFromLong,\n uint256 priceSnapshotIndex\n ) public view override returns (uint256 amountSyntheticTokensToMintOnTargetSide) {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"getAmountSyntheticTokenToMintOnTargetSide\"))\n ) {\n return\n mocker.getAmountSyntheticTokenToMintOnTargetSideMock(\n marketIndex,\n amountSyntheticToken_redeemOnOriginSide,\n isShiftFromLong,\n priceSnapshotIndex\n );\n } else {\n return\n super.getAmountSyntheticTokenToMintOnTargetSide(\n marketIndex,\n amountSyntheticToken_redeemOnOriginSide,\n isShiftFromLong,\n priceSnapshotIndex\n );\n }\n }\n\n function _getYieldSplitExposed(\n uint32 marketIndex,\n uint256 longValue,\n uint256 shortValue,\n uint256 totalValueLockedInMarket\n ) external view returns (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) {\n return super._getYieldSplit(marketIndex, longValue, shortValue, totalValueLockedInMarket);\n }\n\n function _getYieldSplit(\n uint32 marketIndex,\n uint256 longValue,\n uint256 shortValue,\n uint256 totalValueLockedInMarket\n )\n internal\n view\n override\n returns (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18)\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_getYieldSplit\"))\n ) {\n return\n mocker._getYieldSplitMock(marketIndex, longValue, shortValue, totalValueLockedInMarket);\n } else {\n return super._getYieldSplit(marketIndex, longValue, shortValue, totalValueLockedInMarket);\n }\n }\n\n function _claimAndDistributeYieldThenRebalanceMarketExposed(\n uint32 marketIndex,\n int256 newAssetPrice\n ) external returns (uint256 longValue, uint256 shortValue) {\n return super._claimAndDistributeYieldThenRebalanceMarket(marketIndex, newAssetPrice);\n }\n\n function _claimAndDistributeYieldThenRebalanceMarket(uint32 marketIndex, int256 newAssetPrice)\n internal\n override\n returns (uint256 longValue, uint256 shortValue)\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_claimAndDistributeYieldThenRebalanceMarket\"))\n ) {\n return mocker._claimAndDistributeYieldThenRebalanceMarketMock(marketIndex, newAssetPrice);\n } else {\n return super._claimAndDistributeYieldThenRebalanceMarket(marketIndex, newAssetPrice);\n }\n }\n\n function _updateSystemStateInternalExposed(uint32 marketIndex) external {\n return super._updateSystemStateInternal(marketIndex);\n }\n\n function _updateSystemStateInternal(uint32 marketIndex)\n internal\n override\n requireMarketExists(marketIndex)\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_updateSystemStateInternal\"))\n ) {\n return mocker._updateSystemStateInternalMock(marketIndex);\n } else {\n return super._updateSystemStateInternal(marketIndex);\n }\n }\n\n function _transferPaymentTokensFromUserToYieldManagerExposed(uint32 marketIndex, uint256 amount)\n external\n {\n return super._transferPaymentTokensFromUserToYieldManager(marketIndex, amount);\n }\n\n function _transferPaymentTokensFromUserToYieldManager(uint32 marketIndex, uint256 amount)\n internal\n override\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_transferPaymentTokensFromUserToYieldManager\"))\n ) {\n return mocker._transferPaymentTokensFromUserToYieldManagerMock(marketIndex, amount);\n } else {\n return super._transferPaymentTokensFromUserToYieldManager(marketIndex, amount);\n }\n }\n\n function _mintNextPriceExposed(\n uint32 marketIndex,\n uint256 amount,\n bool isLong\n ) external {\n return super._mintNextPrice(marketIndex, amount, isLong);\n }\n\n function _mintNextPrice(\n uint32 marketIndex,\n uint256 amount,\n bool isLong\n )\n internal\n override\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\n gemCollecting\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_mintNextPrice\"))\n ) {\n return mocker._mintNextPriceMock(marketIndex, amount, isLong);\n } else {\n return super._mintNextPrice(marketIndex, amount, isLong);\n }\n }\n\n function _redeemNextPriceExposed(\n uint32 marketIndex,\n uint256 tokens_redeem,\n bool isLong\n ) external {\n return super._redeemNextPrice(marketIndex, tokens_redeem, isLong);\n }\n\n function _redeemNextPrice(\n uint32 marketIndex,\n uint256 tokens_redeem,\n bool isLong\n )\n internal\n override\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\n gemCollecting\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_redeemNextPrice\"))\n ) {\n return mocker._redeemNextPriceMock(marketIndex, tokens_redeem, isLong);\n } else {\n return super._redeemNextPrice(marketIndex, tokens_redeem, isLong);\n }\n }\n\n function shiftPositionNextPrice(\n uint32 marketIndex,\n uint256 amountSyntheticTokensToShift,\n bool isShiftFromLong\n )\n public\n override\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\n gemCollecting\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"shiftPositionNextPrice\"))\n ) {\n return\n mocker.shiftPositionNextPriceMock(\n marketIndex,\n amountSyntheticTokensToShift,\n isShiftFromLong\n );\n } else {\n return\n super.shiftPositionNextPrice(marketIndex, amountSyntheticTokensToShift, isShiftFromLong);\n }\n }\n\n function _executeOutstandingNextPriceMintsExposed(\n uint32 marketIndex,\n address user,\n bool isLong\n ) external {\n return super._executeOutstandingNextPriceMints(marketIndex, user, isLong);\n }\n\n function _executeOutstandingNextPriceMints(\n uint32 marketIndex,\n address user,\n bool isLong\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_executeOutstandingNextPriceMints\"))\n ) {\n return mocker._executeOutstandingNextPriceMintsMock(marketIndex, user, isLong);\n } else {\n return super._executeOutstandingNextPriceMints(marketIndex, user, isLong);\n }\n }\n\n function _executeOutstandingNextPriceRedeemsExposed(\n uint32 marketIndex,\n address user,\n bool isLong\n ) external {\n return super._executeOutstandingNextPriceRedeems(marketIndex, user, isLong);\n }\n\n function _executeOutstandingNextPriceRedeems(\n uint32 marketIndex,\n address user,\n bool isLong\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_executeOutstandingNextPriceRedeems\"))\n ) {\n return mocker._executeOutstandingNextPriceRedeemsMock(marketIndex, user, isLong);\n } else {\n return super._executeOutstandingNextPriceRedeems(marketIndex, user, isLong);\n }\n }\n\n function _executeOutstandingNextPriceTokenShiftsExposed(\n uint32 marketIndex,\n address user,\n bool isShiftFromLong\n ) external {\n return super._executeOutstandingNextPriceTokenShifts(marketIndex, user, isShiftFromLong);\n }\n\n function _executeOutstandingNextPriceTokenShifts(\n uint32 marketIndex,\n address user,\n bool isShiftFromLong\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_executeOutstandingNextPriceTokenShifts\"))\n ) {\n return mocker._executeOutstandingNextPriceTokenShiftsMock(marketIndex, user, isShiftFromLong);\n } else {\n return super._executeOutstandingNextPriceTokenShifts(marketIndex, user, isShiftFromLong);\n }\n }\n\n function _executeOutstandingNextPriceSettlementsExposed(address user, uint32 marketIndex)\n external\n {\n return super._executeOutstandingNextPriceSettlements(user, marketIndex);\n }\n\n function _executeOutstandingNextPriceSettlements(address user, uint32 marketIndex)\n internal\n override\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_executeOutstandingNextPriceSettlements\"))\n ) {\n return mocker._executeOutstandingNextPriceSettlementsMock(user, marketIndex);\n } else {\n return super._executeOutstandingNextPriceSettlements(user, marketIndex);\n }\n }\n\n function _handleTotalPaymentTokenValueChangeForMarketWithYieldManagerExposed(\n uint32 marketIndex,\n int256 totalPaymentTokenValueChangeForMarket\n ) external {\n return\n super._handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\n marketIndex,\n totalPaymentTokenValueChangeForMarket\n );\n }\n\n function _handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\n uint32 marketIndex,\n int256 totalPaymentTokenValueChangeForMarket\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_handleTotalPaymentTokenValueChangeForMarketWithYieldManager\"))\n ) {\n return\n mocker._handleTotalPaymentTokenValueChangeForMarketWithYieldManagerMock(\n marketIndex,\n totalPaymentTokenValueChangeForMarket\n );\n } else {\n return\n super._handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\n marketIndex,\n totalPaymentTokenValueChangeForMarket\n );\n }\n }\n\n function _handleChangeInSyntheticTokensTotalSupplyExposed(\n uint32 marketIndex,\n bool isLong,\n int256 changeInSyntheticTokensTotalSupply\n ) external {\n return\n super._handleChangeInSyntheticTokensTotalSupply(\n marketIndex,\n isLong,\n changeInSyntheticTokensTotalSupply\n );\n }\n\n function _handleChangeInSyntheticTokensTotalSupply(\n uint32 marketIndex,\n bool isLong,\n int256 changeInSyntheticTokensTotalSupply\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_handleChangeInSyntheticTokensTotalSupply\"))\n ) {\n return\n mocker._handleChangeInSyntheticTokensTotalSupplyMock(\n marketIndex,\n isLong,\n changeInSyntheticTokensTotalSupply\n );\n } else {\n return\n super._handleChangeInSyntheticTokensTotalSupply(\n marketIndex,\n isLong,\n changeInSyntheticTokensTotalSupply\n );\n }\n }\n\n function _batchConfirmOutstandingPendingActionsExposed(\n uint32 marketIndex,\n uint256 syntheticTokenPrice_inPaymentTokens_long,\n uint256 syntheticTokenPrice_inPaymentTokens_short\n )\n external\n returns (\n int256 long_changeInMarketValue_inPaymentToken,\n int256 short_changeInMarketValue_inPaymentToken\n )\n {\n return\n super._batchConfirmOutstandingPendingActions(\n marketIndex,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short\n );\n }\n\n function _batchConfirmOutstandingPendingActions(\n uint32 marketIndex,\n uint256 syntheticTokenPrice_inPaymentTokens_long,\n uint256 syntheticTokenPrice_inPaymentTokens_short\n )\n internal\n override\n returns (\n int256 long_changeInMarketValue_inPaymentToken,\n int256 short_changeInMarketValue_inPaymentToken\n )\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_batchConfirmOutstandingPendingActions\"))\n ) {\n return\n mocker._batchConfirmOutstandingPendingActionsMock(\n marketIndex,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short\n );\n } else {\n return\n super._batchConfirmOutstandingPendingActions(\n marketIndex,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short\n );\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\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 / b + (a % b == 0 ? 0 : 1);\n }\n}\n" + }, + "contracts/interfaces/ITokenFactory.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\ninterface ITokenFactory {\n function createSyntheticToken(\n string calldata syntheticName,\n string calldata syntheticSymbol,\n address staker,\n uint32 marketIndex,\n bool isLong\n ) external returns (address);\n}\n" + }, + "contracts/interfaces/ISyntheticToken.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\n/**\n@title SyntheticToken\n@notice An ERC20 token that tracks or inversely tracks the price of an\n underlying asset with floating exposure.\n*/\ninterface ISyntheticToken {\n // function MINTER_ROLE() external returns (bytes32);\n\n /// @notice Allows users to stake their synthetic tokens to earn Float.\n function stake(uint256) external;\n\n function mint(address, uint256) external;\n\n function totalSupply() external returns (uint256);\n\n function transferFrom(\n address,\n address,\n uint256\n ) external returns (bool);\n\n function transfer(address, uint256) external returns (bool);\n\n function burn(uint256 amount) external;\n}\n" + }, + "contracts/interfaces/IStaker.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\ninterface IStaker {\n /*╔════════════════════════════╗\n ║ EVENTS ║\n ╚════════════════════════════╝*/\n\n event StakerV1(\n address admin,\n address floatTreasury,\n address floatCapital,\n address floatToken,\n uint256 floatPercentage\n );\n\n event MarketAddedToStaker(\n uint32 marketIndex,\n uint256 exitFee_e18,\n uint256 period,\n uint256 multiplier,\n uint256 balanceIncentiveExponent,\n int256 balanceIncentiveEquilibriumOffset,\n uint256 safeExponentBitShifting\n );\n\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\n uint32 marketIndex,\n uint256 accumulativeFloatIssuanceSnapshotIndex,\n uint256 accumulativeLong,\n uint256 accumulativeShort\n );\n\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\n\n event StakeWithdrawn(address user, address token, uint256 amount);\n\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\n\n event MarketLaunchIncentiveParametersChanges(\n uint32 marketIndex,\n uint256 period,\n uint256 multiplier\n );\n\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\n\n event BalanceIncentiveParamsUpdated(\n uint32 marketIndex,\n uint256 balanceIncentiveExponent,\n int256 balanceIncentiveCurve_equilibriumOffset,\n uint256 safeExponentBitShifting\n );\n\n event FloatPercentageUpdated(uint256 floatPercentage);\n\n event NextPriceStakeShift(\n address user,\n uint32 marketIndex,\n uint256 amount,\n bool isShiftFromLong,\n uint256 userShiftIndex\n );\n\n // only for graph validation\n event StakeShifted(\n address user,\n uint32 marketIndex,\n uint256 newAmountStakedLong,\n uint256 newAmountStakedShort\n );\n\n function userAmountStaked(address, address) external view returns (uint256);\n\n function addNewStakingFund(\n uint32 marketIndex,\n address longTokenAddress,\n address shortTokenAddress,\n uint256 kInitialMultiplier,\n uint256 kPeriod,\n uint256 unstakeFee_e18,\n uint256 _balanceIncentiveCurve_exponent,\n int256 _balanceIncentiveCurve_equilibriumOffset\n ) external;\n\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\n uint32 marketIndex,\n uint256 marketUpdateIndex,\n uint256 longTokenPrice,\n uint256 shortTokenPrice,\n uint256 longValue,\n uint256 shortValue\n ) external;\n\n function stakeFromUser(address from, uint256 amount) external;\n\n function shiftTokens(\n uint256 amountSyntheticTokensToShift,\n uint32 marketIndex,\n bool isShiftFromLong\n ) external;\n}\n" + }, + "contracts/interfaces/ILongShort.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\ninterface ILongShort {\n /*╔════════════════════════════╗\n ║ EVENTS ║\n ╚════════════════════════════╝*/\n\n event LongShortV1(address admin, address tokenFactory, address staker);\n\n event SystemStateUpdated(\n uint32 marketIndex,\n uint256 updateIndex,\n int256 underlyingAssetPrice,\n uint256 longValue,\n uint256 shortValue,\n uint256 longPrice,\n uint256 shortPrice\n );\n\n event SyntheticMarketCreated(\n uint32 marketIndex,\n address longTokenAddress,\n address shortTokenAddress,\n address paymentToken,\n int256 initialAssetPrice,\n string name,\n string symbol,\n address oracleAddress,\n address yieldManagerAddress\n );\n\n event NextPriceRedeem(\n uint32 marketIndex,\n bool isLong,\n uint256 synthRedeemed,\n address user,\n uint256 oracleUpdateIndex\n );\n\n event NextPriceSyntheticPositionShift(\n uint32 marketIndex,\n bool isShiftFromLong,\n uint256 synthShifted,\n address user,\n uint256 oracleUpdateIndex\n );\n\n event NextPriceDeposit(\n uint32 marketIndex,\n bool isLong,\n uint256 depositAdded,\n address user,\n uint256 oracleUpdateIndex\n );\n\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\n\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\n\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\n\n function syntheticTokens(uint32, bool) external view returns (address);\n\n function marketUpdateIndex(uint32) external view returns (uint256);\n\n function syntheticToken_priceSnapshot(\n uint32,\n bool,\n uint256\n ) external view returns (uint256);\n\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\n external\n view\n returns (uint256 marketSideValueInPaymentToken);\n\n function updateSystemState(uint32 marketIndex) external;\n\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\n\n function getUsersConfirmedButNotSettledSynthBalance(\n address user,\n uint32 marketIndex,\n bool isLong\n ) external view returns (uint256 confirmedButNotSettledBalance);\n\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\n\n function shiftPositionNextPrice(\n uint32 marketIndex,\n uint256 amountSyntheticTokensToShift,\n bool isShiftFromLong\n ) external;\n\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\n external;\n\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\n external;\n\n function getAmountSyntheticTokenToMintOnTargetSide(\n uint32 marketIndex,\n uint256 amountSyntheticTokenShiftedFromOneSide,\n bool isShiftFromLong,\n uint256 priceSnapshotIndex\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\n\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\n\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\n\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\n\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\n}\n" + }, + "contracts/interfaces/IOracleManager.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\n/*\n * Manages price feeds from different oracle implementations.\n */\ninterface IOracleManager {\n function updatePrice() external returns (int256);\n\n /*\n *Returns the latest price from the oracle feed.\n */\n function getLatestPrice() external view returns (int256);\n}\n" + }, + "contracts/GEMS.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\n\n/** Contract giving user GEMS*/\n\n// Inspired by https://github.com/andrecronje/rarity/blob/main/rarity.sol\n\n/** @title GEMS */\ncontract GEMS is AccessControlledAndUpgradeable {\n bytes32 public constant GEM_ROLE = keccak256(\"GEM_ROLE\");\n\n uint256 constant gems_per_day = 250e18;\n uint256 constant DAY = 1 days;\n\n mapping(address => uint256) public gems;\n mapping(address => uint256) public streak;\n mapping(address => uint256) public lastAction;\n\n event GemsCollected(address user, uint256 gems, uint256 streak);\n\n function initialize(\n address _admin,\n address _longShort,\n address _staker\n ) external initializer {\n _AccessControlledAndUpgradeable_init(_admin);\n _setupRole(GEM_ROLE, _longShort);\n _setupRole(GEM_ROLE, _staker);\n }\n\n // Say gm and get gems by performing an action in LongShort or Staker\n function gm(address user) external {\n if (hasRole(GEM_ROLE, msg.sender)) {\n uint256 usersLastAction = lastAction[user];\n uint256 blocktimestamp = block.timestamp;\n\n if (blocktimestamp - usersLastAction >= DAY) {\n // Award gems\n gems[user] += gems_per_day;\n\n // Increment streak\n if (blocktimestamp - usersLastAction < 2 * DAY) {\n streak[user] += 1;\n } else {\n streak[user] = 1; // reset streak to 1\n }\n\n lastAction[user] = blocktimestamp;\n }\n emit GemsCollected(user, gems[user], streak[user]);\n }\n }\n}\n" + }, + "contracts/testing/generated/LongShortForInternalMocking.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.3;\n\nimport \"./LongShortMockable.sol\";\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport \"../../interfaces/ITokenFactory.sol\";\nimport \"../../interfaces/ISyntheticToken.sol\";\nimport \"../../interfaces/IStaker.sol\";\nimport \"../../interfaces/ILongShort.sol\";\nimport \"../../interfaces/IYieldManager.sol\";\nimport \"../../interfaces/IOracleManager.sol\";\nimport \"../../abstract/AccessControlledAndUpgradeable.sol\";\nimport \"../../GEMS.sol\";\nimport \"hardhat/console.sol\";\n\ncontract LongShortForInternalMocking {\n function adminOnlyModifierLogicMock() public pure {\n return ();\n }\n\n function requireMarketExistsModifierLogicMock(uint32) public pure {\n return ();\n }\n\n function gemCollectingModifierLogicMock() public pure {\n return ();\n }\n\n function initializeMock(\n address,\n address,\n address,\n address\n ) public pure {\n return ();\n }\n\n function _seedMarketInitiallyMock(uint256, uint32) public pure {\n return ();\n }\n\n function _getSyntheticTokenPriceMock(uint256, uint256)\n public\n pure\n returns (uint256 syntheticTokenPrice)\n {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _getAmountPaymentTokenMock(uint256, uint256)\n public\n pure\n returns (uint256 amountPaymentToken)\n {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _getAmountSyntheticTokenMock(uint256, uint256)\n public\n pure\n returns (uint256 amountSyntheticToken)\n {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _getEquivalentAmountSyntheticTokensOnTargetSideMock(\n uint256,\n uint256,\n uint256\n ) public pure returns (uint256 equivalentAmountSyntheticTokensOnTargetSide) {\n return (abi.decode(\"\", (uint256)));\n }\n\n function getAmountSyntheticTokenToMintOnTargetSideMock(\n uint32,\n uint256,\n bool,\n uint256\n ) public pure returns (uint256 amountSyntheticTokensToMintOnTargetSide) {\n return (abi.decode(\"\", (uint256)));\n }\n\n function getUsersConfirmedButNotSettledSynthBalanceMock(\n address,\n uint32,\n bool\n ) public pure returns (uint256 confirmedButNotSettledBalance) {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _getYieldSplitMock(\n uint32,\n uint256,\n uint256,\n uint256\n ) public pure returns (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) {\n return (abi.decode(\"\", (bool)), abi.decode(\"\", (uint256)));\n }\n\n function _claimAndDistributeYieldThenRebalanceMarketMock(uint32, int256)\n public\n pure\n returns (uint256 longValue, uint256 shortValue)\n {\n return (abi.decode(\"\", (uint256)), abi.decode(\"\", (uint256)));\n }\n\n function _updateSystemStateInternalMock(uint32) public pure {\n return ();\n }\n\n function _transferPaymentTokensFromUserToYieldManagerMock(uint32, uint256) public pure {\n return ();\n }\n\n function _mintNextPriceMock(\n uint32,\n uint256,\n bool\n ) public pure {\n return ();\n }\n\n function _redeemNextPriceMock(\n uint32,\n uint256,\n bool\n ) public pure {\n return ();\n }\n\n function shiftPositionNextPriceMock(\n uint32,\n uint256,\n bool\n ) public pure {\n return ();\n }\n\n function _executeOutstandingNextPriceMintsMock(\n uint32,\n address,\n bool\n ) public pure {\n return ();\n }\n\n function _executeOutstandingNextPriceRedeemsMock(\n uint32,\n address,\n bool\n ) public pure {\n return ();\n }\n\n function _executeOutstandingNextPriceTokenShiftsMock(\n uint32,\n address,\n bool\n ) public pure {\n return ();\n }\n\n function _executeOutstandingNextPriceSettlementsMock(address, uint32) public pure {\n return ();\n }\n\n function _handleTotalPaymentTokenValueChangeForMarketWithYieldManagerMock(uint32, int256)\n public\n pure\n {\n return ();\n }\n\n function _handleChangeInSyntheticTokensTotalSupplyMock(\n uint32,\n bool,\n int256\n ) public pure {\n return ();\n }\n\n function _batchConfirmOutstandingPendingActionsMock(\n uint32,\n uint256,\n uint256\n )\n public\n pure\n returns (\n int256 long_changeInMarketValue_inPaymentToken,\n int256 short_changeInMarketValue_inPaymentToken\n )\n {\n return (abi.decode(\"\", (int256)), abi.decode(\"\", (int256)));\n }\n}\n" + }, + "contracts/testing/LongShortInternalStateSetters.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"../LongShort.sol\";\n\n/*\nNOTE: This contract is for testing purposes only!\n*/\n\ncontract LongShortInternalStateSetters is LongShort {\n function setInitializeMarketParams(\n uint32 marketIndex,\n bool marketIndexValue,\n uint32 _latestMarket,\n address _staker,\n address longAddress,\n address shortAddress\n ) public {\n latestMarket = _latestMarket;\n marketExists[marketIndex] = marketIndexValue;\n staker = (_staker);\n syntheticTokens[marketIndex][\n true /*short*/\n ] = (longAddress);\n syntheticTokens[marketIndex][\n false /*short*/\n ] = (shortAddress);\n }\n\n function setMarketExistsMulti(uint32[] calldata marketIndexes) external {\n uint256 length = marketIndexes.length;\n for (uint256 i = 0; i < length; i++) {\n marketExists[marketIndexes[i]] = true;\n }\n }\n\n function set_updateSystemStateInternalGlobals(\n uint32 marketIndex,\n uint256 _latestUpdateIndexForMarket,\n uint256 syntheticTokenPrice_inPaymentTokens_long,\n uint256 syntheticTokenPrice_inPaymentTokens_short,\n int256 _assetPrice,\n uint256 longValue,\n uint256 shortValue,\n address oracleManager,\n address _staker,\n address synthLong,\n address synthShort,\n uint256 stakerNextPrice_currentUpdateIndex\n ) public {\n marketExists[marketIndex] = true;\n marketUpdateIndex[marketIndex] = _latestUpdateIndexForMarket;\n syntheticToken_priceSnapshot[marketIndex][true][\n _latestUpdateIndexForMarket\n ] = syntheticTokenPrice_inPaymentTokens_long;\n syntheticToken_priceSnapshot[marketIndex][false][\n _latestUpdateIndexForMarket\n ] = syntheticTokenPrice_inPaymentTokens_short;\n\n marketSideValueInPaymentToken[marketIndex][true] = longValue;\n marketSideValueInPaymentToken[marketIndex][false] = shortValue;\n\n assetPrice[marketIndex] = _assetPrice;\n oracleManagers[marketIndex] = oracleManager;\n\n syntheticTokens[marketIndex][true] = synthLong;\n syntheticTokens[marketIndex][false] = synthShort;\n\n staker = _staker;\n\n userNextPrice_currentUpdateIndex[marketIndex][_staker] = stakerNextPrice_currentUpdateIndex;\n }\n\n function setGetUsersConfirmedButNotSettledBalanceGlobals(\n uint32 marketIndex,\n address user,\n bool isLong,\n uint256 _userNextPrice_currentUpdateIndex,\n uint256 _marketUpdateIndex,\n uint256 _userNextPrice_paymentToken_depositAmount_isLong,\n uint256 _syntheticToken_priceSnapshot_isLong,\n uint256 _syntheticToken_priceSnapshot_notIsLong,\n uint256 _userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong\n ) external {\n marketExists[marketIndex] = true;\n userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex;\n marketUpdateIndex[marketIndex] = _marketUpdateIndex;\n\n userNextPrice_paymentToken_depositAmount[marketIndex][isLong][\n user\n ] = _userNextPrice_paymentToken_depositAmount_isLong;\n userNextPrice_paymentToken_depositAmount[marketIndex][!isLong][user] = 0; // reset other side for good measure\n\n syntheticToken_priceSnapshot[marketIndex][isLong][\n _userNextPrice_currentUpdateIndex\n ] = _syntheticToken_priceSnapshot_isLong;\n syntheticToken_priceSnapshot[marketIndex][!isLong][\n _userNextPrice_currentUpdateIndex\n ] = _syntheticToken_priceSnapshot_notIsLong;\n\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][!isLong][\n user\n ] = _userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong;\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isLong][user] = 0; // reset other side for good measure\n }\n\n function setPerformOutstandingBatchedSettlementsGlobals(\n uint32 marketIndex,\n uint256 batched_amountPaymentToken_depositLong,\n uint256 batched_amountPaymentToken_depositShort,\n uint256 batched_amountSyntheticToken_redeemLong,\n uint256 batched_amountSyntheticToken_redeemShort,\n uint256 batchedAmountSyntheticTokenToShiftFromLong,\n uint256 batchedAmountSyntheticTokenToShiftFromShort\n ) external {\n batched_amountPaymentToken_deposit[marketIndex][true] = batched_amountPaymentToken_depositLong;\n batched_amountPaymentToken_deposit[marketIndex][\n false\n ] = batched_amountPaymentToken_depositShort;\n batched_amountSyntheticToken_redeem[marketIndex][\n true\n ] = batched_amountSyntheticToken_redeemLong;\n batched_amountSyntheticToken_redeem[marketIndex][\n false\n ] = batched_amountSyntheticToken_redeemShort;\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][\n true\n ] = batchedAmountSyntheticTokenToShiftFromLong;\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][\n false\n ] = batchedAmountSyntheticTokenToShiftFromShort;\n }\n\n function setHandleChangeInSyntheticTokensTotalSupplyGlobals(\n uint32 marketIndex,\n address longSyntheticToken,\n address shortSyntheticToken\n ) external {\n syntheticTokens[marketIndex][true] = longSyntheticToken;\n syntheticTokens[marketIndex][false] = shortSyntheticToken;\n }\n\n function setRedeemNextPriceGlobals(\n uint32 marketIndex,\n uint256 _marketUpdateIndex,\n address syntheticToken,\n bool isLong\n ) external {\n marketUpdateIndex[marketIndex] = _marketUpdateIndex;\n syntheticTokens[marketIndex][isLong] = syntheticToken;\n }\n\n function setShiftNextPriceGlobals(\n uint32 marketIndex,\n uint256 _marketUpdateIndex,\n address syntheticTokenShiftedFrom,\n bool isShiftFromLong\n ) external {\n marketUpdateIndex[marketIndex] = _marketUpdateIndex;\n syntheticTokens[marketIndex][isShiftFromLong] = syntheticTokenShiftedFrom;\n }\n\n function setExecuteOutstandingNextPriceMintsGlobals(\n uint32 marketIndex,\n address user,\n bool isLong,\n address syntheticToken,\n uint256 _userNextPrice_syntheticToken_redeemAmount,\n uint256 _userNextPrice_currentUpdateIndex,\n uint256 _syntheticToken_priceSnapshot\n ) external {\n userNextPrice_paymentToken_depositAmount[marketIndex][isLong][\n user\n ] = _userNextPrice_syntheticToken_redeemAmount;\n userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex;\n syntheticToken_priceSnapshot[marketIndex][isLong][\n _userNextPrice_currentUpdateIndex\n ] = _syntheticToken_priceSnapshot;\n syntheticTokens[marketIndex][isLong] = syntheticToken;\n }\n\n function setExecuteOutstandingNextPriceRedeemsGlobals(\n uint32 marketIndex,\n address user,\n bool isLong,\n address yieldManager,\n uint256 _userNextPrice_syntheticToken_redeemAmount,\n uint256 _userNextPrice_currentUpdateIndex,\n uint256 _syntheticToken_priceSnapshot\n ) external {\n userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][\n user\n ] = _userNextPrice_syntheticToken_redeemAmount;\n userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex;\n syntheticToken_priceSnapshot[marketIndex][isLong][\n _userNextPrice_currentUpdateIndex\n ] = _syntheticToken_priceSnapshot;\n yieldManagers[marketIndex] = yieldManager;\n }\n\n function setExecuteOutstandingNextPriceTokenShiftsGlobals(\n uint32 marketIndex,\n address user,\n bool isShiftFromLong,\n address syntheticTokenShiftedTo,\n uint256 _userNextPrice_syntheticToken_toShiftAwayFrom_marketSide,\n uint256 _userNextPrice_currentUpdateIndex,\n uint256 _syntheticToken_priceSnapshotShiftedFrom,\n uint256 _syntheticToken_priceSnapshotShiftedTo\n ) external {\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][\n user\n ] = _userNextPrice_syntheticToken_toShiftAwayFrom_marketSide;\n userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex;\n syntheticToken_priceSnapshot[marketIndex][isShiftFromLong][\n _userNextPrice_currentUpdateIndex\n ] = _syntheticToken_priceSnapshotShiftedFrom;\n syntheticToken_priceSnapshot[marketIndex][!isShiftFromLong][\n _userNextPrice_currentUpdateIndex\n ] = _syntheticToken_priceSnapshotShiftedTo;\n syntheticTokens[marketIndex][!isShiftFromLong] = syntheticTokenShiftedTo;\n }\n\n function setExecuteOutstandingNextPriceSettlementsGlobals(\n uint32 marketIndex,\n address user,\n uint256 _userNextPrice_currentUpdateIndex,\n uint256 _marketUpdateIndex\n ) external {\n userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex;\n marketUpdateIndex[marketIndex] = _marketUpdateIndex;\n }\n\n function setClaimAndDistributeYieldThenRebalanceMarketGlobals(\n uint32 marketIndex,\n uint256 _marketSideValueInPaymentTokenLong,\n uint256 _marketSideValueInPaymentTokenShort,\n address yieldManager\n ) external {\n marketSideValueInPaymentToken[marketIndex][true] = _marketSideValueInPaymentTokenLong;\n marketSideValueInPaymentToken[marketIndex][false] = _marketSideValueInPaymentTokenShort;\n yieldManagers[marketIndex] = yieldManager;\n }\n\n function setDepositFundsGlobals(\n uint32 marketIndex,\n address paymentToken,\n address yieldManager\n ) external {\n paymentTokens[marketIndex] = paymentToken;\n yieldManagers[marketIndex] = yieldManager;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 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" + }, + "contracts/LongShort.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/utils/math/Math.sol\";\n\nimport \"./interfaces/ITokenFactory.sol\";\nimport \"./interfaces/ISyntheticToken.sol\";\nimport \"./interfaces/IStaker.sol\";\nimport \"./interfaces/ILongShort.sol\";\nimport \"./interfaces/IYieldManager.sol\";\nimport \"./interfaces/IOracleManager.sol\";\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\nimport \"./GEMS.sol\";\nimport \"hardhat/console.sol\";\n\n/**\n **** visit https://float.capital *****\n */\n\n/// @title Core logic of Float Protocal markets\n/// @author float.capital\n/// @notice visit https://float.capital for more info\n/// @dev All functions in this file are currently `virtual`. This is NOT to encourage inheritance.\n/// It is merely for convenince when unit testing.\n/// @custom:auditors This contract balances long and short sides.\ncontract LongShort is ILongShort, AccessControlledAndUpgradeable {\n //Using Open Zeppelin safe transfer library for token transfers\n using SafeERC20 for IERC20;\n\n /*╔═════════════════════════════╗\n ║ VARIABLES ║\n ╚═════════════════════════════╝*/\n\n /* ══════ Fixed-precision constants ══════ */\n /// @notice this is the address that permanently locked initial liquidity for markets is held by.\n /// These tokens will never move so market can never have zero liquidity on a side.\n /// @dev f10a7 spells float in hex - for fun - important part is that the private key for this address in not known.\n address public constant PERMANENT_INITIAL_LIQUIDITY_HOLDER =\n 0xf10A7_F10A7_f10A7_F10a7_F10A7_f10a7_F10A7_f10a7;\n\n /// @dev an empty allocation of storage for use in future upgrades - inspiration from OZ:\n /// https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/10f0f1a95b1b0fd5520351886bae7a03490f1056/contracts/token/ERC20/ERC20Upgradeable.sol#L361\n uint256[45] private __constantsGap;\n\n /* ══════ Global state ══════ */\n uint32 public latestMarket;\n\n address public staker;\n address public tokenFactory;\n address public gems;\n\n uint256[45] private __globalStateGap;\n\n /* ══════ Market specific ══════ */\n mapping(uint32 => bool) public marketExists;\n\n mapping(uint32 => int256) public assetPrice;\n mapping(uint32 => uint256) public override marketUpdateIndex;\n mapping(uint32 => uint256) public marketTreasurySplitGradient_e18;\n mapping(uint32 => uint256) public marketLeverage_e18;\n\n mapping(uint32 => address) public paymentTokens;\n mapping(uint32 => address) public yieldManagers;\n mapping(uint32 => address) public oracleManagers;\n uint256[45] private __marketStateGap;\n\n /* ══════ Market + position (long/short) specific ══════ */\n mapping(uint32 => mapping(bool => address)) public override syntheticTokens;\n mapping(uint32 => mapping(bool => uint256)) public override marketSideValueInPaymentToken;\n\n /// @notice synthetic token prices of a given market of a (long/short) at every previous price update\n mapping(uint32 => mapping(bool => mapping(uint256 => uint256)))\n public\n override syntheticToken_priceSnapshot;\n\n mapping(uint32 => mapping(bool => uint256)) public batched_amountPaymentToken_deposit;\n mapping(uint32 => mapping(bool => uint256)) public batched_amountSyntheticToken_redeem;\n mapping(uint32 => mapping(bool => uint256))\n public batched_amountSyntheticToken_toShiftAwayFrom_marketSide;\n uint256[45] private __marketPositonStateGap;\n\n /* ══════ User specific ══════ */\n mapping(uint32 => mapping(address => uint256)) public userNextPrice_currentUpdateIndex;\n\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\n public userNextPrice_paymentToken_depositAmount;\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\n public userNextPrice_syntheticToken_redeemAmount;\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\n public userNextPrice_syntheticToken_toShiftAwayFrom_marketSide;\n\n /*╔═════════════════════════════╗\n ║ MODIFIERS ║\n ╚═════════════════════════════╝*/\n\n function adminOnlyModifierLogic() internal virtual {\n _checkRole(ADMIN_ROLE, msg.sender);\n }\n\n modifier adminOnly() {\n adminOnlyModifierLogic();\n _;\n }\n\n function requireMarketExistsModifierLogic(uint32 marketIndex) internal view virtual {\n require(marketExists[marketIndex], \"market doesn't exist\");\n }\n\n modifier requireMarketExists(uint32 marketIndex) {\n requireMarketExistsModifierLogic(marketIndex);\n _;\n }\n\n modifier updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(\n address user,\n uint32 marketIndex\n ) {\n _updateSystemStateInternal(marketIndex);\n _executeOutstandingNextPriceSettlements(user, marketIndex);\n _;\n }\n\n function gemCollectingModifierLogic() internal virtual {\n if (msg.sender != staker) {\n GEMS(gems).gm(msg.sender);\n }\n }\n\n modifier gemCollecting() {\n gemCollectingModifierLogic();\n _;\n }\n\n /*╔═════════════════════════════╗\n ║ CONTRACT SET-UP ║\n ╚═════════════════════════════╝*/\n\n /// @notice Initializes the contract.\n /// @dev Calls OpenZeppelin's initializer modifier.\n /// @param _admin Address of the admin role.\n /// @param _tokenFactory Address of the contract which creates synthetic asset tokens.\n /// @param _staker Address of the contract which handles synthetic asset stakes.\n function initialize(\n address _admin,\n address _tokenFactory,\n address _staker,\n address _gems\n ) external virtual initializer {\n require(\n _admin != address(0) &&\n _tokenFactory != address(0) &&\n _staker != address(0) &&\n _gems != address(0)\n );\n _AccessControlledAndUpgradeable_init(_admin);\n tokenFactory = _tokenFactory;\n staker = _staker;\n gems = _gems;\n\n emit LongShortV1(_admin, _tokenFactory, _staker);\n }\n\n /*╔═══════════════════╗\n ║ ADMIN ║\n ╚═══════════════════╝*/\n\n /// @notice Update oracle for a market\n /// @dev Can only be called by the current admin.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param _newOracleManager Address of the replacement oracle manager.\n function updateMarketOracle(uint32 marketIndex, address _newOracleManager) external adminOnly {\n // If not a oracle contract this would break things.. Test's arn't validating this\n // Ie require isOracle interface - ERC165\n address previousOracleManager = oracleManagers[marketIndex];\n oracleManagers[marketIndex] = _newOracleManager;\n emit OracleUpdated(marketIndex, previousOracleManager, _newOracleManager);\n }\n\n /// @notice changes the gradient of the line for determining the yield split between market and treasury.\n function changeMarketTreasurySplitGradient(\n uint32 marketIndex,\n uint256 _marketTreasurySplitGradient_e18\n ) external adminOnly {\n marketTreasurySplitGradient_e18[marketIndex] = _marketTreasurySplitGradient_e18;\n }\n\n /*╔═════════════════════════════╗\n ║ MARKET CREATION ║\n ╚═════════════════════════════╝*/\n\n /// @notice Creates an entirely new long/short market tracking an underlying oracle price.\n /// Make sure the synthetic names/symbols are unique.\n /// @dev This does not make the market active.\n /// The `initializeMarket` function was split out separately to this function to reduce costs.\n /// @param syntheticName Name of the synthetic asset\n /// @param syntheticSymbol Symbol for the synthetic asset\n /// @param _paymentToken The address of the erc20 token used to buy this synthetic asset\n /// this will likely always be DAI\n /// @param _oracleManager The address of the oracle manager that provides the price feed for this market\n /// @param _yieldManager The contract that manages depositing the paymentToken into a yield bearing protocol\n function createNewSyntheticMarket(\n string calldata syntheticName,\n string calldata syntheticSymbol,\n address _paymentToken,\n address _oracleManager,\n address _yieldManager\n ) external adminOnly {\n require(\n _paymentToken != address(0) && _oracleManager != address(0) && _yieldManager != address(0)\n );\n\n uint32 marketIndex = ++latestMarket;\n address _staker = staker;\n\n // Ensure new markets don't use the same yield manager\n IYieldManager(_yieldManager).initializeForMarket();\n\n // Create new synthetic long token.\n syntheticTokens[marketIndex][true] = ITokenFactory(tokenFactory).createSyntheticToken(\n string(abi.encodePacked(\"Float Long \", syntheticName)),\n string(abi.encodePacked(\"fl\", syntheticSymbol)),\n _staker,\n marketIndex,\n true\n );\n\n // Create new synthetic short token.\n syntheticTokens[marketIndex][false] = ITokenFactory(tokenFactory).createSyntheticToken(\n string(abi.encodePacked(\"Float Short \", syntheticName)),\n string(abi.encodePacked(\"fs\", syntheticSymbol)),\n _staker,\n marketIndex,\n false\n );\n\n // Initial market state.\n paymentTokens[marketIndex] = _paymentToken;\n yieldManagers[marketIndex] = _yieldManager;\n oracleManagers[marketIndex] = _oracleManager;\n assetPrice[marketIndex] = IOracleManager(oracleManagers[marketIndex]).updatePrice();\n\n emit SyntheticMarketCreated(\n marketIndex,\n syntheticTokens[marketIndex][true],\n syntheticTokens[marketIndex][false],\n _paymentToken,\n assetPrice[marketIndex],\n syntheticName,\n syntheticSymbol,\n _oracleManager,\n _yieldManager\n );\n }\n\n /// @notice Creates an entirely new long/short market tracking an underlying oracle price.\n /// Uses already created synthetic tokens.\n /// @dev This does not make the market active.\n /// The `initializeMarket` function was split out separately to this function to reduce costs.\n /// @param syntheticName Name of the synthetic asset\n /// @param syntheticSymbol Symbol for the synthetic asset\n /// @param _longToken Address for the long token.\n /// @param _shortToken Address for the short token.\n /// @param _paymentToken The address of the erc20 token used to buy this synthetic asset\n /// this will likely always be DAI\n /// @param _oracleManager The address of the oracle manager that provides the price feed for this market\n /// @param _yieldManager The contract that manages depositing the paymentToken into a yield bearing protocol\n function createNewSyntheticMarketExternalSyntheticTokens(\n string calldata syntheticName,\n string calldata syntheticSymbol,\n address _longToken,\n address _shortToken,\n address _paymentToken,\n address _oracleManager,\n address _yieldManager\n ) external adminOnly {\n uint32 marketIndex = ++latestMarket;\n\n // Ensure new markets don't use the same yield manager\n IYieldManager(_yieldManager).initializeForMarket();\n\n // Assign new synthetic long token.\n syntheticTokens[marketIndex][true] = _longToken;\n\n // Assign new synthetic short token.\n syntheticTokens[marketIndex][false] = _shortToken;\n\n // Initial market state.\n paymentTokens[marketIndex] = _paymentToken;\n yieldManagers[marketIndex] = _yieldManager;\n oracleManagers[marketIndex] = _oracleManager;\n assetPrice[marketIndex] = IOracleManager(oracleManagers[marketIndex]).updatePrice();\n\n emit SyntheticMarketCreated(\n marketIndex,\n _longToken,\n _shortToken,\n _paymentToken,\n assetPrice[marketIndex],\n syntheticName,\n syntheticSymbol,\n _oracleManager,\n _yieldManager\n );\n }\n\n /// @notice Seeds a new market with initial capital.\n /// @dev Only called when initializing a market.\n /// @param initialMarketSeedForEachMarketSide Amount in wei for which to seed both sides of the market.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n function _seedMarketInitially(uint256 initialMarketSeedForEachMarketSide, uint32 marketIndex)\n internal\n virtual\n {\n require(\n // You require at least 1e18 (1 payment token with 18 decimal places) of the underlying payment token to seed the market.\n initialMarketSeedForEachMarketSide >= 1e18,\n \"Insufficient market seed\"\n );\n\n uint256 amountToLockInYieldManager = initialMarketSeedForEachMarketSide * 2;\n _transferPaymentTokensFromUserToYieldManager(marketIndex, amountToLockInYieldManager);\n IYieldManager(yieldManagers[marketIndex]).depositPaymentToken(amountToLockInYieldManager);\n\n ISyntheticToken(syntheticTokens[marketIndex][true]).mint(\n PERMANENT_INITIAL_LIQUIDITY_HOLDER,\n initialMarketSeedForEachMarketSide\n );\n ISyntheticToken(syntheticTokens[marketIndex][false]).mint(\n PERMANENT_INITIAL_LIQUIDITY_HOLDER,\n initialMarketSeedForEachMarketSide\n );\n\n marketSideValueInPaymentToken[marketIndex][true] = initialMarketSeedForEachMarketSide;\n marketSideValueInPaymentToken[marketIndex][false] = initialMarketSeedForEachMarketSide;\n }\n\n /// @notice Sets a market as active once it has already been setup by createNewSyntheticMarket.\n /// @dev Seperated from createNewSyntheticMarket due to gas considerations.\n /// @param marketIndex An int32 which uniquely identifies the market.\n /// @param kInitialMultiplier Linearly decreasing multiplier for Float token issuance for the market when staking synths.\n /// @param kPeriod Time which kInitialMultiplier will last\n /// @param unstakeFee_e18 Base 1e18 percentage fee levied when unstaking for the market.\n /// @param balanceIncentiveCurve_exponent Sets the degree to which Float token issuance differs\n /// for market sides in unbalanced markets. See Staker.sol\n /// @param balanceIncentiveCurve_equilibriumOffset An offset to account for naturally imbalanced markets\n /// when Float token issuance should differ for market sides. See Staker.sol\n /// @param initialMarketSeedForEachMarketSide Amount of payment token that will be deposited in each market side to seed the market.\n function initializeMarket(\n uint32 marketIndex,\n uint256 kInitialMultiplier,\n uint256 kPeriod,\n uint256 unstakeFee_e18,\n uint256 initialMarketSeedForEachMarketSide,\n uint256 balanceIncentiveCurve_exponent,\n int256 balanceIncentiveCurve_equilibriumOffset,\n uint256 _marketTreasurySplitGradient_e18,\n uint256 marketLeverage\n ) external adminOnly {\n require(\n kInitialMultiplier != 0 &&\n unstakeFee_e18 != 0 &&\n initialMarketSeedForEachMarketSide != 0 &&\n balanceIncentiveCurve_exponent != 0 &&\n _marketTreasurySplitGradient_e18 != 0\n );\n\n require(!marketExists[marketIndex], \"already initialized\");\n require(marketIndex <= latestMarket, \"index too high\");\n\n marketExists[marketIndex] = true;\n\n marketTreasurySplitGradient_e18[marketIndex] = _marketTreasurySplitGradient_e18;\n\n // Set this value to one initially - 0 is a null value and thus potentially bug prone.\n marketUpdateIndex[marketIndex] = 1;\n\n _seedMarketInitially(initialMarketSeedForEachMarketSide, marketIndex);\n\n marketLeverage_e18[marketIndex] = marketLeverage;\n\n // Add new staker funds with fresh synthetic tokens.\n IStaker(staker).addNewStakingFund(\n marketIndex,\n syntheticTokens[marketIndex][true],\n syntheticTokens[marketIndex][false],\n kInitialMultiplier,\n kPeriod,\n unstakeFee_e18,\n balanceIncentiveCurve_exponent,\n balanceIncentiveCurve_equilibriumOffset\n );\n\n IStaker(staker).pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\n marketIndex,\n 1,\n 1e18,\n 1e18,\n initialMarketSeedForEachMarketSide,\n initialMarketSeedForEachMarketSide\n );\n\n emit NewMarketLaunchedAndSeeded(\n marketIndex,\n initialMarketSeedForEachMarketSide,\n marketLeverage\n );\n }\n\n /*╔══════════════════════════════╗\n ║ GETTER FUNCTIONS ║\n ╚══════════════════════════════╝*/\n\n /// @notice Calculates the conversion rate from synthetic tokens to payment tokens.\n /// @dev Synth tokens have a fixed 18 decimals.\n /// @param amountPaymentTokenBackingSynth Amount of payment tokens in that token's lowest denomination.\n /// @param amountSyntheticToken Amount of synth token in wei.\n /// @return syntheticTokenPrice The calculated conversion rate in base 1e18.\n function _getSyntheticTokenPrice(\n uint256 amountPaymentTokenBackingSynth,\n uint256 amountSyntheticToken\n ) internal pure virtual returns (uint256 syntheticTokenPrice) {\n return (amountPaymentTokenBackingSynth * 1e18) / amountSyntheticToken;\n }\n\n /// @notice Converts synth token amounts to payment token amounts at a synth token price.\n /// @dev Price assumed base 1e18.\n /// @param amountSyntheticToken Amount of synth token in wei.\n /// @param syntheticTokenPriceInPaymentTokens The conversion rate from synth to payment tokens in base 1e18.\n /// @return amountPaymentToken The calculated amount of payment tokens in token's lowest denomination.\n function _getAmountPaymentToken(\n uint256 amountSyntheticToken,\n uint256 syntheticTokenPriceInPaymentTokens\n ) internal pure virtual returns (uint256 amountPaymentToken) {\n return (amountSyntheticToken * syntheticTokenPriceInPaymentTokens) / 1e18;\n }\n\n /// @notice Converts payment token amounts to synth token amounts at a synth token price.\n /// @dev Price assumed base 1e18.\n /// @param amountPaymentTokenBackingSynth Amount of payment tokens in that token's lowest denomination.\n /// @param syntheticTokenPriceInPaymentTokens The conversion rate from synth to payment tokens in base 1e18.\n /// @return amountSyntheticToken The calculated amount of synthetic token in wei.\n function _getAmountSyntheticToken(\n uint256 amountPaymentTokenBackingSynth,\n uint256 syntheticTokenPriceInPaymentTokens\n ) internal pure virtual returns (uint256 amountSyntheticToken) {\n return (amountPaymentTokenBackingSynth * 1e18) / syntheticTokenPriceInPaymentTokens;\n }\n\n /**\n @notice Calculate the amount of target side synthetic tokens that are worth the same\n amount of payment tokens as X many synthetic tokens on origin side.\n The resulting equation comes from simplifying this function\n\n _getAmountSyntheticToken(\n _getAmountPaymentToken(\n amountOriginSynth,\n priceOriginSynth\n ),\n priceTargetSynth)\n\n Unpacking the function we get:\n ((amountOriginSynth * priceOriginSynth) / 1e18) * 1e18 / priceTargetSynth\n And simplifying this we get:\n (amountOriginSynth * priceOriginSynth) / priceTargetSynth\n @param amountSyntheticTokens_originSide Amount of synthetic tokens on origin side\n @param syntheticTokenPrice_originSide Price of origin side's synthetic token\n @param syntheticTokenPrice_targetSide Price of target side's synthetic token\n @return equivalentAmountSyntheticTokensOnTargetSide Amount of synthetic token on target side\n */\n function _getEquivalentAmountSyntheticTokensOnTargetSide(\n uint256 amountSyntheticTokens_originSide,\n uint256 syntheticTokenPrice_originSide,\n uint256 syntheticTokenPrice_targetSide\n ) internal pure virtual returns (uint256 equivalentAmountSyntheticTokensOnTargetSide) {\n equivalentAmountSyntheticTokensOnTargetSide =\n (amountSyntheticTokens_originSide * syntheticTokenPrice_originSide) /\n syntheticTokenPrice_targetSide;\n }\n\n /// @notice Given an executed next price shift from tokens on one market side to the other,\n /// determines how many other side tokens the shift was worth.\n /// @dev Intended for use primarily by Staker.sol\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amountSyntheticToken_redeemOnOriginSide Amount of synth token in wei.\n /// @param isShiftFromLong Whether the token shift is from long to short (true), or short to long (false).\n /// @param priceSnapshotIndex Index which identifies which synth prices to use.\n /// @return amountSyntheticTokensToMintOnTargetSide The amount in wei of tokens for the other side that the shift was worth.\n function getAmountSyntheticTokenToMintOnTargetSide(\n uint32 marketIndex,\n uint256 amountSyntheticToken_redeemOnOriginSide,\n bool isShiftFromLong,\n uint256 priceSnapshotIndex\n ) public view virtual override returns (uint256 amountSyntheticTokensToMintOnTargetSide) {\n uint256 syntheticTokenPriceOnOriginSide = syntheticToken_priceSnapshot[marketIndex][\n isShiftFromLong\n ][priceSnapshotIndex];\n uint256 syntheticTokenPriceOnTargetSide = syntheticToken_priceSnapshot[marketIndex][\n !isShiftFromLong\n ][priceSnapshotIndex];\n\n amountSyntheticTokensToMintOnTargetSide = _getEquivalentAmountSyntheticTokensOnTargetSide(\n amountSyntheticToken_redeemOnOriginSide,\n syntheticTokenPriceOnOriginSide,\n syntheticTokenPriceOnTargetSide\n );\n }\n\n /**\n @notice The amount of a synth token a user is owed following a batch execution.\n 4 possible states for next price actions:\n - \"Pending\" - means the next price update hasn't happened or been enacted on by the updateSystemState function.\n - \"Confirmed\" - means the next price has been updated by the updateSystemState function. There is still\n - outstanding (lazy) computation that needs to be executed per user in the batch.\n - \"Settled\" - there is no more computation left for the user.\n - \"Non-existent\" - user has no next price actions.\n This function returns a calculated value only in the case of 'confirmed' next price actions.\n It should return zero for all other types of next price actions.\n @dev Used in SyntheticToken.sol balanceOf to allow for automatic reflection of next price actions.\n @param user The address of the user for whom to execute the function for.\n @param marketIndex An uint32 which uniquely identifies a market.\n @param isLong Whether it is for the long synthetic asset or the short synthetic asset.\n @return confirmedButNotSettledBalance The amount in wei of tokens that the user is owed.\n */\n function getUsersConfirmedButNotSettledSynthBalance(\n address user,\n uint32 marketIndex,\n bool isLong\n )\n external\n view\n virtual\n override\n requireMarketExists(marketIndex)\n returns (uint256 confirmedButNotSettledBalance)\n {\n uint256 currentMarketUpdateIndex = marketUpdateIndex[marketIndex];\n uint256 userNextPrice_currentUpdateIndex_forMarket = userNextPrice_currentUpdateIndex[\n marketIndex\n ][user];\n if (\n userNextPrice_currentUpdateIndex_forMarket != 0 &&\n userNextPrice_currentUpdateIndex_forMarket <= currentMarketUpdateIndex\n ) {\n uint256 amountPaymentTokenDeposited = userNextPrice_paymentToken_depositAmount[marketIndex][\n isLong\n ][user];\n\n if (amountPaymentTokenDeposited > 0) {\n uint256 syntheticTokenPrice = syntheticToken_priceSnapshot[marketIndex][isLong][\n userNextPrice_currentUpdateIndex_forMarket\n ];\n\n confirmedButNotSettledBalance = _getAmountSyntheticToken(\n amountPaymentTokenDeposited,\n syntheticTokenPrice\n );\n }\n\n uint256 amountSyntheticTokensToBeShiftedAwayFromOriginSide = userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[\n marketIndex\n ][!isLong][user];\n\n if (amountSyntheticTokensToBeShiftedAwayFromOriginSide > 0) {\n uint256 syntheticTokenPriceOnOriginSide = syntheticToken_priceSnapshot[marketIndex][\n !isLong\n ][userNextPrice_currentUpdateIndex_forMarket];\n uint256 syntheticTokenPriceOnTargetSide = syntheticToken_priceSnapshot[marketIndex][isLong][\n userNextPrice_currentUpdateIndex_forMarket\n ];\n\n confirmedButNotSettledBalance += _getEquivalentAmountSyntheticTokensOnTargetSide(\n amountSyntheticTokensToBeShiftedAwayFromOriginSide,\n syntheticTokenPriceOnOriginSide,\n syntheticTokenPriceOnTargetSide\n );\n }\n }\n }\n\n /**\n @notice Calculates the percentage in base 1e18 of how much of the accrued yield\n for a market should be allocated to treasury.\n @dev For gas considerations also returns whether the long side is imbalanced.\n @dev For gas considerations totalValueLockedInMarket is passed as a parameter as the function\n calling this function has pre calculated the value\n @param longValue The current total payment token value of the long side of the market.\n @param shortValue The current total payment token value of the short side of the market.\n @param totalValueLockedInMarket Total payment token value of both sides of the market.\n @return isLongSideUnderbalanced Whether the long side initially had less value than the short side.\n @return treasuryYieldPercent_e18 The percentage in base 1e18 of how much of the accrued yield\n for a market should be allocated to treasury.\n */\n function _getYieldSplit(\n uint32 marketIndex,\n uint256 longValue,\n uint256 shortValue,\n uint256 totalValueLockedInMarket\n ) internal view virtual returns (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) {\n isLongSideUnderbalanced = longValue < shortValue;\n uint256 imbalance;\n\n unchecked {\n if (isLongSideUnderbalanced) {\n imbalance = shortValue - longValue;\n } else {\n imbalance = longValue - shortValue;\n }\n }\n\n // marketTreasurySplitGradient_e18 may be adjusted to ensure yield is given\n // to the market at a desired rate e.g. if a market tends to become imbalanced\n // frequently then the gradient can be increased to funnel yield to the market\n // quicker.\n // See this equation in latex: https://ipfs.io/ipfs/QmXsW4cHtxpJ5BFwRcMSUw7s5G11Qkte13NTEfPLTKEx4x\n // Interact with this equation: https://www.desmos.com/calculator/pnl43tfv5b\n uint256 marketPercentCalculated_e18 = (imbalance *\n marketTreasurySplitGradient_e18[marketIndex]) / totalValueLockedInMarket;\n\n uint256 marketPercent_e18 = Math.min(marketPercentCalculated_e18, 1e18);\n\n unchecked {\n treasuryYieldPercent_e18 = 1e18 - marketPercent_e18;\n }\n }\n\n /*╔══════════════════════════════╗\n ║ HELPER FUNCTIONS ║\n ╚══════════════════════════════╝*/\n\n /// @notice First gets yield from the yield manager and allocates it to market and treasury.\n /// It then allocates the full market yield portion to the underbalanced side of the market.\n /// NB this function also adjusts the value of the long and short side based on the latest\n /// price of the underlying asset received from the oracle. This function should ideally be\n /// called everytime there is an price update from the oracle. We have built a bot that does this.\n /// The system is still perectly safe if not called every price update, the synthetic will just\n /// less closely track the underlying asset.\n /// @dev In one function as yield should be allocated before rebalancing.\n /// This prevents an attack whereby the user imbalances a side to capture all accrued yield.\n /// @param marketIndex The market for which to execute the function for.\n /// @param newAssetPrice The new asset price.\n /// @return longValue The value of the long side after rebalancing.\n /// @return shortValue The value of the short side after rebalancing.\n function _claimAndDistributeYieldThenRebalanceMarket(uint32 marketIndex, int256 newAssetPrice)\n internal\n virtual\n returns (uint256 longValue, uint256 shortValue)\n {\n int256 oldAssetPrice = assetPrice[marketIndex];\n // Claiming and distributing the yield\n longValue = marketSideValueInPaymentToken[marketIndex][true];\n shortValue = marketSideValueInPaymentToken[marketIndex][false];\n uint256 totalValueLockedInMarket = longValue + shortValue;\n\n (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) = _getYieldSplit(\n marketIndex,\n longValue,\n shortValue,\n totalValueLockedInMarket\n );\n\n uint256 marketAmount = IYieldManager(yieldManagers[marketIndex])\n .distributeYieldForTreasuryAndReturnMarketAllocation(\n totalValueLockedInMarket,\n treasuryYieldPercent_e18\n );\n\n if (marketAmount > 0) {\n if (isLongSideUnderbalanced) {\n longValue += marketAmount;\n } else {\n shortValue += marketAmount;\n }\n }\n\n // Adjusting value of long and short pool based on price movement\n // The side/position with less liquidity has 100% percent exposure to the price movement.\n // The side/position with more liquidity will have exposure < 100% to the price movement.\n // I.e. Imagine $100 in longValue and $50 shortValue\n // long side would have $50/$100 = 50% exposure to price movements based on the liquidity imbalance.\n // min(longValue, shortValue) = $50 , therefore if the price change was -10% then\n // $50 * 10% = $5 gained for short side and conversely $5 lost for long side.\n int256 underbalancedSideValue = int256(Math.min(longValue, shortValue));\n\n // See this equation in latex: https://ipfs.io/ipfs/QmPeJ3SZdn1GfxqCD4GDYyWTJGPMSHkjPJaxrzk2qTTPSE\n // Interact with this equation: https://www.desmos.com/calculator/t8gr6j5vsq\n int256 valueChange = ((newAssetPrice - oldAssetPrice) *\n underbalancedSideValue *\n int256(marketLeverage_e18[marketIndex])) / (oldAssetPrice * 1e18);\n\n if (valueChange < 0) {\n valueChange = -valueChange; // make value change positive\n\n // handle 'impossible' edge case where underlying price feed changes more than 100% downwards gracefully.\n if (uint256(valueChange) > longValue) {\n valueChange = (int256(longValue) * 99999) / 100000;\n }\n longValue -= uint256(valueChange);\n shortValue += uint256(valueChange);\n } else {\n // handle 'impossible' edge case where underlying price feed changes more than 100% upwards gracefully.\n if (uint256(valueChange) > shortValue) {\n valueChange = (int256(shortValue) * 99999) / 100000;\n }\n longValue += uint256(valueChange);\n shortValue -= uint256(valueChange);\n }\n }\n\n /*╔═══════════════════════════════╗\n ║ UPDATING SYSTEM STATE ║\n ╚═══════════════════════════════╝*/\n\n /// @notice Updates the value of the long and short sides to account for latest oracle price updates\n /// and batches all next price actions.\n /// @dev To prevent front-running only executes on price change from an oracle.\n /// We assume the function will be called for each market at least once per price update.\n /// Note Even if not called on every price update, this won't affect security, it will only affect how closely\n /// the synthetic asset actually tracks the underlying asset.\n /// @param marketIndex The market index for which to update.\n function _updateSystemStateInternal(uint32 marketIndex)\n internal\n virtual\n requireMarketExists(marketIndex)\n {\n // If a negative int is return this should fail.\n int256 newAssetPrice = IOracleManager(oracleManagers[marketIndex]).updatePrice();\n\n uint256 currentMarketIndex = marketUpdateIndex[marketIndex];\n\n bool assetPriceHasChanged = assetPrice[marketIndex] != newAssetPrice;\n\n if (assetPriceHasChanged) {\n uint256 syntheticTokenPrice_inPaymentTokens_long = syntheticToken_priceSnapshot[marketIndex][\n true\n ][currentMarketIndex];\n uint256 syntheticTokenPrice_inPaymentTokens_short = syntheticToken_priceSnapshot[marketIndex][\n false\n ][currentMarketIndex];\n // if there is a price change and the 'staker' contract has pending updates, push the stakers price snapshot index to the staker\n // (so the staker can handle its internal accounting)\n\n (\n uint256 newLongPoolValue,\n uint256 newShortPoolValue\n ) = _claimAndDistributeYieldThenRebalanceMarket(marketIndex, newAssetPrice);\n\n syntheticTokenPrice_inPaymentTokens_long = _getSyntheticTokenPrice(\n newLongPoolValue,\n ISyntheticToken(syntheticTokens[marketIndex][true]).totalSupply()\n );\n syntheticTokenPrice_inPaymentTokens_short = _getSyntheticTokenPrice(\n newShortPoolValue,\n ISyntheticToken(syntheticTokens[marketIndex][false]).totalSupply()\n );\n\n assetPrice[marketIndex] = newAssetPrice;\n\n currentMarketIndex++;\n marketUpdateIndex[marketIndex] = currentMarketIndex;\n\n syntheticToken_priceSnapshot[marketIndex][true][\n currentMarketIndex\n ] = syntheticTokenPrice_inPaymentTokens_long;\n\n syntheticToken_priceSnapshot[marketIndex][false][\n currentMarketIndex\n ] = syntheticTokenPrice_inPaymentTokens_short;\n\n (\n int256 long_changeInMarketValue_inPaymentToken,\n int256 short_changeInMarketValue_inPaymentToken\n ) = _batchConfirmOutstandingPendingActions(\n marketIndex,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short\n );\n\n newLongPoolValue = uint256(\n int256(newLongPoolValue) + long_changeInMarketValue_inPaymentToken\n );\n newShortPoolValue = uint256(\n int256(newShortPoolValue) + short_changeInMarketValue_inPaymentToken\n );\n marketSideValueInPaymentToken[marketIndex][true] = newLongPoolValue;\n marketSideValueInPaymentToken[marketIndex][false] = newShortPoolValue;\n\n IStaker(staker).pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\n marketIndex,\n currentMarketIndex,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short,\n newLongPoolValue,\n newShortPoolValue\n );\n\n emit SystemStateUpdated(\n marketIndex,\n currentMarketIndex,\n newAssetPrice,\n newLongPoolValue,\n newShortPoolValue,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short\n );\n }\n }\n\n /// @notice Updates the state of a market to account for the latest oracle price update.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n function updateSystemState(uint32 marketIndex) external override {\n _updateSystemStateInternal(marketIndex);\n }\n\n /// @notice Updates the state of multiples markets to account for their latest oracle price updates.\n /// @param marketIndexes An array of int32s which uniquely identify markets.\n function updateSystemStateMulti(uint32[] calldata marketIndexes) external override {\n uint256 length = marketIndexes.length;\n for (uint256 i = 0; i < length; i++) {\n _updateSystemStateInternal(marketIndexes[i]);\n }\n }\n\n /*╔═══════════════════════════╗\n ║ DEPOSIT ║\n ╚═══════════════════════════╝*/\n\n /// @notice Transfers payment tokens for a market from msg.sender to this contract.\n /// @dev Tokens are transferred directly to this contract to be deposited by the yield manager in the batch to earn yield.\n /// Since we check the return value of the transferFrom method, all payment tokens we use must conform to the ERC20 standard.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amount Amount of payment tokens in that token's lowest denominationto deposit.\n function _transferPaymentTokensFromUserToYieldManager(uint32 marketIndex, uint256 amount)\n internal\n virtual\n {\n IERC20(paymentTokens[marketIndex]).safeTransferFrom(\n msg.sender,\n yieldManagers[marketIndex],\n amount\n );\n }\n\n /*╔═══════════════════════════╗\n ║ MINT POSITION ║\n ╚═══════════════════════════╝*/\n\n /// @notice Allows users to mint synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\n /// @dev Called by external functions to mint either long or short. If a user mints multiple times before a price update, these are treated as a single mint.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\n /// @param isLong Whether the mint is for a long or short synth.\n function _mintNextPrice(\n uint32 marketIndex,\n uint256 amount,\n bool isLong\n )\n internal\n virtual\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\n gemCollecting\n {\n _transferPaymentTokensFromUserToYieldManager(marketIndex, amount);\n\n batched_amountPaymentToken_deposit[marketIndex][isLong] += amount;\n userNextPrice_paymentToken_depositAmount[marketIndex][isLong][msg.sender] += amount;\n uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1;\n userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex;\n\n emit NextPriceDeposit(marketIndex, isLong, amount, msg.sender, nextUpdateIndex);\n }\n\n /// @notice Allows users to mint long synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external override {\n _mintNextPrice(marketIndex, amount, true);\n }\n\n /// @notice Allows users to mint short synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external override {\n _mintNextPrice(marketIndex, amount, false);\n }\n\n /*╔═══════════════════════════╗\n ║ REDEEM POSITION ║\n ╚═══════════════════════════╝*/\n\n /// @notice Allows users to redeem their synthetic tokens for payment tokens. To prevent front-running these redeems are executed on the next price update from the oracle.\n /// @dev Called by external functions to redeem either long or short. Payment tokens are actually transferred to the user when executeOutstandingNextPriceSettlements is called from a function call by the user.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param tokens_redeem Amount in wei of synth tokens to redeem.\n /// @param isLong Whether this redeem is for a long or short synth.\n function _redeemNextPrice(\n uint32 marketIndex,\n uint256 tokens_redeem,\n bool isLong\n )\n internal\n virtual\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\n gemCollecting\n {\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).transferFrom(\n msg.sender,\n address(this),\n tokens_redeem\n );\n\n userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][msg.sender] += tokens_redeem;\n uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1;\n userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex;\n\n batched_amountSyntheticToken_redeem[marketIndex][isLong] += tokens_redeem;\n\n emit NextPriceRedeem(marketIndex, isLong, tokens_redeem, msg.sender, nextUpdateIndex);\n }\n\n /// @notice Allows users to redeem long synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param tokens_redeem Amount in wei of synth tokens to redeem at the next oracle price.\n function redeemLongNextPrice(uint32 marketIndex, uint256 tokens_redeem) external override {\n _redeemNextPrice(marketIndex, tokens_redeem, true);\n }\n\n /// @notice Allows users to redeem short synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param tokens_redeem Amount in wei of synth tokens to redeem at the next oracle price.\n function redeemShortNextPrice(uint32 marketIndex, uint256 tokens_redeem) external override {\n _redeemNextPrice(marketIndex, tokens_redeem, false);\n }\n\n /*╔═══════════════════════════╗\n ║ SHIFT POSITION ║\n ╚═══════════════════════════╝*/\n\n /// @notice Allows users to shift their position from one side of the market to the other in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\n /// @dev Called by external functions to shift either way. Intended for primary use by Staker.sol\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from the one side to the other at the next oracle price update.\n /// @param isShiftFromLong Whether the token shift is from long to short (true), or short to long (false).\n function shiftPositionNextPrice(\n uint32 marketIndex,\n uint256 amountSyntheticTokensToShift,\n bool isShiftFromLong\n )\n public\n virtual\n override\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\n gemCollecting\n {\n require(\n ISyntheticToken(syntheticTokens[marketIndex][isShiftFromLong]).transferFrom(\n msg.sender,\n address(this),\n amountSyntheticTokensToShift\n )\n );\n\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][\n msg.sender\n ] += amountSyntheticTokensToShift;\n uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1;\n userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex;\n\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][\n isShiftFromLong\n ] += amountSyntheticTokensToShift;\n\n emit NextPriceSyntheticPositionShift(\n marketIndex,\n isShiftFromLong,\n amountSyntheticTokensToShift,\n msg.sender,\n nextUpdateIndex\n );\n }\n\n /// @notice Allows users to shift their position from long to short in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from long to short the next oracle price update.\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\n external\n override\n {\n shiftPositionNextPrice(marketIndex, amountSyntheticTokensToShift, true);\n }\n\n /// @notice Allows users to shift their position from short to long in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from the short to long at the next oracle price update.\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\n external\n override\n {\n shiftPositionNextPrice(marketIndex, amountSyntheticTokensToShift, false);\n }\n\n /*╔════════════════════════════════╗\n ║ NEXT PRICE SETTLEMENTS ║\n ╚════════════════════════════════╝*/\n\n /// @notice Transfers outstanding synth tokens from a next price mint to the user.\n /// @dev The outstanding synths should already be reflected for the user due to balanceOf in SyntheticToken.sol, this just does the accounting.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param user The address of the user for whom to execute the function for.\n /// @param isLong Whether this is for the long or short synth for the market.\n function _executeOutstandingNextPriceMints(\n uint32 marketIndex,\n address user,\n bool isLong\n ) internal virtual {\n uint256 currentPaymentTokenDepositAmount = userNextPrice_paymentToken_depositAmount[\n marketIndex\n ][isLong][user];\n if (currentPaymentTokenDepositAmount > 0) {\n userNextPrice_paymentToken_depositAmount[marketIndex][isLong][user] = 0;\n uint256 amountSyntheticTokensToTransferToUser = _getAmountSyntheticToken(\n currentPaymentTokenDepositAmount,\n syntheticToken_priceSnapshot[marketIndex][isLong][\n userNextPrice_currentUpdateIndex[marketIndex][user]\n ]\n );\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).transfer(\n user,\n amountSyntheticTokensToTransferToUser\n );\n }\n }\n\n /// @notice Transfers outstanding payment tokens from a next price redemption to the user.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param user The address of the user for whom to execute the function for.\n /// @param isLong Whether this is for the long or short synth for the market.\n function _executeOutstandingNextPriceRedeems(\n uint32 marketIndex,\n address user,\n bool isLong\n ) internal virtual {\n uint256 currentSyntheticTokenRedemptions = userNextPrice_syntheticToken_redeemAmount[\n marketIndex\n ][isLong][user];\n if (currentSyntheticTokenRedemptions > 0) {\n userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][user] = 0;\n uint256 amountPaymentToken_toRedeem = _getAmountPaymentToken(\n currentSyntheticTokenRedemptions,\n syntheticToken_priceSnapshot[marketIndex][isLong][\n userNextPrice_currentUpdateIndex[marketIndex][user]\n ]\n );\n\n IYieldManager(yieldManagers[marketIndex]).transferPaymentTokensToUser(\n user,\n amountPaymentToken_toRedeem\n );\n }\n }\n\n /// @notice Transfers outstanding synth tokens from a next price position shift to the user.\n /// @dev The outstanding synths should already be reflected for the user due to balanceOf in SyntheticToken.sol, this just does the accounting.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param user The address of the user for whom to execute the function for.\n /// @param isShiftFromLong Whether the token shift was from long to short (true), or short to long (false).\n function _executeOutstandingNextPriceTokenShifts(\n uint32 marketIndex,\n address user,\n bool isShiftFromLong\n ) internal virtual {\n uint256 syntheticToken_toShiftAwayFrom_marketSide = userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[\n marketIndex\n ][isShiftFromLong][user];\n if (syntheticToken_toShiftAwayFrom_marketSide > 0) {\n uint256 syntheticToken_toShiftTowardsTargetSide = getAmountSyntheticTokenToMintOnTargetSide(\n marketIndex,\n syntheticToken_toShiftAwayFrom_marketSide,\n isShiftFromLong,\n userNextPrice_currentUpdateIndex[marketIndex][user]\n );\n\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][\n user\n ] = 0;\n\n require(\n ISyntheticToken(syntheticTokens[marketIndex][!isShiftFromLong]).transfer(\n user,\n syntheticToken_toShiftTowardsTargetSide\n )\n );\n }\n }\n\n /// @notice After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user.\n /// @dev Once the market has updated for the next price, should be guaranteed (through modifiers) to execute for a user before user initiation of new next price actions.\n /// @param user The address of the user for whom to execute the function.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n function _executeOutstandingNextPriceSettlements(address user, uint32 marketIndex)\n internal\n virtual\n {\n uint256 userCurrentUpdateIndex = userNextPrice_currentUpdateIndex[marketIndex][user];\n if (userCurrentUpdateIndex != 0 && userCurrentUpdateIndex <= marketUpdateIndex[marketIndex]) {\n _executeOutstandingNextPriceMints(marketIndex, user, true);\n _executeOutstandingNextPriceMints(marketIndex, user, false);\n _executeOutstandingNextPriceRedeems(marketIndex, user, true);\n _executeOutstandingNextPriceRedeems(marketIndex, user, false);\n _executeOutstandingNextPriceTokenShifts(marketIndex, user, true);\n _executeOutstandingNextPriceTokenShifts(marketIndex, user, false);\n\n userNextPrice_currentUpdateIndex[marketIndex][user] = 0;\n\n emit ExecuteNextPriceSettlementsUser(user, marketIndex);\n }\n }\n\n /// @notice After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user.\n /// @param user The address of the user for whom to execute the function.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex)\n external\n override\n {\n _executeOutstandingNextPriceSettlements(user, marketIndex);\n }\n\n /// @notice Executes outstanding next price settlements for a user for multiple markets.\n /// @param user The address of the user for whom to execute the function.\n /// @param marketIndexes An array of int32s which each uniquely identify a market.\n function executeOutstandingNextPriceSettlementsUserMulti(\n address user,\n uint32[] memory marketIndexes\n ) external {\n uint256 length = marketIndexes.length;\n for (uint256 i = 0; i < length; i++) {\n _executeOutstandingNextPriceSettlements(user, marketIndexes[i]);\n }\n }\n\n /*╔═══════════════════════════════════════════╗\n ║ BATCHED NEXT PRICE SETTLEMENT ACTIONS ║\n ╚═══════════════════════════════════════════╝*/\n\n /// @notice Either transfers funds from the yield manager to this contract if redeems > deposits,\n /// and vice versa. The yield manager handles depositing and withdrawing the funds from a yield market.\n /// @dev When all batched next price actions are handled the total value in the market can either increase or decrease based on the value of mints and redeems.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param totalPaymentTokenValueChangeForMarket An int256 which indicates the magnitude and direction of the change in market value.\n function _handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\n uint32 marketIndex,\n int256 totalPaymentTokenValueChangeForMarket\n ) internal virtual {\n if (totalPaymentTokenValueChangeForMarket > 0) {\n IYieldManager(yieldManagers[marketIndex]).depositPaymentToken(\n uint256(totalPaymentTokenValueChangeForMarket)\n );\n } else if (totalPaymentTokenValueChangeForMarket < 0) {\n // NB there will be issues here if not enough liquidity exists to withdraw\n // Boolean should be returned from yield manager and think how to appropriately handle this\n IYieldManager(yieldManagers[marketIndex]).removePaymentTokenFromMarket(\n uint256(-totalPaymentTokenValueChangeForMarket)\n );\n }\n }\n\n /// @notice Given a desired change in synth token supply, either mints or burns tokens to achieve that desired change.\n /// @dev When all batched next price actions are executed total supply for a synth can either increase or decrease.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param isLong Whether this function should execute for the long or short synth for the market.\n /// @param changeInSyntheticTokensTotalSupply The amount in wei by which synth token supply should change.\n function _handleChangeInSyntheticTokensTotalSupply(\n uint32 marketIndex,\n bool isLong,\n int256 changeInSyntheticTokensTotalSupply\n ) internal virtual {\n if (changeInSyntheticTokensTotalSupply > 0) {\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).mint(\n address(this),\n uint256(changeInSyntheticTokensTotalSupply)\n );\n } else if (changeInSyntheticTokensTotalSupply < 0) {\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).burn(\n uint256(-changeInSyntheticTokensTotalSupply)\n );\n }\n }\n\n /**\n @notice Performs all batched next price actions on an oracle price update.\n @dev Mints or burns all synthetic tokens for this contract.\n\n After this function is executed all user actions in that batch are confirmed and can be settled individually by\n calling _executeOutstandingNexPriceSettlements for a given user.\n\n The maths here is safe from rounding errors since it always over estimates on the batch with division.\n (as an example (5/3) + (5/3) = 2 but (5+5)/3 = 10/3 = 3, so the batched action would mint one more)\n @param marketIndex An uint32 which uniquely identifies a market.\n @param syntheticTokenPrice_inPaymentTokens_long The long synthetic token price for this oracle price update.\n @param syntheticTokenPrice_inPaymentTokens_short The short synthetic token price for this oracle price update.\n @return long_changeInMarketValue_inPaymentToken The total value change for the long side after all batched actions are executed.\n @return short_changeInMarketValue_inPaymentToken The total value change for the short side after all batched actions are executed.\n */\n function _batchConfirmOutstandingPendingActions(\n uint32 marketIndex,\n uint256 syntheticTokenPrice_inPaymentTokens_long,\n uint256 syntheticTokenPrice_inPaymentTokens_short\n )\n internal\n virtual\n returns (\n int256 long_changeInMarketValue_inPaymentToken,\n int256 short_changeInMarketValue_inPaymentToken\n )\n {\n int256 changeInSupply_syntheticToken_long;\n int256 changeInSupply_syntheticToken_short;\n\n // NOTE: the only reason we are reusing amountForCurrentAction_workingVariable for all actions (redeemLong, redeemShort, mintLong, mintShort, shiftFromLong, shiftFromShort) is to reduce stack usage\n uint256 amountForCurrentAction_workingVariable = batched_amountPaymentToken_deposit[\n marketIndex\n ][true];\n\n // Handle batched deposits LONG\n if (amountForCurrentAction_workingVariable > 0) {\n long_changeInMarketValue_inPaymentToken = int256(amountForCurrentAction_workingVariable);\n\n batched_amountPaymentToken_deposit[marketIndex][true] = 0;\n\n changeInSupply_syntheticToken_long = int256(\n _getAmountSyntheticToken(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_long\n )\n );\n }\n\n // Handle batched deposits SHORT\n amountForCurrentAction_workingVariable = batched_amountPaymentToken_deposit[marketIndex][false];\n if (amountForCurrentAction_workingVariable > 0) {\n short_changeInMarketValue_inPaymentToken = int256(amountForCurrentAction_workingVariable);\n\n batched_amountPaymentToken_deposit[marketIndex][false] = 0;\n\n changeInSupply_syntheticToken_short = int256(\n _getAmountSyntheticToken(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_short\n )\n );\n }\n\n // Handle shift tokens from LONG to SHORT\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_toShiftAwayFrom_marketSide[\n marketIndex\n ][true];\n\n if (amountForCurrentAction_workingVariable > 0) {\n int256 paymentTokenValueChangeForShiftToShort = int256(\n _getAmountPaymentToken(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_long\n )\n );\n\n long_changeInMarketValue_inPaymentToken -= paymentTokenValueChangeForShiftToShort;\n short_changeInMarketValue_inPaymentToken += paymentTokenValueChangeForShiftToShort;\n\n changeInSupply_syntheticToken_long -= int256(amountForCurrentAction_workingVariable);\n changeInSupply_syntheticToken_short += int256(\n _getEquivalentAmountSyntheticTokensOnTargetSide(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short\n )\n );\n\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][true] = 0;\n }\n\n // Handle shift tokens from SHORT to LONG\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_toShiftAwayFrom_marketSide[\n marketIndex\n ][false];\n if (amountForCurrentAction_workingVariable > 0) {\n int256 paymentTokenValueChangeForShiftToLong = int256(\n _getAmountPaymentToken(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_short\n )\n );\n\n short_changeInMarketValue_inPaymentToken -= paymentTokenValueChangeForShiftToLong;\n long_changeInMarketValue_inPaymentToken += paymentTokenValueChangeForShiftToLong;\n\n changeInSupply_syntheticToken_short -= int256(amountForCurrentAction_workingVariable);\n changeInSupply_syntheticToken_long += int256(\n _getEquivalentAmountSyntheticTokensOnTargetSide(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_short,\n syntheticTokenPrice_inPaymentTokens_long\n )\n );\n\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][false] = 0;\n }\n\n // Handle batched redeems LONG\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_redeem[marketIndex][true];\n if (amountForCurrentAction_workingVariable > 0) {\n long_changeInMarketValue_inPaymentToken -= int256(\n _getAmountPaymentToken(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_long\n )\n );\n changeInSupply_syntheticToken_long -= int256(amountForCurrentAction_workingVariable);\n\n batched_amountSyntheticToken_redeem[marketIndex][true] = 0;\n }\n\n // Handle batched redeems SHORT\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_redeem[marketIndex][\n false\n ];\n if (amountForCurrentAction_workingVariable > 0) {\n short_changeInMarketValue_inPaymentToken -= int256(\n _getAmountPaymentToken(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_short\n )\n );\n changeInSupply_syntheticToken_short -= int256(amountForCurrentAction_workingVariable);\n\n batched_amountSyntheticToken_redeem[marketIndex][false] = 0;\n }\n\n // Batch settle payment tokens\n _handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\n marketIndex,\n long_changeInMarketValue_inPaymentToken + short_changeInMarketValue_inPaymentToken\n );\n // Batch settle synthetic tokens\n _handleChangeInSyntheticTokensTotalSupply(\n marketIndex,\n true,\n changeInSupply_syntheticToken_long\n );\n _handleChangeInSyntheticTokensTotalSupply(\n marketIndex,\n false,\n changeInSupply_syntheticToken_short\n );\n }\n}\n" + }, + "contracts/testing/generated/StakerMockable.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\";\nimport \"../../abstract/AccessControlledAndUpgradeable.sol\";\nimport \"../../interfaces/IFloatToken.sol\";\nimport \"../../interfaces/ILongShort.sol\";\nimport \"../../interfaces/IStaker.sol\";\nimport \"../../interfaces/ISyntheticToken.sol\";\nimport \"../../GEMS.sol\";\nimport \"hardhat/console.sol\";\n\nimport \"./StakerForInternalMocking.sol\";\nimport \"../StakerInternalStateSetters.sol\";\n\ncontract StakerMockable is StakerInternalStateSetters {\n StakerForInternalMocking mocker;\n bool shouldUseMock;\n string functionToNotMock;\n\n function setMocker(StakerForInternalMocking _mocker) external {\n mocker = _mocker;\n shouldUseMock = true;\n }\n\n function setFunctionToNotMock(string calldata _functionToNotMock) external {\n functionToNotMock = _functionToNotMock;\n shouldUseMock = true;\n }\n\n function onlyAdminModifierLogicExposed() external {\n return super.onlyAdminModifierLogic();\n }\n\n function onlyAdminModifierLogic() internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"onlyAdminModifierLogic\"))\n ) {\n return mocker.onlyAdminModifierLogicMock();\n } else {\n return super.onlyAdminModifierLogic();\n }\n }\n\n function onlyValidSyntheticModifierLogicExposed(address _synth) external {\n return super.onlyValidSyntheticModifierLogic(_synth);\n }\n\n function onlyValidSyntheticModifierLogic(address _synth) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"onlyValidSyntheticModifierLogic\"))\n ) {\n return mocker.onlyValidSyntheticModifierLogicMock(_synth);\n } else {\n return super.onlyValidSyntheticModifierLogic(_synth);\n }\n }\n\n function onlyLongShortModifierLogicExposed() external {\n return super.onlyLongShortModifierLogic();\n }\n\n function onlyLongShortModifierLogic() internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"onlyLongShortModifierLogic\"))\n ) {\n return mocker.onlyLongShortModifierLogicMock();\n } else {\n return super.onlyLongShortModifierLogic();\n }\n }\n\n function _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShiftsExposed(\n uint32 marketIndex,\n address user\n ) external {\n return\n super._updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\n marketIndex,\n user\n );\n }\n\n function _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\n uint32 marketIndex,\n address user\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(\n abi.encodePacked(\n \"_updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts\"\n )\n )\n ) {\n return\n mocker._updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShiftsMock(\n marketIndex,\n user\n );\n } else {\n return\n super._updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\n marketIndex,\n user\n );\n }\n }\n\n function _changeFloatPercentageExposed(uint256 newFloatPercentage) external {\n return super._changeFloatPercentage(newFloatPercentage);\n }\n\n function _changeFloatPercentage(uint256 newFloatPercentage) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_changeFloatPercentage\"))\n ) {\n return mocker._changeFloatPercentageMock(newFloatPercentage);\n } else {\n return super._changeFloatPercentage(newFloatPercentage);\n }\n }\n\n function _changeUnstakeFeeExposed(uint32 marketIndex, uint256 newMarketUnstakeFee_e18) external {\n return super._changeUnstakeFee(marketIndex, newMarketUnstakeFee_e18);\n }\n\n function _changeUnstakeFee(uint32 marketIndex, uint256 newMarketUnstakeFee_e18)\n internal\n override\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_changeUnstakeFee\"))\n ) {\n return mocker._changeUnstakeFeeMock(marketIndex, newMarketUnstakeFee_e18);\n } else {\n return super._changeUnstakeFee(marketIndex, newMarketUnstakeFee_e18);\n }\n }\n\n function _changeBalanceIncentiveParametersExposed(\n uint32 marketIndex,\n uint256 _balanceIncentiveCurve_exponent,\n int256 _balanceIncentiveCurve_equilibriumOffset,\n uint256 _safeExponentBitShifting\n ) external {\n return\n super._changeBalanceIncentiveParameters(\n marketIndex,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n _safeExponentBitShifting\n );\n }\n\n function _changeBalanceIncentiveParameters(\n uint32 marketIndex,\n uint256 _balanceIncentiveCurve_exponent,\n int256 _balanceIncentiveCurve_equilibriumOffset,\n uint256 _safeExponentBitShifting\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_changeBalanceIncentiveParameters\"))\n ) {\n return\n mocker._changeBalanceIncentiveParametersMock(\n marketIndex,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n _safeExponentBitShifting\n );\n } else {\n return\n super._changeBalanceIncentiveParameters(\n marketIndex,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n _safeExponentBitShifting\n );\n }\n }\n\n function _getMarketLaunchIncentiveParametersExposed(uint32 marketIndex)\n external\n view\n returns (uint256 period, uint256 multiplier)\n {\n return super._getMarketLaunchIncentiveParameters(marketIndex);\n }\n\n function _getMarketLaunchIncentiveParameters(uint32 marketIndex)\n internal\n view\n override\n returns (uint256 period, uint256 multiplier)\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_getMarketLaunchIncentiveParameters\"))\n ) {\n return mocker._getMarketLaunchIncentiveParametersMock(marketIndex);\n } else {\n return super._getMarketLaunchIncentiveParameters(marketIndex);\n }\n }\n\n function _getKValueExposed(uint32 marketIndex) external view returns (uint256) {\n return super._getKValue(marketIndex);\n }\n\n function _getKValue(uint32 marketIndex) internal view override returns (uint256) {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) != keccak256(abi.encodePacked(\"_getKValue\"))\n ) {\n return mocker._getKValueMock(marketIndex);\n } else {\n return super._getKValue(marketIndex);\n }\n }\n\n function _calculateFloatPerSecondExposed(\n uint32 marketIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) external view returns (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) {\n return\n super._calculateFloatPerSecond(marketIndex, longPrice, shortPrice, longValue, shortValue);\n }\n\n function _calculateFloatPerSecond(\n uint32 marketIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) internal view override returns (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_calculateFloatPerSecond\"))\n ) {\n return\n mocker._calculateFloatPerSecondMock(\n marketIndex,\n longPrice,\n shortPrice,\n longValue,\n shortValue\n );\n } else {\n return\n super._calculateFloatPerSecond(marketIndex, longPrice, shortPrice, longValue, shortValue);\n }\n }\n\n function _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshotExposed(\n uint32 marketIndex,\n uint256 previousMarketUpdateIndex\n ) external view returns (uint256 timeDelta) {\n return\n super._calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\n marketIndex,\n previousMarketUpdateIndex\n );\n }\n\n function _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\n uint32 marketIndex,\n uint256 previousMarketUpdateIndex\n ) internal view override returns (uint256 timeDelta) {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(\n abi.encodePacked(\"_calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot\")\n )\n ) {\n return\n mocker._calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshotMock(\n marketIndex,\n previousMarketUpdateIndex\n );\n } else {\n return\n super._calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\n marketIndex,\n previousMarketUpdateIndex\n );\n }\n }\n\n function _calculateNewCumulativeIssuancePerStakedSynthExposed(\n uint32 marketIndex,\n uint256 previousMarketUpdateIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) external view returns (uint256 longCumulativeRates, uint256 shortCumulativeRates) {\n return\n super._calculateNewCumulativeIssuancePerStakedSynth(\n marketIndex,\n previousMarketUpdateIndex,\n longPrice,\n shortPrice,\n longValue,\n shortValue\n );\n }\n\n function _calculateNewCumulativeIssuancePerStakedSynth(\n uint32 marketIndex,\n uint256 previousMarketUpdateIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) internal view override returns (uint256 longCumulativeRates, uint256 shortCumulativeRates) {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_calculateNewCumulativeIssuancePerStakedSynth\"))\n ) {\n return\n mocker._calculateNewCumulativeIssuancePerStakedSynthMock(\n marketIndex,\n previousMarketUpdateIndex,\n longPrice,\n shortPrice,\n longValue,\n shortValue\n );\n } else {\n return\n super._calculateNewCumulativeIssuancePerStakedSynth(\n marketIndex,\n previousMarketUpdateIndex,\n longPrice,\n shortPrice,\n longValue,\n shortValue\n );\n }\n }\n\n function _calculateAccumulatedFloatInRangeExposed(\n uint32 marketIndex,\n uint256 amountStakedLong,\n uint256 amountStakedShort,\n uint256 rewardIndexFrom,\n uint256 rewardIndexTo\n ) external view returns (uint256 floatReward) {\n return\n super._calculateAccumulatedFloatInRange(\n marketIndex,\n amountStakedLong,\n amountStakedShort,\n rewardIndexFrom,\n rewardIndexTo\n );\n }\n\n function _calculateAccumulatedFloatInRange(\n uint32 marketIndex,\n uint256 amountStakedLong,\n uint256 amountStakedShort,\n uint256 rewardIndexFrom,\n uint256 rewardIndexTo\n ) internal view override returns (uint256 floatReward) {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_calculateAccumulatedFloatInRange\"))\n ) {\n return\n mocker._calculateAccumulatedFloatInRangeMock(\n marketIndex,\n amountStakedLong,\n amountStakedShort,\n rewardIndexFrom,\n rewardIndexTo\n );\n } else {\n return\n super._calculateAccumulatedFloatInRange(\n marketIndex,\n amountStakedLong,\n amountStakedShort,\n rewardIndexFrom,\n rewardIndexTo\n );\n }\n }\n\n function _calculateAccumulatedFloatAndExecuteOutstandingShiftsExposed(\n uint32 marketIndex,\n address user\n ) external returns (uint256 floatReward) {\n return super._calculateAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\n }\n\n function _calculateAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user)\n internal\n override\n returns (uint256 floatReward)\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_calculateAccumulatedFloatAndExecuteOutstandingShifts\"))\n ) {\n return mocker._calculateAccumulatedFloatAndExecuteOutstandingShiftsMock(marketIndex, user);\n } else {\n return super._calculateAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\n }\n }\n\n function _mintFloatExposed(address user, uint256 floatToMint) external {\n return super._mintFloat(user, floatToMint);\n }\n\n function _mintFloat(address user, uint256 floatToMint) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) != keccak256(abi.encodePacked(\"_mintFloat\"))\n ) {\n return mocker._mintFloatMock(user, floatToMint);\n } else {\n return super._mintFloat(user, floatToMint);\n }\n }\n\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsExposed(uint32 marketIndex, address user)\n external\n {\n return super._mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\n }\n\n function _mintAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user)\n internal\n override\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_mintAccumulatedFloatAndExecuteOutstandingShifts\"))\n ) {\n return mocker._mintAccumulatedFloatAndExecuteOutstandingShiftsMock(marketIndex, user);\n } else {\n return super._mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\n }\n }\n\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsMultiExposed(\n uint32[] calldata marketIndexes,\n address user\n ) external {\n return super._mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, user);\n }\n\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(\n uint32[] calldata marketIndexes,\n address user\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_mintAccumulatedFloatAndExecuteOutstandingShiftsMulti\"))\n ) {\n return mocker._mintAccumulatedFloatAndExecuteOutstandingShiftsMultiMock(marketIndexes, user);\n } else {\n return super._mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, user);\n }\n }\n\n function _withdrawExposed(\n uint32 marketIndex,\n address token,\n uint256 amount\n ) external {\n return super._withdraw(marketIndex, token, amount);\n }\n\n function _withdraw(\n uint32 marketIndex,\n address token,\n uint256 amount\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) != keccak256(abi.encodePacked(\"_withdraw\"))\n ) {\n return mocker._withdrawMock(marketIndex, token, amount);\n } else {\n return super._withdraw(marketIndex, token, amount);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../extensions/ERC20BurnableUpgradeable.sol\";\nimport \"../extensions/ERC20PausableUpgradeable.sol\";\nimport \"../../../access/AccessControlEnumerableUpgradeable.sol\";\nimport \"../../../utils/ContextUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev {ERC20} token, including:\n *\n * - ability for holders to burn (destroy) their tokens\n * - a minter role that allows for token minting (creation)\n * - a pauser role that allows to stop all token transfers\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlEnumerableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable {\n function initialize(string memory name, string memory symbol) public virtual initializer {\n __ERC20PresetMinterPauser_init(name, symbol);\n }\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n /**\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\n * account that deploys the contract.\n *\n * See {ERC20-constructor}.\n */\n function __ERC20PresetMinterPauser_init(string memory name, string memory symbol) internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n __AccessControlEnumerable_init_unchained();\n __ERC20_init_unchained(name, symbol);\n __ERC20Burnable_init_unchained();\n __Pausable_init_unchained();\n __ERC20Pausable_init_unchained();\n __ERC20PresetMinterPauser_init_unchained(name, symbol);\n }\n\n function __ERC20PresetMinterPauser_init_unchained(string memory name, string memory symbol) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n _setupRole(MINTER_ROLE, _msgSender());\n _setupRole(PAUSER_ROLE, _msgSender());\n }\n\n /**\n * @dev Creates `amount` new tokens for `to`.\n *\n * See {ERC20-_mint}.\n *\n * Requirements:\n *\n * - the caller must have the `MINTER_ROLE`.\n */\n function mint(address to, uint256 amount) public virtual {\n require(hasRole(MINTER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have minter role to mint\");\n _mint(to, amount);\n }\n\n /**\n * @dev Pauses all token transfers.\n *\n * See {ERC20Pausable} and {Pausable-_pause}.\n *\n * Requirements:\n *\n * - the caller must have the `PAUSER_ROLE`.\n */\n function pause() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to pause\");\n _pause();\n }\n\n /**\n * @dev Unpauses all token transfers.\n *\n * See {ERC20Pausable} and {Pausable-_unpause}.\n *\n * Requirements:\n *\n * - the caller must have the `PAUSER_ROLE`.\n */\n function unpause() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to unpause\");\n _unpause();\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override(ERC20Upgradeable, ERC20PausableUpgradeable) {\n super._beforeTokenTransfer(from, to, amount);\n }\n uint256[50] private __gap;\n}\n" + }, + "contracts/interfaces/IFloatToken.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\ninterface IFloatToken {\n function mint(address to, uint256 amount) external;\n\n function transfer(address, uint256) external returns (bool);\n\n function totalSupply() external view returns (uint256);\n\n function burnFrom(address account, uint256 amount) external virtual;\n}\n" + }, + "contracts/testing/generated/StakerForInternalMocking.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.3;\n\nimport \"./StakerMockable.sol\";\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\";\nimport \"../../abstract/AccessControlledAndUpgradeable.sol\";\nimport \"../../interfaces/IFloatToken.sol\";\nimport \"../../interfaces/ILongShort.sol\";\nimport \"../../interfaces/IStaker.sol\";\nimport \"../../interfaces/ISyntheticToken.sol\";\nimport \"../../GEMS.sol\";\nimport \"hardhat/console.sol\";\n\ncontract StakerForInternalMocking {\n function onlyAdminModifierLogicMock() public pure {\n return ();\n }\n\n function onlyValidSyntheticModifierLogicMock(address) public pure {\n return ();\n }\n\n function onlyLongShortModifierLogicMock() public pure {\n return ();\n }\n\n function _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShiftsMock(\n uint32,\n address\n ) public pure {\n return ();\n }\n\n function initializeMock(\n address,\n address,\n address,\n address,\n address,\n address,\n uint256,\n address\n ) public pure {\n return ();\n }\n\n function _changeFloatPercentageMock(uint256) public pure {\n return ();\n }\n\n function _changeUnstakeFeeMock(uint32, uint256) public pure {\n return ();\n }\n\n function _changeBalanceIncentiveParametersMock(\n uint32,\n uint256,\n int256,\n uint256\n ) public pure {\n return ();\n }\n\n function _getMarketLaunchIncentiveParametersMock(uint32)\n public\n pure\n returns (uint256 period, uint256 multiplier)\n {\n return (abi.decode(\"\", (uint256)), abi.decode(\"\", (uint256)));\n }\n\n function _getKValueMock(uint32) public pure returns (uint256) {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _calculateFloatPerSecondMock(\n uint32,\n uint256,\n uint256,\n uint256,\n uint256\n ) public pure returns (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) {\n return (abi.decode(\"\", (uint256)), abi.decode(\"\", (uint256)));\n }\n\n function _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshotMock(\n uint32,\n uint256\n ) public pure returns (uint256 timeDelta) {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _calculateNewCumulativeIssuancePerStakedSynthMock(\n uint32,\n uint256,\n uint256,\n uint256,\n uint256,\n uint256\n ) public pure returns (uint256 longCumulativeRates, uint256 shortCumulativeRates) {\n return (abi.decode(\"\", (uint256)), abi.decode(\"\", (uint256)));\n }\n\n function _calculateAccumulatedFloatInRangeMock(\n uint32,\n uint256,\n uint256,\n uint256,\n uint256\n ) public pure returns (uint256 floatReward) {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _calculateAccumulatedFloatAndExecuteOutstandingShiftsMock(uint32, address)\n public\n pure\n returns (uint256 floatReward)\n {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _mintFloatMock(address, uint256) public pure {\n return ();\n }\n\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsMock(uint32, address) public pure {\n return ();\n }\n\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsMultiMock(uint32[] memory, address)\n public\n pure\n {\n return ();\n }\n\n function stakeFromUserMock(address, uint256) public pure {\n return ();\n }\n\n function shiftTokensMock(\n uint256,\n uint32,\n bool\n ) public pure {\n return ();\n }\n\n function _withdrawMock(\n uint32,\n address,\n uint256\n ) public pure {\n return ();\n }\n}\n" + }, + "contracts/testing/StakerInternalStateSetters.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"../Staker.sol\";\n\n/*\nNOTE: This contract is for testing purposes only!\n*/\n\ncontract StakerInternalStateSetters is Staker {\n ///////////////////////////////////////////////\n //////////// Test Helper Functions ////////////\n ///////////////////////////////////////////////\n // TODO: remove parts of this function that aren't necessary for the updated `_calculateAccumulatedFloat` funciton\n function setFloatRewardCalcParams(\n uint32 marketIndex,\n address longToken,\n address shortToken,\n uint256 newLatestRewardIndex,\n address user,\n uint256 usersLatestClaimedReward,\n uint256 accumulativeFloatPerTokenLatestLong,\n uint256 accumulativeFloatPerTokenLatestShort,\n uint256 accumulativeFloatPerTokenUserLong,\n uint256 accumulativeFloatPerTokenUserShort,\n uint256 newUserAmountStakedLong,\n uint256 newUserAmountStakedShort\n ) public {\n latestRewardIndex[marketIndex] = newLatestRewardIndex;\n userIndexOfLastClaimedReward[marketIndex][user] = usersLatestClaimedReward;\n syntheticTokens[marketIndex][true] = longToken;\n syntheticTokens[marketIndex][false] = shortToken;\n\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][newLatestRewardIndex]\n .accumulativeFloatPerSyntheticToken_long = accumulativeFloatPerTokenLatestLong;\n\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][usersLatestClaimedReward]\n .accumulativeFloatPerSyntheticToken_long = accumulativeFloatPerTokenUserLong;\n\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][newLatestRewardIndex]\n .accumulativeFloatPerSyntheticToken_short = accumulativeFloatPerTokenLatestShort;\n\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][usersLatestClaimedReward]\n .accumulativeFloatPerSyntheticToken_short = accumulativeFloatPerTokenUserShort;\n\n userAmountStaked[longToken][user] = newUserAmountStakedLong;\n userAmountStaked[shortToken][user] = newUserAmountStakedShort;\n }\n\n function setCalculateAccumulatedFloatInRangeGlobals(\n uint32 marketIndex,\n uint256 rewardIndexTo,\n uint256 rewardIndexFrom,\n uint256 syntheticRewardToLongToken,\n uint256 syntheticRewardFromLongToken,\n uint256 syntheticRewardToShortToken,\n uint256 syntheticRewardFromShortToken\n ) public {\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexTo]\n .accumulativeFloatPerSyntheticToken_long = syntheticRewardToLongToken;\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexTo]\n .accumulativeFloatPerSyntheticToken_short = syntheticRewardToShortToken;\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom]\n .accumulativeFloatPerSyntheticToken_long = syntheticRewardFromLongToken;\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom]\n .accumulativeFloatPerSyntheticToken_short = syntheticRewardFromShortToken;\n }\n\n function setShiftParams(\n uint32 marketIndex,\n address user,\n uint256 shiftAmountLong,\n uint256 shiftAmountShort,\n uint256 _userNextPrice_stakedActionIndex,\n uint256 _latestRewardIndex\n ) public {\n userNextPrice_stakedActionIndex[marketIndex][user] = _userNextPrice_stakedActionIndex;\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][\n user\n ] = shiftAmountLong;\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][\n user\n ] = shiftAmountShort;\n\n latestRewardIndex[marketIndex] = _latestRewardIndex;\n }\n\n function setShiftTokensParams(\n uint32 marketIndex,\n bool isShiftFromLong,\n address user,\n uint256 amountSyntheticTokensToShift,\n uint256 _userAmountStaked,\n uint256 _userNextPrice_stakedActionIndex,\n uint256 _latestRewardIndex,\n address syntheticToken\n ) public {\n userNextPrice_stakedActionIndex[marketIndex][user] = _userNextPrice_stakedActionIndex;\n latestRewardIndex[marketIndex] = _latestRewardIndex;\n\n if (isShiftFromLong) {\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][\n user\n ] = amountSyntheticTokensToShift;\n } else {\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][\n user\n ] = amountSyntheticTokensToShift;\n }\n\n syntheticTokens[marketIndex][isShiftFromLong] = syntheticToken;\n userAmountStaked[syntheticToken][user] = _userAmountStaked;\n }\n\n function setLongShort(address _longShort) public {\n longShort = _longShort;\n }\n\n function setLatestRewardIndexGlobals(uint32 marketIndex, uint256 _latestRewardIndex) external {\n latestRewardIndex[marketIndex] = _latestRewardIndex;\n }\n\n function setGetMarketLaunchIncentiveParametersParams(\n uint32 marketIndex,\n uint256 period,\n uint256 multiplier\n ) external {\n marketLaunchIncentive_period[marketIndex] = period;\n marketLaunchIncentive_multipliers[marketIndex] = multiplier;\n }\n\n function setGetKValueParams(uint32 marketIndex, uint256 timestamp) external {\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0].timestamp = timestamp;\n }\n\n function setStakeFromUserParams(\n address longshort,\n address token,\n uint32 marketIndexForToken,\n address user,\n uint256 _latestRewardIndex,\n uint256 _userAmountStaked,\n uint256 userLastRewardIndex\n ) external {\n latestRewardIndex[marketIndexForToken] = _latestRewardIndex;\n userAmountStaked[token][user] = _userAmountStaked;\n userIndexOfLastClaimedReward[marketIndexForToken][user] = userLastRewardIndex;\n\n longShort = address(longshort);\n marketIndexOfToken[token] = marketIndexForToken;\n }\n\n function setCalculateTimeDeltaParams(\n uint32 marketIndex,\n uint256 latestRewardIndexForMarket,\n uint256 timestamp\n ) external {\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][latestRewardIndexForMarket]\n .timestamp = timestamp;\n }\n\n function setCalculateNewCumulativeRateParams(\n uint32 marketIndex,\n uint256 latestRewardIndexForMarket,\n uint256 accumFloatLong,\n uint256 accumFloatShort\n ) external {\n latestRewardIndex[marketIndex] = latestRewardIndexForMarket;\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][latestRewardIndex[marketIndex]]\n .accumulativeFloatPerSyntheticToken_long = accumFloatLong;\n\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][latestRewardIndex[marketIndex]]\n .accumulativeFloatPerSyntheticToken_short = accumFloatShort;\n }\n\n function setSetRewardObjectsParams(uint32 marketIndex, uint256 latestRewardIndexForMarket)\n external\n {\n latestRewardIndex[marketIndex] = latestRewardIndexForMarket;\n }\n\n function set_updateStateParams(\n address _longShort,\n address token,\n uint32 tokenMarketIndex\n ) public {\n longShort = _longShort;\n marketIndexOfToken[token] = tokenMarketIndex;\n }\n\n function set_mintFloatParams(address _floatToken, uint16 _floatPercentage) public {\n floatToken = _floatToken;\n floatPercentage = _floatPercentage;\n }\n\n function setMintAccumulatedFloatAndClaimFloatParams(\n uint32 marketIndex,\n uint256 latestRewardIndexForMarket\n ) public {\n latestRewardIndex[marketIndex] = latestRewardIndexForMarket;\n }\n\n function set_withdrawGlobals(\n uint32 marketIndex,\n address syntheticToken,\n address user,\n uint256 amountStaked,\n uint256 fees,\n address treasury\n ) external {\n marketIndexOfToken[syntheticToken] = marketIndex;\n marketUnstakeFee_e18[marketIndex] = fees;\n userAmountStaked[syntheticToken][user] = amountStaked;\n floatTreasury = treasury;\n }\n\n function setWithdrawGlobals(\n uint32 marketIndex,\n address _longShort,\n address token\n ) external {\n marketIndexOfToken[token] = marketIndex;\n longShort = _longShort;\n }\n\n function setWithdrawAllGlobals(\n uint32 marketIndex,\n address _longShort,\n address user,\n uint256 amountStaked,\n address token,\n uint256 _userNextPrice_stakedActionIndex,\n address _syntheticTokens,\n uint256 _userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_long,\n uint256 _userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_short\n ) external {\n marketIndexOfToken[token] = marketIndex;\n longShort = _longShort;\n userAmountStaked[token][user] = amountStaked;\n userNextPrice_stakedActionIndex[marketIndex][user] = _userNextPrice_stakedActionIndex;\n syntheticTokens[marketIndex][true] = _syntheticTokens;\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][\n user\n ] = _userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_long;\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][\n user\n ] = _userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_short;\n }\n\n function setEquilibriumOffset(uint32 marketIndex, int256 _balanceIncentiveCurve_equilibriumOffset)\n external\n {\n balanceIncentiveCurve_equilibriumOffset[marketIndex] = _balanceIncentiveCurve_equilibriumOffset;\n }\n\n ///////////////////////////////////////////////////////\n //////////// Functions for Experimentation ////////////\n ///////////////////////////////////////////////////////\n\n function getRequiredAmountOfBitShiftForSafeExponentiationPerfect(uint256 number, uint256 exponent)\n external\n pure\n returns (uint256 amountOfBitShiftRequired)\n {\n uint256 targetMaxNumberSizeBinaryDigits = 257 / exponent;\n\n // Note this can be optimised, this gets a quick easy to compute safe upper bound, not the actuall upper bound.\n uint256 targetMaxNumber = 2**targetMaxNumberSizeBinaryDigits;\n\n while (number >> amountOfBitShiftRequired > targetMaxNumber) {\n ++amountOfBitShiftRequired;\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\n __Context_init_unchained();\n __ERC20_init_unchained(name_, symbol_);\n }\n\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n uint256[45] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/ContextUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\n * tokens and those that they have an allowance for, in a way that can be\n * recognized off-chain (via event analysis).\n */\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\n function __ERC20Burnable_init() internal initializer {\n __Context_init_unchained();\n __ERC20Burnable_init_unchained();\n }\n\n function __ERC20Burnable_init_unchained() internal initializer {\n }\n /**\n * @dev Destroys `amount` tokens from the caller.\n *\n * See {ERC20-_burn}.\n */\n function burn(uint256 amount) public virtual {\n _burn(_msgSender(), amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\n * allowance.\n *\n * See {ERC20-_burn} and {ERC20-allowance}.\n *\n * Requirements:\n *\n * - the caller must have allowance for ``accounts``'s tokens of at least\n * `amount`.\n */\n function burnFrom(address account, uint256 amount) public virtual {\n uint256 currentAllowance = allowance(account, _msgSender());\n require(currentAllowance >= amount, \"ERC20: burn amount exceeds allowance\");\n unchecked {\n _approve(account, _msgSender(), currentAllowance - amount);\n }\n _burn(account, amount);\n }\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../security/PausableUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev ERC20 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n */\nabstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable {\n function __ERC20Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n __ERC20Pausable_init_unchained();\n }\n\n function __ERC20Pausable_init_unchained() internal initializer {\n }\n /**\n * @dev See {ERC20-_beforeTokenTransfer}.\n *\n * Requirements:\n *\n * - the contract must not be paused.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n require(!paused(), \"ERC20Pausable: token transfer while paused\");\n }\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlEnumerableUpgradeable.sol\";\nimport \"./AccessControlUpgradeable.sol\";\nimport \"../utils/structs/EnumerableSetUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\n */\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\n function __AccessControlEnumerable_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n __AccessControlEnumerable_init_unchained();\n }\n\n function __AccessControlEnumerable_init_unchained() internal initializer {\n }\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\n\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {\n return _roleMembers[role].at(index);\n }\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) public view override returns (uint256) {\n return _roleMembers[role].length();\n }\n\n /**\n * @dev Overload {grantRole} to track enumerable memberships\n */\n function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\n super.grantRole(role, account);\n _roleMembers[role].add(account);\n }\n\n /**\n * @dev Overload {revokeRole} to track enumerable memberships\n */\n function revokeRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\n super.revokeRole(role, account);\n _roleMembers[role].remove(account);\n }\n\n /**\n * @dev Overload {renounceRole} to track enumerable memberships\n */\n function renounceRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\n super.renounceRole(role, account);\n _roleMembers[role].remove(account);\n }\n\n /**\n * @dev Overload {_setupRole} to track enumerable memberships\n */\n function _setupRole(bytes32 role, address account) internal virtual override {\n super._setupRole(role, account);\n _roleMembers[role].add(account);\n }\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n require(!paused(), \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n require(paused(), \"Pausable: not paused\");\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\n\n/**\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\n */\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n */\nlibrary EnumerableSetUpgradeable {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastvalue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastvalue;\n // Update the index for the moved value\n set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n return _values(set._inner);\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "contracts/Staker.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\";\n\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\n\nimport \"./interfaces/IFloatToken.sol\";\nimport \"./interfaces/ILongShort.sol\";\nimport \"./interfaces/IStaker.sol\";\nimport \"./interfaces/ISyntheticToken.sol\";\nimport \"./GEMS.sol\";\nimport \"hardhat/console.sol\";\n\ncontract Staker is IStaker, AccessControlledAndUpgradeable {\n /*╔═════════════════════════════╗\n ║ VARIABLES ║\n ╚═════════════════════════════╝*/\n\n bytes32 public constant DISCOUNT_ROLE = keccak256(\"DISCOUNT_ROLE\");\n\n /* ══════ Fixed-precision constants ══════ */\n uint256 public constant FLOAT_ISSUANCE_FIXED_DECIMAL = 3e44;\n\n /* ══════ Global state ══════ */\n address public floatCapital;\n address public floatTreasury;\n uint256 public floatPercentage;\n\n address public longShort;\n address public floatToken;\n\n address public gems;\n uint256[45] private __globalStateGap;\n\n /* ══════ Market specific ══════ */\n mapping(uint32 => uint256) public marketLaunchIncentive_period; // seconds\n mapping(uint32 => uint256) public marketLaunchIncentive_multipliers; // e18 scale\n mapping(uint32 => uint256) public marketUnstakeFee_e18;\n mapping(uint32 => uint256) public balanceIncentiveCurve_exponent;\n mapping(uint32 => int256) public balanceIncentiveCurve_equilibriumOffset;\n mapping(uint32 => uint256) public safeExponentBitShifting;\n\n mapping(uint32 => mapping(bool => address)) public syntheticTokens;\n uint256[45] private __marketStateGap;\n\n mapping(address => uint32) public marketIndexOfToken;\n mapping(address => uint32) public userNonce;\n uint256[45] private __synthStateGap;\n\n /* ══════ Reward specific ══════ */\n mapping(uint32 => uint256) public latestRewardIndex; // This is synced to be the same as LongShort\n mapping(uint32 => mapping(uint256 => AccumulativeIssuancePerStakedSynthSnapshot))\n public accumulativeFloatPerSyntheticTokenSnapshots;\n struct AccumulativeIssuancePerStakedSynthSnapshot {\n uint256 timestamp;\n uint256 accumulativeFloatPerSyntheticToken_long;\n uint256 accumulativeFloatPerSyntheticToken_short;\n }\n\n uint256[45] private __rewardStateGap;\n /* ══════ User specific ══════ */\n mapping(uint32 => mapping(address => uint256)) public userIndexOfLastClaimedReward;\n mapping(address => mapping(address => uint256)) public override userAmountStaked;\n uint256[45] private __userStateGap;\n\n /* ══════ Next price action management specific ══════ */\n /// @dev marketIndex => usersAddress => stakedActionIndex\n mapping(uint32 => mapping(address => uint256)) public userNextPrice_stakedActionIndex;\n\n /// @dev marketIndex => usersAddress => amountUserRequestedToShiftAwayFromLongOnNextUpdate\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\n public userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom;\n\n /// @dev marketIndex => usersAddress => stakedActionIndex\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\n public userNextPrice_paymentToken_depositAmount;\n\n /*╔═════════════════════════════╗\n ║ MODIFIERS ║\n ╚═════════════════════════════╝*/\n\n function onlyAdminModifierLogic() internal virtual {\n _checkRole(ADMIN_ROLE, msg.sender);\n }\n\n modifier onlyAdmin() {\n onlyAdminModifierLogic();\n _;\n }\n\n function onlyValidSyntheticModifierLogic(address _synth) internal virtual {\n require(marketIndexOfToken[_synth] != 0, \"not valid synth\");\n }\n\n modifier onlyValidSynthetic(address _synth) {\n onlyValidSyntheticModifierLogic(_synth);\n _;\n }\n\n function onlyLongShortModifierLogic() internal virtual {\n require(msg.sender == address(longShort), \"not LongShort\");\n }\n\n modifier onlyLongShort() {\n onlyLongShortModifierLogic();\n _;\n }\n\n function _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\n uint32 marketIndex,\n address user\n ) internal virtual {\n if (\n userNextPrice_stakedActionIndex[marketIndex][msg.sender] != 0 &&\n userNextPrice_stakedActionIndex[marketIndex][msg.sender] <= latestRewardIndex[marketIndex]\n ) {\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender);\n }\n }\n\n modifier updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\n uint32 marketIndex,\n address user\n ) {\n _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\n _;\n }\n\n modifier gemCollecting(address user) {\n GEMS(gems).gm(user);\n _;\n }\n\n /*╔═════════════════════════════╗\n ║ CONTRACT SET-UP ║\n ╚═════════════════════════════╝*/\n\n /**\n @notice Initializes the contract.\n @dev Calls OpenZeppelin's initializer modifier.\n @param _admin Address of the admin role.\n @param _longShort Address of the LongShort contract, a deployed LongShort.sol\n @param _floatToken Address of the Float token earned by staking.\n @param _floatTreasury Address of the treasury contract for managing fees.\n @param _floatCapital Address of the contract which earns a fixed percentage of Float.\n @param _floatPercentage Determines the float percentage that gets minted for Float Capital, base 1e18.\n */\n function initialize(\n address _admin,\n address _longShort,\n address _floatToken,\n address _floatTreasury,\n address _floatCapital,\n address _discountSigner,\n uint256 _floatPercentage,\n address _gems\n ) external virtual initializer {\n require(\n _admin != address(0) &&\n _longShort != address(0) &&\n _floatToken != address(0) &&\n _floatTreasury != address(0) &&\n _floatCapital != address(0) &&\n _gems != address(0) &&\n _floatPercentage != 0\n );\n\n floatCapital = _floatCapital;\n floatTreasury = _floatTreasury;\n longShort = _longShort;\n floatToken = _floatToken;\n gems = _gems;\n\n _AccessControlledAndUpgradeable_init(_admin);\n _setupRole(DISCOUNT_ROLE, _discountSigner);\n\n _changeFloatPercentage(_floatPercentage);\n\n emit StakerV1(_admin, _floatTreasury, _floatCapital, _floatToken, _floatPercentage);\n }\n\n /*╔═══════════════════╗\n ║ ADMIN ║\n ╚═══════════════════╝*/\n\n /// @dev Logic for changeFloatPercentage\n function _changeFloatPercentage(uint256 newFloatPercentage) internal virtual {\n require(newFloatPercentage <= 1e18 && newFloatPercentage > 0); // less than or equal to 100% and greater than 0%\n floatPercentage = newFloatPercentage;\n }\n\n /**\n @notice Changes percentage of float that is minted for float capital.\n @param newFloatPercentage The new float percentage in base 1e18.\n */\n function changeFloatPercentage(uint256 newFloatPercentage) external onlyAdmin {\n _changeFloatPercentage(newFloatPercentage);\n emit FloatPercentageUpdated(newFloatPercentage);\n }\n\n /// @dev Logic for changeUnstakeFee\n function _changeUnstakeFee(uint32 marketIndex, uint256 newMarketUnstakeFee_e18) internal virtual {\n require(newMarketUnstakeFee_e18 <= 5e16); // Explicitly stating 5% fee as the max fee possible.\n marketUnstakeFee_e18[marketIndex] = newMarketUnstakeFee_e18;\n }\n\n /**\n @notice Changes unstake fee for a market\n @param marketIndex Identifies the market.\n @param newMarketUnstakeFee_e18 The new unstake fee.\n */\n function changeUnstakeFee(uint32 marketIndex, uint256 newMarketUnstakeFee_e18)\n external\n onlyAdmin\n {\n _changeUnstakeFee(marketIndex, newMarketUnstakeFee_e18);\n emit StakeWithdrawalFeeUpdated(marketIndex, newMarketUnstakeFee_e18);\n }\n\n /// @dev Logic for changeBalanceIncentiveExponent\n function _changeBalanceIncentiveParameters(\n uint32 marketIndex,\n uint256 _balanceIncentiveCurve_exponent,\n int256 _balanceIncentiveCurve_equilibriumOffset,\n uint256 _safeExponentBitShifting\n ) internal virtual {\n // Unreasonable that we would ever shift this more than 90% either way\n require(\n _balanceIncentiveCurve_equilibriumOffset > -9e17 &&\n _balanceIncentiveCurve_equilibriumOffset < 9e17,\n \"balanceIncentiveCurve_equilibriumOffset out of bounds\"\n );\n require(_balanceIncentiveCurve_exponent > 0, \"balanceIncentiveCurve_exponent out of bounds\");\n require(_safeExponentBitShifting < 100, \"safeExponentBitShifting out of bounds\");\n\n uint256 totalLocked = ILongShort(longShort).marketSideValueInPaymentToken(marketIndex, true) +\n ILongShort(longShort).marketSideValueInPaymentToken(marketIndex, false);\n\n // SafeMATH will revert here if this value is too big.\n (((totalLocked * 500) >> _safeExponentBitShifting)**_balanceIncentiveCurve_exponent);\n // Required to ensure at least 3 digits of precision.\n require(\n totalLocked >> _safeExponentBitShifting > 100,\n \"bit shifting too lange for total locked\"\n );\n\n balanceIncentiveCurve_exponent[marketIndex] = _balanceIncentiveCurve_exponent;\n balanceIncentiveCurve_equilibriumOffset[marketIndex] = _balanceIncentiveCurve_equilibriumOffset;\n safeExponentBitShifting[marketIndex] = _safeExponentBitShifting;\n }\n\n /**\n @notice Changes the balance incentive exponent for a market\n @param marketIndex Identifies the market.\n @param _balanceIncentiveCurve_exponent The new exponent for the curve.\n @param _balanceIncentiveCurve_equilibriumOffset The new offset.\n @param _safeExponentBitShifting The new bitshifting applied to the curve.\n */\n function changeBalanceIncentiveParameters(\n uint32 marketIndex,\n uint256 _balanceIncentiveCurve_exponent,\n int256 _balanceIncentiveCurve_equilibriumOffset,\n uint256 _safeExponentBitShifting\n ) external onlyAdmin {\n _changeBalanceIncentiveParameters(\n marketIndex,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n _safeExponentBitShifting\n );\n\n emit BalanceIncentiveParamsUpdated(\n marketIndex,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n _safeExponentBitShifting\n );\n }\n\n /*╔═════════════════════════════╗\n ║ STAKING SETUP ║\n ╚═════════════════════════════╝*/\n\n /**\n @notice Sets this contract to track staking for a market in LongShort.sol\n @param marketIndex Identifies the market.\n @param longToken Address of the long token for the market.\n @param shortToken Address of the short token for the market.\n @param kInitialMultiplier Initial boost on float generation for the market.\n @param kPeriod Period which the boost should last.\n @param unstakeFee_e18 Percentage of tokens that are levied on unstaking in base 1e18.\n @param _balanceIncentiveCurve_exponent Exponent for balance curve (see _calculateFloatPerSecond)\n @param _balanceIncentiveCurve_equilibriumOffset Offset for balance curve (see _calculateFloatPerSecond)\n */\n function addNewStakingFund(\n uint32 marketIndex,\n address longToken,\n address shortToken,\n uint256 kInitialMultiplier,\n uint256 kPeriod,\n uint256 unstakeFee_e18,\n uint256 _balanceIncentiveCurve_exponent,\n int256 _balanceIncentiveCurve_equilibriumOffset\n ) external override onlyLongShort {\n require(kInitialMultiplier >= 1e18, \"kInitialMultiplier must be >= 1e18\");\n\n // a safe initial default value\n uint256 initialSafeExponentBitShifting = 50;\n\n marketIndexOfToken[longToken] = marketIndex;\n marketIndexOfToken[shortToken] = marketIndex;\n\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0].timestamp = block.timestamp;\n\n syntheticTokens[marketIndex][true] = longToken;\n syntheticTokens[marketIndex][false] = shortToken;\n _changeBalanceIncentiveParameters(\n marketIndex,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n initialSafeExponentBitShifting\n );\n\n marketLaunchIncentive_period[marketIndex] = kPeriod;\n marketLaunchIncentive_multipliers[marketIndex] = kInitialMultiplier;\n\n _changeUnstakeFee(marketIndex, unstakeFee_e18);\n\n emit MarketAddedToStaker(\n marketIndex,\n unstakeFee_e18,\n kPeriod,\n kInitialMultiplier,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n initialSafeExponentBitShifting\n );\n\n emit AccumulativeIssuancePerStakedSynthSnapshotCreated(marketIndex, 0, 0, 0);\n }\n\n /*╔═════════════════════════════════════════════════════════════════════════╗\n ║ GLOBAL FLT REWARD ACCUMULATION CALCULATION AND TRACKING FUNCTIONS ║\n ╚═════════════════════════════════════════════════════════════════════════╝*/\n\n /**\n @notice Returns the K factor parameters for the given market with sensible\n defaults if they haven't been set yet.\n @param marketIndex The market to change the parameters for.\n @return period The period for which the k factor applies for in seconds.\n @return multiplier The multiplier on Float generation in this period.\n */\n function _getMarketLaunchIncentiveParameters(uint32 marketIndex)\n internal\n view\n virtual\n returns (uint256 period, uint256 multiplier)\n {\n period = marketLaunchIncentive_period[marketIndex]; // seconds TODO change name to contain seconds\n multiplier = marketLaunchIncentive_multipliers[marketIndex]; // 1e18 TODO change name to contain E18\n\n if (multiplier < 1e18) {\n multiplier = 1e18; // multiplier of 1 by default\n }\n }\n\n /**\n @notice Returns the extent to which a markets float generation should be adjusted\n based on the market's launch incentive parameters. Should start at multiplier\n then linearly change to 1e18 over time.\n @param marketIndex Identifies the market.\n @return k The calculated modifier for float generation.\n */\n function _getKValue(uint32 marketIndex) internal view virtual returns (uint256) {\n // Parameters controlling the float issuance multiplier.\n (uint256 kPeriod, uint256 kInitialMultiplier) = _getMarketLaunchIncentiveParameters(\n marketIndex\n );\n\n // Sanity check - under normal circumstances, the multipliers should\n // *never* be set to a value < 1e18, as there are guards against this.\n assert(kInitialMultiplier >= 1e18);\n\n uint256 initialTimestamp = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0]\n .timestamp;\n\n if (block.timestamp - initialTimestamp < kPeriod) {\n return\n kInitialMultiplier -\n (((kInitialMultiplier - 1e18) * (block.timestamp - initialTimestamp)) / kPeriod);\n } else {\n return 1e18;\n }\n }\n\n /*\n @notice Computes the number of float tokens a user earns per second for\n every long/short synthetic token they've staked. The returned value has\n a fixed decimal scale of 1e42 (!!!) for numerical stability. The return\n values are float per second per synthetic token (hence the requirement\n to multiply by price)\n @dev to see below math in latex form see:\n https://ipfs.io/ipfs/QmRWbr8P1F588XqRTzm7wCsRPu8DcDVPWGriBach4f22Fq/staker-fps.pdf\n to interact with the equations see https://www.desmos.com/calculator/optkaxyihr\n @param marketIndex The market referred to.\n @param longPrice Price of the synthetic long token in units of payment token\n @param shortPrice Price of the synthetic short token in units of payment token\n @param longValue Amount of payment token in the long side of the market\n @param shortValue Amount of payment token in the short side of the market\n @return longFloatPerSecond Float token per second per long synthetic token\n @return shortFloatPerSecond Float token per second per short synthetic token\n */\n function _calculateFloatPerSecond(\n uint32 marketIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) internal view virtual returns (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) {\n // A float issuance multiplier that starts high and decreases linearly\n // over time to a value of 1. This incentivises users to stake early.\n uint256 k = _getKValue(marketIndex);\n\n uint256 totalLocked = (longValue + shortValue);\n\n // we need to scale this number by the totalLocked so that the offset remains consistent accross market size\n\n int256 equilibriumOffsetMarketScaled = (balanceIncentiveCurve_equilibriumOffset[marketIndex] *\n int256(totalLocked)) / 2e18;\n\n uint256 safetyBitShifting = safeExponentBitShifting[marketIndex];\n\n // Float is scaled by the percentage of the total market value held in\n // the opposite position. This incentivises users to stake on the\n // weaker position.\n if (int256(shortValue) - (2 * equilibriumOffsetMarketScaled) < int256(longValue)) {\n if (equilibriumOffsetMarketScaled >= int256(shortValue)) {\n // edge case: imbalanced far past the equilibrium offset - full rewards go to short token\n // extremely unlikely to happen in practice\n return (0, k * shortPrice);\n }\n\n uint256 numerator = (uint256(int256(shortValue) - equilibriumOffsetMarketScaled) >>\n (safetyBitShifting - 1))**balanceIncentiveCurve_exponent[marketIndex];\n\n uint256 denominator = ((totalLocked >> safetyBitShifting) **\n balanceIncentiveCurve_exponent[marketIndex]);\n\n // NOTE: `x * 5e17` == `(x * 1e18) / 2`\n uint256 longRewardUnscaled = (numerator * 5e17) / denominator;\n uint256 shortRewardUnscaled = 1e18 - longRewardUnscaled;\n\n return (\n (longRewardUnscaled * k * longPrice) / 1e18,\n (shortRewardUnscaled * k * shortPrice) / 1e18\n );\n } else {\n if (-equilibriumOffsetMarketScaled >= int256(longValue)) {\n // edge case: imbalanced far past the equilibrium offset - full rewards go to long token\n // extremely unlikely to happen in practice\n return (k * longPrice, 0);\n }\n\n uint256 numerator = (uint256(int256(longValue) + equilibriumOffsetMarketScaled) >>\n (safetyBitShifting - 1))**balanceIncentiveCurve_exponent[marketIndex];\n\n uint256 denominator = ((totalLocked >> safetyBitShifting) **\n balanceIncentiveCurve_exponent[marketIndex]);\n\n // NOTE: `x * 5e17` == `(x * 1e18) / 2`\n uint256 shortRewardUnscaled = (numerator * 5e17) / denominator;\n uint256 longRewardUnscaled = 1e18 - shortRewardUnscaled;\n\n return (\n (longRewardUnscaled * k * longPrice) / 1e18,\n (shortRewardUnscaled * k * shortPrice) / 1e18\n );\n }\n }\n\n /**\n @notice Computes the time since last accumulativeIssuancePerStakedSynthSnapshot for the given market in seconds.\n @param marketIndex The market referred to.\n @return timeDelta The time difference in seconds\n */\n function _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\n uint32 marketIndex,\n uint256 previousMarketUpdateIndex\n ) internal view virtual returns (uint256 timeDelta) {\n return\n block.timestamp -\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex].timestamp;\n }\n\n /**\n @notice Computes new cumulative sum of 'r' value since last accumulativeIssuancePerStakedSynthSnapshot. We use\n cumulative 'r' value to avoid looping during issuance. Note that the\n cumulative sum is kept in 1e42 scale (!!!) to avoid numerical issues.\n @param shortValue The value locked in the short side of the market.\n @param longValue The value locked in the long side of the market.\n @param shortPrice The price of the short token as defined in LongShort.sol\n @param longPrice The price of the long token as defined in LongShort.sol\n @param marketIndex An identifier for the market.\n @return longCumulativeRates The long cumulative sum.\n @return shortCumulativeRates The short cumulative sum.\n */\n function _calculateNewCumulativeIssuancePerStakedSynth(\n uint32 marketIndex,\n uint256 previousMarketUpdateIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) internal view virtual returns (uint256 longCumulativeRates, uint256 shortCumulativeRates) {\n // Compute the current 'r' value for float issuance per second.\n (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) = _calculateFloatPerSecond(\n marketIndex,\n longPrice,\n shortPrice,\n longValue,\n shortValue\n );\n\n // Compute time since last accumulativeIssuancePerStakedSynthSnapshot for the given token.\n uint256 timeDelta = _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\n marketIndex,\n previousMarketUpdateIndex\n );\n\n // Compute new cumulative 'r' value total.\n return (\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex]\n .accumulativeFloatPerSyntheticToken_long + (timeDelta * longFloatPerSecond),\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex]\n .accumulativeFloatPerSyntheticToken_short + (timeDelta * shortFloatPerSecond)\n );\n }\n\n /**\n @notice Adds new accumulativeIssuancePerStakedSynthSnapshots for the given long/short tokens. Called by the\n ILongShort contract whenever there is a state change for a market.\n @param marketIndex An identifier for the market.\n @param marketUpdateIndex Current update index in the LongShort contract for this market.\n @param shortValue The value locked in the short side of the market.\n @param longValue The value locked in the long side of the market.\n @param shortPrice The price of the short token as defined in LongShort.sol\n @param longPrice The price of the long token as defined in LongShort.sol\n */\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\n uint32 marketIndex,\n uint256 marketUpdateIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) external override onlyLongShort {\n (\n uint256 newLongAccumulativeValue,\n uint256 newShortAccumulativeValue\n ) = _calculateNewCumulativeIssuancePerStakedSynth(\n marketIndex,\n marketUpdateIndex - 1,\n longPrice,\n shortPrice,\n longValue,\n shortValue\n );\n\n // Set cumulative 'r' value on new accumulativeIssuancePerStakedSynthSnapshot.\n\n AccumulativeIssuancePerStakedSynthSnapshot\n storage accumulativeFloatPerSyntheticTokenSnapshot = accumulativeFloatPerSyntheticTokenSnapshots[\n marketIndex\n ][marketUpdateIndex];\n accumulativeFloatPerSyntheticTokenSnapshot\n .accumulativeFloatPerSyntheticToken_long = newLongAccumulativeValue;\n accumulativeFloatPerSyntheticTokenSnapshot\n .accumulativeFloatPerSyntheticToken_short = newShortAccumulativeValue;\n\n // Set timestamp on new accumulativeIssuancePerStakedSynthSnapshot.\n accumulativeFloatPerSyntheticTokenSnapshot.timestamp = block.timestamp;\n\n // Update latest index to point to new accumulativeIssuancePerStakedSynthSnapshot.\n latestRewardIndex[marketIndex] = marketUpdateIndex;\n\n emit AccumulativeIssuancePerStakedSynthSnapshotCreated(\n marketIndex,\n marketUpdateIndex,\n newLongAccumulativeValue,\n newShortAccumulativeValue\n );\n }\n\n /*╔═══════════════════════════════════╗\n ║ USER REWARD STATE FUNCTIONS ║\n ╚═══════════════════════════════════╝*/\n\n /// @dev Calculates the accumulated float in a specific range of staker snapshots\n function _calculateAccumulatedFloatInRange(\n uint32 marketIndex,\n uint256 amountStakedLong,\n uint256 amountStakedShort,\n uint256 rewardIndexFrom,\n uint256 rewardIndexTo\n ) internal view virtual returns (uint256 floatReward) {\n if (amountStakedLong > 0) {\n uint256 accumDeltaLong = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][\n rewardIndexTo\n ].accumulativeFloatPerSyntheticToken_long -\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom]\n .accumulativeFloatPerSyntheticToken_long;\n floatReward += (accumDeltaLong * amountStakedLong) / FLOAT_ISSUANCE_FIXED_DECIMAL;\n }\n\n if (amountStakedShort > 0) {\n uint256 accumDeltaShort = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][\n rewardIndexTo\n ].accumulativeFloatPerSyntheticToken_short -\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom]\n .accumulativeFloatPerSyntheticToken_short;\n floatReward += (accumDeltaShort * amountStakedShort) / FLOAT_ISSUANCE_FIXED_DECIMAL;\n }\n }\n\n /**\n @notice Calculates float owed to the user since the user last minted float for a market.\n @param marketIndex Identifier for the market which the user staked in.\n @param user The address of the user.\n @return floatReward The amount of float owed.\n */\n function _calculateAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user)\n internal\n virtual\n returns (uint256 floatReward)\n {\n address longToken = syntheticTokens[marketIndex][true];\n address shortToken = syntheticTokens[marketIndex][false];\n\n uint256 amountStakedLong = userAmountStaked[longToken][user];\n uint256 amountStakedShort = userAmountStaked[shortToken][user];\n\n uint256 usersLastRewardIndex = userIndexOfLastClaimedReward[marketIndex][user];\n\n uint256 currentRewardIndex = latestRewardIndex[marketIndex];\n\n // Don't do the calculation and return zero immediately if there is no change\n if (usersLastRewardIndex == currentRewardIndex) {\n return 0;\n }\n\n uint256 usersShiftIndex = userNextPrice_stakedActionIndex[marketIndex][user];\n // if there is a change in the users tokens held due to a token shift (or possibly another action in the future)\n if (usersShiftIndex > 0 && usersShiftIndex <= currentRewardIndex) {\n floatReward = _calculateAccumulatedFloatInRange(\n marketIndex,\n amountStakedLong,\n amountStakedShort,\n usersLastRewardIndex,\n usersShiftIndex\n );\n\n // Update the users balances\n\n uint256 amountToShiftAwayFromCurrentSide = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\n marketIndex\n ][true][user];\n // Handle shifts from LONG side:\n if (amountToShiftAwayFromCurrentSide > 0) {\n amountStakedShort += ILongShort(longShort).getAmountSyntheticTokenToMintOnTargetSide(\n marketIndex,\n amountToShiftAwayFromCurrentSide,\n true,\n usersShiftIndex\n );\n\n amountStakedLong -= amountToShiftAwayFromCurrentSide;\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][user] = 0;\n }\n\n amountToShiftAwayFromCurrentSide = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\n marketIndex\n ][false][user];\n // Handle shifts from SHORT side:\n if (amountToShiftAwayFromCurrentSide > 0) {\n amountStakedLong += ILongShort(longShort).getAmountSyntheticTokenToMintOnTargetSide(\n marketIndex,\n amountToShiftAwayFromCurrentSide,\n false,\n usersShiftIndex\n );\n\n amountStakedShort -= amountToShiftAwayFromCurrentSide;\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][user] = 0;\n }\n\n // Save the users updated staked amounts\n userAmountStaked[longToken][user] = amountStakedLong;\n userAmountStaked[shortToken][user] = amountStakedShort;\n\n emit StakeShifted(user, marketIndex, amountStakedLong, amountStakedShort);\n\n floatReward += _calculateAccumulatedFloatInRange(\n marketIndex,\n amountStakedLong,\n amountStakedShort,\n usersShiftIndex,\n currentRewardIndex\n );\n\n userNextPrice_stakedActionIndex[marketIndex][user] = 0;\n } else {\n floatReward = _calculateAccumulatedFloatInRange(\n marketIndex,\n amountStakedLong,\n amountStakedShort,\n usersLastRewardIndex,\n currentRewardIndex\n );\n }\n }\n\n /**\n @notice Mints float for a user.\n @dev Mints a fixed percentage for Float capital.\n @param user The address of the user.\n @param floatToMint The amount of float to mint.\n */\n function _mintFloat(address user, uint256 floatToMint) internal virtual {\n IFloatToken(floatToken).mint(user, floatToMint);\n IFloatToken(floatToken).mint(floatCapital, (floatToMint * floatPercentage) / 1e18);\n }\n\n /**\n @notice Mints float owed to a user for a market since they last minted.\n @param marketIndex An identifier for the market.\n @param user The address of the user.\n */\n function _mintAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user)\n internal\n virtual\n {\n uint256 floatToMint = _calculateAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\n\n if (floatToMint > 0) {\n // Set the user has claimed up until now, stops them setting this forward\n userIndexOfLastClaimedReward[marketIndex][user] = latestRewardIndex[marketIndex];\n\n _mintFloat(user, floatToMint);\n emit FloatMinted(user, marketIndex, floatToMint);\n }\n }\n\n /**\n @notice Mints float owed to a user for multiple markets, since they last minted for those markets.\n @param marketIndexes Identifiers for the markets.\n @param user The address of the user.\n */\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(\n uint32[] calldata marketIndexes,\n address user\n ) internal virtual {\n uint256 floatTotal = 0;\n uint256 length = marketIndexes.length;\n for (uint256 i = 0; i < length; i++) {\n uint256 floatToMint = _calculateAccumulatedFloatAndExecuteOutstandingShifts(\n marketIndexes[i],\n user\n );\n\n if (floatToMint > 0) {\n // Set the user has claimed up until now, stops them setting this forward\n userIndexOfLastClaimedReward[marketIndexes[i]][user] = latestRewardIndex[marketIndexes[i]];\n\n floatTotal += floatToMint;\n\n emit FloatMinted(user, marketIndexes[i], floatToMint);\n }\n }\n if (floatTotal > 0) {\n _mintFloat(user, floatTotal);\n }\n }\n\n /**\n @notice Mints outstanding float for msg.sender.\n @param marketIndexes Identifiers for the markets for which to mint float.\n */\n function claimFloatCustom(uint32[] calldata marketIndexes) external {\n ILongShort(longShort).updateSystemStateMulti(marketIndexes);\n _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, msg.sender);\n }\n\n /**\n @notice Mints outstanding float on behalf of another user.\n @param marketIndexes Identifiers for the markets for which to mint float.\n @param user The address of the user.\n */\n function claimFloatCustomFor(uint32[] calldata marketIndexes, address user) external {\n // Unbounded loop - users are responsible for paying their own gas costs on these and it doesn't effect the rest of the system.\n // No need to impose limit.\n ILongShort(longShort).updateSystemStateMulti(marketIndexes);\n _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, user);\n }\n\n /*╔═══════════════════════╗\n ║ STAKING ║\n ╚═══════════════════════╝*/\n\n /**\n @notice A user with synthetic tokens stakes by calling stake on the token\n contract which calls this function. We need to first update the\n state of the LongShort contract for this market before staking to correctly calculate user rewards.\n @param amount Amount to stake.\n @param from Address to stake for.\n */\n function stakeFromUser(address from, uint256 amount)\n external\n virtual\n override\n onlyValidSynthetic(msg.sender)\n gemCollecting(from)\n {\n uint32 marketIndex = marketIndexOfToken[msg.sender];\n ILongShort(longShort).updateSystemState(marketIndex);\n\n uint256 userCurrentIndexOfLastClaimedReward = userIndexOfLastClaimedReward[marketIndex][from];\n uint256 currentRewardIndex = latestRewardIndex[marketIndex];\n // If they already have staked and have rewards due, mint these.\n if (\n userCurrentIndexOfLastClaimedReward != 0 &&\n userCurrentIndexOfLastClaimedReward < currentRewardIndex\n ) {\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, from);\n }\n\n userAmountStaked[msg.sender][from] += amount;\n\n // NOTE: Users retroactively earn a little bit of FLT because they start earning from the previous update index.\n userIndexOfLastClaimedReward[marketIndex][from] = currentRewardIndex;\n\n emit StakeAdded(from, msg.sender, amount, currentRewardIndex);\n }\n\n /**\n @notice Allows users to shift their staked tokens from one side of the market to\n the other at the next price.\n @param amountSyntheticTokensToShift Amount of tokens to shift.\n @param marketIndex Identifier for the market.\n @param isShiftFromLong Whether the shift is from long to short or short to long.\n */\n function shiftTokens(\n uint256 amountSyntheticTokensToShift,\n uint32 marketIndex,\n bool isShiftFromLong\n )\n external\n virtual\n override\n updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\n marketIndex,\n msg.sender\n )\n gemCollecting(msg.sender)\n {\n require(amountSyntheticTokensToShift > 0, \"No zero shifts.\");\n address token = syntheticTokens[marketIndex][isShiftFromLong];\n uint256 totalAmountForNextShift = amountSyntheticTokensToShift +\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][isShiftFromLong][\n msg.sender\n ];\n\n require(\n userAmountStaked[token][msg.sender] >= totalAmountForNextShift,\n \"Not enough tokens to shift\"\n );\n\n ILongShort(longShort).shiftPositionNextPrice(\n marketIndex,\n amountSyntheticTokensToShift,\n isShiftFromLong\n );\n\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][isShiftFromLong][\n msg.sender\n ] = totalAmountForNextShift;\n\n uint256 userRewardIndex = latestRewardIndex[marketIndex] + 1;\n userNextPrice_stakedActionIndex[marketIndex][msg.sender] = userRewardIndex;\n\n emit NextPriceStakeShift(\n msg.sender,\n marketIndex,\n amountSyntheticTokensToShift,\n isShiftFromLong,\n userRewardIndex\n );\n }\n\n /*╔════════════════════════════╗\n ║ WITHDRAWAL & MINTING ║\n ╚════════════════════════════╝*/\n\n /**\n @notice Internal logic for withdrawing stakes.\n @dev Mint user any outstanding float before withdrawing.\n @param marketIndex Market index of token.\n @param amount Amount to withdraw.\n @param token Synthetic token that was staked.\n */\n function _withdraw(\n uint32 marketIndex,\n address token,\n uint256 amount\n ) internal virtual gemCollecting(msg.sender) {\n uint256 amountFees = (amount * marketUnstakeFee_e18[marketIndex]) / 1e18;\n\n ISyntheticToken(token).transfer(floatTreasury, amountFees);\n ISyntheticToken(token).transfer(msg.sender, amount - amountFees);\n\n emit StakeWithdrawn(msg.sender, token, amount);\n }\n\n function _withdrawPrepLogic(\n uint32 marketIndex,\n bool isWithdrawFromLong,\n uint256 amount,\n address token\n ) internal {\n ILongShort(longShort).updateSystemState(marketIndex);\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender);\n\n uint256 currentAmountStaked = userAmountStaked[token][msg.sender];\n // If this value is greater than zero they have pending nextPriceShifts; don't allow user to shit these reserved tokens.\n uint256 amountToShiftForThisToken = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\n marketIndex\n ][isWithdrawFromLong][msg.sender];\n\n unchecked {\n require(currentAmountStaked >= amount + amountToShiftForThisToken, \"not enough to withdraw\");\n userAmountStaked[token][msg.sender] = currentAmountStaked - amount;\n }\n }\n\n /**\n @notice Withdraw function. Allows users to unstake.\n @param amount Amount to withdraw.\n @param marketIndex Market index of staked synthetic token\n @param isWithdrawFromLong is synthetic token to be withdrawn long or short\n */\n function withdraw(\n uint32 marketIndex,\n bool isWithdrawFromLong,\n uint256 amount\n ) external {\n address token = syntheticTokens[marketIndex][isWithdrawFromLong];\n _withdrawPrepLogic(marketIndex, isWithdrawFromLong, amount, token);\n _withdraw(marketIndex, token, amount);\n }\n\n /**\n @notice Allows users to withdraw their entire stake for a token.\n @param marketIndex Market index of staked synthetic token\n @param isWithdrawFromLong is synthetic token to be withdrawn long or short\n */\n function withdrawAll(uint32 marketIndex, bool isWithdrawFromLong) external {\n ILongShort(longShort).updateSystemState(marketIndex);\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender);\n\n address token = syntheticTokens[marketIndex][isWithdrawFromLong];\n\n uint256 userAmountStakedBeforeWithdrawal = userAmountStaked[token][msg.sender];\n\n uint256 amountToShiftForThisToken = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\n marketIndex\n ][isWithdrawFromLong][msg.sender];\n userAmountStaked[token][msg.sender] = amountToShiftForThisToken;\n\n _withdraw(marketIndex, token, userAmountStakedBeforeWithdrawal - amountToShiftForThisToken);\n }\n\n function _hasher(\n uint32 marketIndex,\n bool isWithdrawFromLong,\n address user,\n uint256 withdrawAmount,\n uint256 expiry,\n uint256 nonce,\n uint256 discountWithdrawFee\n ) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(\n abi.encodePacked(\n marketIndex,\n isWithdrawFromLong,\n user,\n withdrawAmount,\n expiry,\n nonce,\n discountWithdrawFee\n )\n )\n )\n );\n }\n\n function withdrawWithVoucher(\n uint32 marketIndex,\n bool isWithdrawFromLong,\n uint256 withdrawAmount,\n uint256 expiry,\n uint256 nonce,\n uint256 discountWithdrawFee,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external gemCollecting(msg.sender) {\n address discountSigner = ecrecover(\n _hasher(\n marketIndex,\n isWithdrawFromLong,\n msg.sender,\n withdrawAmount,\n expiry,\n nonce,\n discountWithdrawFee\n ),\n v,\n r,\n s\n );\n hasRole(DISCOUNT_ROLE, discountSigner);\n\n require(block.timestamp < expiry, \"coupon expired\");\n require(userNonce[msg.sender] == nonce, \"invalid nonce\");\n require(discountWithdrawFee < marketUnstakeFee_e18[marketIndex], \"bad discount fee\");\n userNonce[msg.sender] = userNonce[msg.sender] + 1;\n\n address token = syntheticTokens[marketIndex][isWithdrawFromLong];\n\n _withdrawPrepLogic(marketIndex, isWithdrawFromLong, withdrawAmount, token);\n\n uint256 amountFees = (withdrawAmount * discountWithdrawFee) / 1e18;\n ISyntheticToken(token).transfer(floatTreasury, amountFees);\n ISyntheticToken(token).transfer(msg.sender, withdrawAmount - amountFees);\n emit StakeWithdrawn(msg.sender, token, withdrawAmount);\n }\n}\n" + }, + "contracts/oracles/OracleManagerFlippening_V0.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\n\nimport \"../interfaces/IOracleManager.sol\";\n\n/**\n Contract that estimates ETH / BTC dominance,\n expressed as (eth market cap) / (btc market cap)\n Estimates BTC & ETH supply. In the future\n look towards using oracles for it. \n*/\ncontract OracleManagerFlippening_V0 is IOracleManager {\n address public admin; // This will likely be the Gnosis safe\n\n int256 public ethDominance;\n\n uint256 public ethSupply; // 18 decimals\n uint256 public btcSupply; // 8 decimals\n\n uint256 public btcBlocksPerDay;\n uint256 public ethBlocksPerDay;\n\n uint256 public btcBlockReward; // 8 decimals\n uint256 public ethBlockReward; // 18 decimals\n\n uint256 public ethUnclesPerDay;\n\n // Eth has a variable uncle reward:\n // - https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1234.md,\n // Source here says it's roughly 75%:\n // - https://docs.ethhub.io/ethereum-basics/monetary-policy/\n // Might be worth also looking into just taking it as the mean of the possibilities\n // = sum from 1 to 7 of (8 - sumIndex) * blockReward / 8 / 7\n\n uint256 public ethUncleReward; // 18 decimals\n\n uint256 public ethNephewReward; // 18 decimals. currently = blockReward / 32\n\n uint256 lastUpdated;\n\n // Oracle addresses\n AggregatorV3Interface public btcOracle;\n AggregatorV3Interface public ethOracle;\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier adminOnly() {\n require(msg.sender == admin);\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n\n constructor(\n address _admin,\n address _btcOracle,\n address _ethOracle,\n uint256 _ethSupply,\n uint256 _btcSupply,\n uint256 _btcBlocksPerDay,\n uint256 _ethBlocksPerDay,\n uint256 _ethUnclesPerDay,\n uint256 _btcBlockReward,\n uint256 _ethBlockReward,\n uint256 _ethUncleReward,\n uint256 _ethNephewReward\n ) {\n admin = _admin;\n\n btcOracle = AggregatorV3Interface(_btcOracle);\n ethOracle = AggregatorV3Interface(_ethOracle);\n\n ethSupply = _ethSupply;\n btcSupply = _btcSupply;\n\n btcBlocksPerDay = _btcBlocksPerDay;\n\n ethBlocksPerDay = _ethBlocksPerDay;\n ethUnclesPerDay = _ethUnclesPerDay;\n\n btcBlockReward = _btcBlockReward;\n\n ethBlockReward = _ethBlockReward;\n ethUncleReward = _ethUncleReward;\n ethNephewReward = _ethNephewReward;\n\n lastUpdated = block.timestamp;\n\n _updatePrice();\n }\n\n ////////////////////////////////////\n /// MULTISIG ADMIN FUNCTIONS ///////\n ////////////////////////////////////\n\n function changeAdmin(address _admin) external adminOnly {\n admin = _admin;\n }\n\n function changeEthSupply(uint256 supply) external adminOnly {\n ethSupply = supply;\n }\n\n function changeBtcSupply(uint256 supply) external adminOnly {\n btcSupply = supply;\n }\n\n function changeBtcBlocksPerDay(uint256 blocks) external adminOnly {\n btcBlocksPerDay = blocks;\n }\n\n function changeEthBlocksPerDay(uint256 blocks) external adminOnly {\n ethBlocksPerDay = blocks;\n }\n\n function changeEthUnclesPerDay(uint256 uncles) external adminOnly {\n ethUnclesPerDay = uncles;\n }\n\n function changeBtcBlockReward(uint256 reward) external adminOnly {\n btcBlockReward = reward;\n }\n\n function changeEthBlockReward(uint256 reward) external adminOnly {\n ethBlockReward = reward;\n }\n\n function changeEthUncleReward(uint256 reward) external adminOnly {\n ethUncleReward = reward;\n }\n\n function changeEthNephewReward(uint256 reward) external adminOnly {\n ethNephewReward = reward;\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n\n function _getBtcSupply() internal view returns (uint256) {\n return\n btcSupply + (((block.timestamp - lastUpdated) * btcBlocksPerDay * btcBlockReward) / (1 days));\n }\n\n function _getEthSupply() internal view returns (uint256) {\n return\n ethSupply +\n (((block.timestamp - lastUpdated) *\n (ethBlocksPerDay * ethBlockReward + ethUnclesPerDay * (ethNephewReward + ethUncleReward))) /\n 1 days);\n }\n\n function _updatePrice() private returns (int256) {\n (, int256 _ethPrice, , , ) = ethOracle.latestRoundData();\n (, int256 _btcPrice, , , ) = btcOracle.latestRoundData();\n ethSupply = _getEthSupply();\n btcSupply = _getBtcSupply();\n\n lastUpdated = block.timestamp;\n\n // ethSupply * ethPrice = 26 decimals\n // btcSupply * btcPrice = 16 decimals\n\n // 1e20 as 18 decimals but as %\n ethDominance = int256(\n (uint256(_ethPrice) * ethSupply * 1e20) / (uint256(_btcPrice) * btcSupply * 1e10)\n );\n\n return ethDominance;\n }\n\n function updatePrice() external override returns (int256) {\n return _updatePrice();\n }\n\n function getLatestPrice() external view override returns (int256) {\n return ethDominance;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface AggregatorV3Interface {\n\n function decimals()\n external\n view\n returns (\n uint8\n );\n\n function description()\n external\n view\n returns (\n string memory\n );\n\n function version()\n external\n view\n returns (\n uint256\n );\n\n // getRoundData and latestRoundData should both raise \"No data present\"\n // if they do not have data to report, instead of returning unset values\n // which could be misinterpreted as actual reported values.\n function getRoundData(\n uint80 _roundId\n )\n external\n view\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n );\n\n function latestRoundData()\n external\n view\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n );\n\n}\n" + }, + "contracts/oracles/OracleManagerFlipp3ning.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\nimport \"../interfaces/IOracleManager.sol\";\n\ncontract OracleManagerFlipp3ning is IOracleManager {\n address public ethMarketCapFeed;\n address public btcMarketCapFeed;\n\n struct PriceData {\n uint80 lastRoundEth;\n uint80 lastRoundBtc;\n uint128 price;\n }\n\n PriceData public priceData;\n\n constructor(address _ethMarketCapFeed, address _btcMarketCapFeed) {\n ethMarketCapFeed = _ethMarketCapFeed;\n btcMarketCapFeed = _btcMarketCapFeed;\n\n require(\n AggregatorV3Interface(ethMarketCapFeed).decimals() ==\n AggregatorV3Interface(btcMarketCapFeed).decimals(),\n \"Decimals for feeds are different!\"\n );\n\n (uint80 _ethRound, uint80 _btcRound, int256 _ethMarketCap, int256 _btcMarketCap) = _feedData();\n\n priceData.price = _dominance(_ethMarketCap, _btcMarketCap);\n priceData.lastRoundEth = _ethRound;\n priceData.lastRoundBtc = _btcRound;\n }\n\n function _feedData()\n internal\n view\n returns (\n uint80 ethRound,\n uint80 btcRound,\n int256 ethPrice,\n int256 btcPrice\n )\n {\n (ethRound, ethPrice, , , ) = AggregatorV3Interface(ethMarketCapFeed).latestRoundData();\n (btcRound, btcPrice, , , ) = AggregatorV3Interface(btcMarketCapFeed).latestRoundData();\n }\n\n function _dominance(int256 _ethMarketCap, int256 _btcMarketCap) internal view returns (uint128) {\n // reverts if btc market cap == 0\n return uint128(uint256((_ethMarketCap * 1e20) / _btcMarketCap));\n }\n\n function getLatestPrice() external view override returns (int256) {\n return int256(uint256(priceData.price));\n }\n\n function updatePrice() external override returns (int256) {\n (uint80 _ethRound, uint80 _btcRound, int256 _ethMarketCap, int256 _btcMarketCap) = _feedData();\n\n if (_ethRound == priceData.lastRoundEth || _btcRound == priceData.lastRoundBtc) {\n return int256(uint256(priceData.price));\n }\n\n uint128 price = _dominance(_ethMarketCap, _btcMarketCap);\n priceData.price = price;\n priceData.lastRoundEth = _ethRound;\n priceData.lastRoundBtc = _btcRound;\n\n return int256(uint256(price));\n }\n}\n" + }, + "contracts/oracles/OracleManagerEthVsBtc.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\n\nimport \"../interfaces/IOracleManager.sol\";\n\n/**\n Contract that gives price ration of ETH/BTC\n*/\ncontract OracleManagerEthVsBtc is IOracleManager {\n address public admin; // This will likely be the Gnosis safe\n\n int256 public ethDominance;\n\n // Oracle addresses\n AggregatorV3Interface public btcOracle;\n AggregatorV3Interface public ethOracle;\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier adminOnly() {\n require(msg.sender == admin);\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n\n constructor(\n address _admin,\n address _btcOracle,\n address _ethOracle\n ) {\n admin = _admin;\n\n btcOracle = AggregatorV3Interface(_btcOracle);\n ethOracle = AggregatorV3Interface(_ethOracle);\n\n _updatePrice();\n }\n\n ////////////////////////////////////\n /// MULTISIG ADMIN FUNCTIONS ///////\n ////////////////////////////////////\n\n function changeAdmin(address _admin) external adminOnly {\n admin = _admin;\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n\n function _updatePrice() private returns (int256) {\n (, int256 _ethPrice, , , ) = ethOracle.latestRoundData();\n (, int256 _btcPrice, , , ) = btcOracle.latestRoundData();\n\n // 1e20 as 18 decimals but as %\n ethDominance = int256((uint256(_ethPrice) * 1e20) / (uint256(_btcPrice)));\n\n return ethDominance;\n }\n\n function updatePrice() external override returns (int256) {\n return _updatePrice();\n }\n\n function getLatestPrice() external view override returns (int256) {\n return ethDominance;\n }\n}\n" + }, + "contracts/oracles/OracleManagerEthKillerChainlink.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\n\nimport \"../interfaces/IOracleManager.sol\";\n\ncontract OracleManagerEthKillerChainlink is IOracleManager {\n address public admin; // This will likely be the Gnosis safe\n\n // Oracle price, changes by average of the underlying asset changes.\n int256 public indexPrice;\n\n // Underlying asset prices.\n int256 public tronPrice;\n int256 public eosPrice;\n int256 public xrpPrice;\n\n // Oracle addresses\n AggregatorV3Interface public tronOracle;\n AggregatorV3Interface public eosOracle;\n AggregatorV3Interface public xrpOracle;\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier adminOnly() {\n require(msg.sender == admin);\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n\n constructor(\n address _admin,\n address _tronOracle,\n address _eosOracle,\n address _xrpOracle\n ) {\n admin = _admin;\n tronOracle = AggregatorV3Interface(_tronOracle);\n eosOracle = AggregatorV3Interface(_eosOracle);\n xrpOracle = AggregatorV3Interface(_xrpOracle);\n // Initial asset prices.\n (tronPrice, eosPrice, xrpPrice) = _getAssetPrices();\n\n // Initial base index price.\n indexPrice = 1e18;\n }\n\n ////////////////////////////////////\n /// MULTISIG ADMIN FUNCTIONS ///////\n ////////////////////////////////////\n\n function changeAdmin(address _admin) external adminOnly {\n admin = _admin;\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n\n function _getAssetPrices()\n internal\n view\n returns (\n int256,\n int256,\n int256\n )\n {\n (, int256 _tronPrice, , , ) = tronOracle.latestRoundData();\n (, int256 _eosPrice, , , ) = eosOracle.latestRoundData();\n (, int256 _xrpPrice, , , ) = xrpOracle.latestRoundData();\n return (_tronPrice, _eosPrice, _xrpPrice);\n }\n\n function _updatePrice() internal virtual returns (int256) {\n (int256 newTronPrice, int256 newEosPrice, int256 newXrpPrice) = _getAssetPrices();\n\n int256 valueOfChangeInIndex = (int256(indexPrice) *\n (_calcAbsolutePercentageChange(newTronPrice, tronPrice) +\n _calcAbsolutePercentageChange(newEosPrice, eosPrice) +\n _calcAbsolutePercentageChange(newXrpPrice, xrpPrice))) / (3 * 1e18);\n\n tronPrice = newTronPrice;\n eosPrice = newEosPrice;\n xrpPrice = newXrpPrice;\n\n indexPrice = indexPrice + valueOfChangeInIndex;\n\n return indexPrice;\n }\n\n function updatePrice() external override returns (int256) {\n return _updatePrice();\n }\n\n function _calcAbsolutePercentageChange(int256 newPrice, int256 basePrice)\n internal\n pure\n returns (int256)\n {\n return ((newPrice - basePrice) * (1e18)) / (basePrice);\n }\n\n function getLatestPrice() external view override returns (int256) {\n return indexPrice;\n }\n}\n" + }, + "contracts/oracles/OracleManagerEthKillerChainlinkTestnet.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./OracleManagerEthKillerChainlink.sol\";\n\ncontract OracleManagerEthKillerChainlinkTestnet is OracleManagerEthKillerChainlink {\n uint256 lastUpdate;\n uint256 maxUpdateIntervalSeconds;\n int256 forcedPriceAdjustment;\n\n constructor(\n address _admin,\n address _tronOracle,\n address _eosOracle,\n address _xrpOracle,\n uint256 _maxUpdateIntervalSeconds\n ) OracleManagerEthKillerChainlink(_admin, _tronOracle, _eosOracle, _xrpOracle) {\n maxUpdateIntervalSeconds = _maxUpdateIntervalSeconds;\n }\n\n function setMaxUpdateInterval(uint256 newMaxUpdateIntervalSeconds) external adminOnly {\n maxUpdateIntervalSeconds = newMaxUpdateIntervalSeconds;\n }\n\n function _updatePrice() internal override returns (int256) {\n int256 previousPrice = indexPrice;\n int256 latestPrice = super._updatePrice();\n\n if (previousPrice != latestPrice || lastUpdate + maxUpdateIntervalSeconds < block.timestamp) {\n forcedPriceAdjustment = (forcedPriceAdjustment + 1) % 2;\n lastUpdate = block.timestamp;\n }\n\n return latestPrice + forcedPriceAdjustment;\n }\n}\n" + }, + "contracts/oracles/OracleManagerChainlink.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"../interfaces/IOracleManager.sol\";\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\n\n/*\n * Implementation of an OracleManager that fetches prices from a Chainlink aggregate price feed.\n */\ncontract OracleManagerChainlink is IOracleManager {\n // Admin addresses.\n address public admin;\n // Global state.\n AggregatorV3Interface public chainlinkOracle;\n uint8 public oracleDecimals;\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier adminOnly() {\n require(msg.sender == admin, \"Not admin\");\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n constructor(address _admin, address _chainlinkOracle) {\n admin = _admin;\n chainlinkOracle = AggregatorV3Interface(_chainlinkOracle);\n oracleDecimals = chainlinkOracle.decimals();\n }\n\n ////////////////////////////////////\n /// MULTISIG ADMIN FUNCTIONS ///////\n ////////////////////////////////////\n\n function changeAdmin(address _admin) external adminOnly {\n admin = _admin;\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n function _getLatestPrice() internal view returns (int256) {\n (, int256 price, , , ) = chainlinkOracle.latestRoundData();\n return price;\n }\n\n function getLatestPrice() external view override returns (int256) {\n return _getLatestPrice();\n }\n\n function updatePrice() external virtual override returns (int256) {\n return _getLatestPrice();\n }\n}\n" + }, + "contracts/oracles/OracleManagerChainlinkTestnet.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./OracleManagerChainlink.sol\";\n\ncontract OracleManagerChainlinkTestnet is OracleManagerChainlink {\n uint256 lastUpdate;\n uint256 maxUpdateIntervalSeconds;\n int256 forcedPriceAdjustment;\n\n constructor(\n address _admin,\n address _chainlinkOracle,\n uint256 _maxUpdateIntervalSeconds\n ) OracleManagerChainlink(_admin, _chainlinkOracle) {\n maxUpdateIntervalSeconds = _maxUpdateIntervalSeconds;\n }\n\n function setMaxUpdateInterval(uint256 newMaxUpdateIntervalSeconds) external adminOnly {\n maxUpdateIntervalSeconds = newMaxUpdateIntervalSeconds;\n }\n\n function updatePrice() external override returns (int256) {\n int256 latestPrice = super._getLatestPrice();\n\n int256 priceAdjustment = forcedPriceAdjustment;\n if (lastUpdate + maxUpdateIntervalSeconds < block.timestamp) {\n priceAdjustment = (priceAdjustment + 1) % 2;\n forcedPriceAdjustment = priceAdjustment;\n lastUpdate = block.timestamp;\n }\n\n return latestPrice + priceAdjustment;\n }\n}\n" + }, + "contracts/mocks/AggregatorV3Mock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\n\n/*\n * AggregatorV3Mock is an implementation of a chainlink oracle that allows prices\n * to be set arbitrarily for testing.\n */\ncontract AggregatorV3Mock is AggregatorV3Interface, Initializable {\n // Admin contracts.\n address public admin;\n uint8 public override decimals;\n uint256 public override version;\n\n string public override description = \"This is a mock chainlink oracle\";\n\n struct RoundData {\n uint80 answeredInRound;\n int256 answer;\n uint256 setAt;\n }\n mapping(uint80 => RoundData) public roundData;\n uint80 currentRoundId;\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier adminOnly() {\n require(msg.sender == admin, \"Not admin\");\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n\n function setup(\n address _admin,\n int256 _price,\n uint8 _decimals\n ) public initializer {\n admin = _admin;\n decimals = (_decimals != 0) ? _decimals : 18;\n version = 1;\n currentRoundId = 1;\n roundData[currentRoundId] = RoundData(currentRoundId, _price, block.timestamp);\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n\n /*\n * Sets the mock rate for the oracle.\n */\n function setPrice(int256 _price) public {\n currentRoundId = currentRoundId + 1;\n roundData[currentRoundId] = RoundData(currentRoundId, _price, block.timestamp);\n }\n\n function getRoundData(uint80 _roundId)\n external\n view\n override\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n )\n {\n RoundData storage round = roundData[_roundId];\n return (_roundId, round.answer, round.setAt, round.setAt, 1);\n }\n\n function latestRoundData()\n external\n view\n override\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n )\n {\n RoundData storage round = roundData[currentRoundId];\n return (currentRoundId, round.answer, round.setAt, round.setAt, 1);\n }\n}\n" + }, + "contracts/SyntheticTokenUpgradeable.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./interfaces/IStaker.sol\";\nimport \"./interfaces/ILongShort.sol\";\nimport \"./interfaces/ISyntheticToken.sol\";\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\n/**\n@title SyntheticTokenUpgradeable\n@notice An ERC20 token that tracks or inversely tracks the price of an\n underlying asset with floating exposure.\n@dev Logic for price tracking contained in LongShort.sol. \n The contract inherits from ERC20PresetMinterPauser.sol\n*/\ncontract SyntheticTokenUpgradeable is\n ISyntheticToken,\n Initializable,\n ERC20Upgradeable,\n ERC20BurnableUpgradeable,\n AccessControlUpgradeable,\n ERC20PermitUpgradeable,\n UUPSUpgradeable\n{\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant UPGRADER_ROLE = keccak256(\"UPGRADER_ROLE\");\n\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\n address public longShort;\n /// @notice Address of the Staker contract, a deployed Staker.sol\n address public staker;\n /// @notice Identifies which market in longShort the token is for.\n uint32 public marketIndex;\n /// @notice Whether the token is a long token or short token for its market.\n bool public isLong;\n\n /// @notice Creates an instance of the contract.\n /// @dev Should only be called by TokenFactory.sol for our system.\n /// @param name The name of the token.\n /// @param symbol The symbol for the token.\n /// @param _longShort Address of the core LongShort contract.\n /// @param _staker Address of the staker contract.\n /// @param _marketIndex Which market the token is for.\n /// @param _isLong Whether the token is long or short for its market.\n function initialize(\n string memory name,\n string memory symbol,\n address _longShort,\n address _staker,\n uint32 _marketIndex,\n bool _isLong\n ) external initializer {\n __ERC20_init(name, symbol);\n __ERC20Burnable_init();\n __AccessControl_init();\n __ERC20Permit_init(name);\n __UUPSUpgradeable_init();\n\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\n renounceRole(MINTER_ROLE, msg.sender);\n\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\n _setupRole(MINTER_ROLE, _longShort);\n _setupRole(UPGRADER_ROLE, msg.sender);\n\n longShort = _longShort;\n staker = _staker;\n marketIndex = _marketIndex;\n isLong = _isLong;\n }\n\n /// @notice Authorizes an upgrade to a new address.\n /// @dev Can only be called by the current admin.\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\n\n // TODO - look at some way of not duplicating implementation logic between this and SyntheticToken.sol\n\n /// @notice Allows users to stake their synthetic tokens to earn Float.\n /// @dev Core staking logic contained in Staker.sol\n /// @param amount Amount to stake in wei.\n function stake(uint256 amount) external override {\n // NOTE: this is safe, this function will throw \"ERC20: transfer\n // amount exceeds balance\" if amount exceeds users balance.\n super._transfer(msg.sender, address(staker), amount);\n\n IStaker(staker).stakeFromUser(msg.sender, amount);\n }\n\n /*╔══════════════════════════════════════════════════════╗\n ║ FUNCTIONS INHERITED BY ERC20PresetMinterPauser ║\n ╚══════════════════════════════════════════════════════╝*/\n\n function totalSupply()\n public\n view\n virtual\n override(ERC20Upgradeable, ISyntheticToken)\n returns (uint256)\n {\n return ERC20Upgradeable.totalSupply();\n }\n\n /** \n @notice Mints a number of synthetic tokens for an address.\n @dev Can only be called by addresses with a minter role. \n This should correspond to the Long Short contract.\n @param to The address for which to mint the tokens for.\n @param amount Amount of synthetic tokens to mint in wei.\n */\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\n _mint(to, amount);\n }\n\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\n /// @param amount The amount of tokens to burn in wei.\n function burn(uint256 amount) public override(ERC20BurnableUpgradeable, ISyntheticToken) {\n require(msg.sender == longShort, \"Only LongShort contract\");\n super._burn(_msgSender(), amount);\n }\n\n /** \n @notice Overrides the default ERC20 transferFrom.\n @dev To allow users to avoid approving LongShort when redeeming tokens,\n longShort has a virtual infinite allowance.\n @param sender User for which to transfer tokens.\n @param recipient Recipient of the transferred tokens.\n @param amount Amount of tokens to transfer in wei.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override(ERC20Upgradeable, ISyntheticToken) returns (bool) {\n if (recipient == longShort && msg.sender == longShort) {\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\n ERC20Upgradeable._transfer(sender, recipient, amount);\n return true;\n } else {\n return ERC20Upgradeable.transferFrom(sender, recipient, amount);\n }\n }\n\n function transfer(address recipient, uint256 amount)\n public\n virtual\n override(ERC20Upgradeable, ISyntheticToken)\n returns (bool)\n {\n return ERC20Upgradeable.transfer(recipient, amount);\n }\n\n /** \n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\n tokens from next price actions before any token transfer occurs.\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\n @param sender User for which tokens are to be transferred for.\n */\n function _beforeTokenTransfer(\n address sender,\n address to,\n uint256 amount\n ) internal override {\n if (sender != longShort) {\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\n }\n super._beforeTokenTransfer(sender, to, amount);\n }\n\n /** \n @notice Gets the synthetic token balance of the user in wei.\n @dev To automatically account for next price actions which have been confirmed but not settled,\n includes any outstanding tokens owed by longShort.\n @param account The address for which to get the balance of.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return\n ERC20Upgradeable.balanceOf(account) +\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\n account,\n marketIndex,\n isLong\n );\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20PermitUpgradeable.sol\";\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation 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 *\n * _Available since v3.4._\n */\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n mapping(address => CountersUpgradeable.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private _PERMIT_TYPEHASH;\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n function __ERC20Permit_init(string memory name) internal initializer {\n __Context_init_unchained();\n __EIP712_init_unchained(name, \"1\");\n __ERC20Permit_init_unchained(name);\n }\n\n function __ERC20Permit_init_unchained(string memory name) internal initializer {\n _PERMIT_TYPEHASH = keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");}\n\n /**\n * @dev See {IERC20Permit-permit}.\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 ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20PermitUpgradeable {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712Upgradeable is Initializable {\n /* solhint-disable var-name-mixedcase */\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal initializer {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal initializer {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712NameHash() internal virtual view returns (bytes32) {\n return _HASHED_NAME;\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\n return _HASHED_VERSION;\n }\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSAUpgradeable {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s;\n uint8 v;\n assembly {\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n v := add(shr(255, vs), 27)\n }\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary CountersUpgradeable {\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n unchecked {\n counter._value += 1;\n }\n }\n\n function decrement(Counter storage counter) internal {\n uint256 value = counter._value;\n require(value > 0, \"Counter: decrement overflow\");\n unchecked {\n counter._value = value - 1;\n }\n }\n\n function reset(Counter storage counter) internal {\n counter._value = 0;\n }\n}\n" + }, + "contracts/StakingStrategy.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\n\nimport \"./interfaces/ILongShort.sol\";\nimport \"./interfaces/ISyntheticToken.sol\";\nimport \"./interfaces/IStaker.sol\";\nimport \"./StrategyToken.sol\";\n\n/** @title ILO Contract */\ncontract StakingStrategy is Initializable, UUPSUpgradeable, AccessControlUpgradeable {\n bytes32 public constant UPGRADER_ROLE = keccak256(\"UPGRADER_ROLE\");\n\n address public longShort;\n address public staker;\n StrategyToken public strategyToken;\n\n /*╔═════════════════════════════╗\n ║ CONTRACT SETUP ║\n ╚═════════════════════════════╝*/\n\n function initialize(\n string calldata name,\n string calldata symbol,\n address _longShort,\n address _staker\n ) external initializer {\n __AccessControl_init();\n __UUPSUpgradeable_init();\n\n longShort = _longShort;\n strategyToken = new StrategyToken(name, symbol);\n staker = _staker;\n\n _setupRole(UPGRADER_ROLE, msg.sender);\n grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\n\n /*╔═════════════════════════════╗\n ║ DEPOSIT ║\n ╚═════════════════════════════╝*/\n function depositLongAndShortTokens(\n uint32 marketIndex,\n uint256 amountToken,\n bool isLong\n ) public {\n ILongShort _longShort = ILongShort(longShort);\n address longTokenAddress = _longShort.syntheticTokens(marketIndex, true);\n address shortTokenAddress = _longShort.syntheticTokens(marketIndex, false);\n\n //TODO\n //can maybe add this method to longShort contract?\n (uint256 longTokenPrice, uint256 shortTokenPrice) = _getLongAndShortTokenPrice(marketIndex);\n\n (uint256 longShortRatio, uint256 beforeBalanceOfContract) = _getContractStakedBalanceAndRatio(\n marketIndex,\n longTokenAddress,\n shortTokenAddress,\n longTokenPrice,\n shortTokenPrice\n );\n (uint256 _amountStakedLong, uint256 _amountStakedShort) = _getTotalLongAndShortTokensStaked(\n marketIndex,\n longTokenAddress,\n shortTokenAddress\n );\n uint256 amountOfTokensToMatchRatio;\n\n if (isLong) {\n amountOfTokensToMatchRatio = amountToken / (longShortRatio);\n } else {\n amountOfTokensToMatchRatio = amountToken * longShortRatio;\n }\n\n //TODO\n //two transfers - can optimise\n ISyntheticToken(_longShort.syntheticTokens(marketIndex, isLong)).transferFrom(\n msg.sender,\n address(this),\n amountToken\n );\n ISyntheticToken(_longShort.syntheticTokens(marketIndex, !isLong)).transferFrom(\n msg.sender,\n address(this),\n amountOfTokensToMatchRatio\n );\n\n ISyntheticToken(_longShort.syntheticTokens(marketIndex, isLong)).stake(amountToken);\n ISyntheticToken(_longShort.syntheticTokens(marketIndex, !isLong)).stake(\n amountOfTokensToMatchRatio\n );\n\n (uint256 finalLongShortRatio, uint256 totalValueStaked) = _getContractStakedBalanceAndRatio(\n marketIndex,\n longTokenAddress,\n shortTokenAddress,\n longTokenPrice,\n shortTokenPrice\n );\n\n if (finalLongShortRatio != 1) {\n _performShiftingStrategy(\n marketIndex,\n totalValueStaked,\n longTokenAddress,\n shortTokenAddress,\n longTokenPrice,\n shortTokenPrice\n );\n }\n\n //TODO can seperate this into it's own method?\n uint256 shares;\n\n if (strategyToken.totalSupply() == 0) {\n shares = totalValueStaked;\n } else {\n // Users deposited amount * cost per share\n //cost per share =\n shares =\n (((totalValueStaked - beforeBalanceOfContract)) * beforeBalanceOfContract) /\n strategyToken.totalSupply();\n }\n\n strategyToken.mint(msg.sender, shares);\n }\n\n /*╔═════════════════════════════╗\n ║ HELPER FUNCTIONS ║\n ╚═════════════════════════════╝*/\n\n //Retrieves the number of long and short tokens staked by this contract\n function _getTotalLongAndShortTokensStaked(\n uint32 marketIndex,\n address longTokenAddress,\n address shortTokenAddress\n ) internal view returns (uint256, uint256) {\n IStaker _staker = IStaker(staker);\n uint256 amountStakedLong = _staker.userAmountStaked(longTokenAddress, address(this));\n uint256 amountStakedShort = _staker.userAmountStaked(shortTokenAddress, address(this));\n\n return (amountStakedLong, amountStakedShort);\n }\n\n //TODO calculate the shares for the user\n function _calculateUserShares() internal returns (uint256) {\n // add the logic for share distribution here\n }\n\n //Gets the $ balance of the staked tokens\n function _getContractStakedBalanceAndRatio(\n uint32 marketIndex,\n address longTokenAddress,\n address shortTokenAddress,\n uint256 longTokenPrice,\n uint256 shortTokenPrice\n ) internal view returns (uint256, uint256) {\n uint256 marketUpdateIndex = ILongShort(longShort).marketUpdateIndex(marketIndex);\n (uint256 _amountStakedLong, uint256 _amountStakedShort) = _getTotalLongAndShortTokensStaked(\n marketIndex,\n longTokenAddress,\n shortTokenAddress\n );\n uint256 longSideValue = (_amountStakedLong * longTokenPrice) / 1e18;\n uint256 shortSideValue = (_amountStakedShort * shortTokenPrice) / 1e18;\n\n uint256 longShortRatio = longSideValue / shortSideValue;\n uint256 contractBalance = (longSideValue + shortSideValue);\n\n return (longShortRatio, contractBalance);\n }\n\n function _getLongAndShortTokenPrice(uint32 marketIndex)\n internal\n view\n returns (uint256 longTokenPrice, uint256 shortTokenPrice)\n {\n uint256 marketUpdateIndex = ILongShort(longShort).marketUpdateIndex(marketIndex);\n uint256 longTokenPrice = ILongShort(longShort).syntheticToken_priceSnapshot(\n marketIndex,\n true,\n marketUpdateIndex\n );\n uint256 shortTokenPrice = ILongShort(longShort).syntheticToken_priceSnapshot(\n marketIndex,\n false,\n marketUpdateIndex\n );\n }\n\n /*╔═════════════════════════════╗\n ║ STRATEGY ║\n ╚═════════════════════════════╝*/\n\n //Perform the shifting strategy of this contract to ensure 50/50 balance of long short token values\n function _performShiftingStrategy(\n uint32 marketIndex,\n uint256 totalValueStaked,\n address longTokenAddress,\n address shortTokenAddress,\n uint256 longTokenPrice,\n uint256 shortTokenPrice\n ) internal {\n (uint256 _amountStakedLong, uint256 _amountStakedShort) = _getTotalLongAndShortTokensStaked(\n marketIndex,\n longTokenAddress,\n shortTokenAddress\n );\n\n //50 - 50 split, can aim to make this resuable\n uint256 desiredAmountOfLongTokens = ((totalValueStaked / 2) * 1e18) / longTokenPrice;\n uint256 desiredAmountOfShortTokens = ((totalValueStaked / 2) * 1e18) / shortTokenPrice;\n\n //check that no shifting occurs if the distribution of long and short tokens are already correct\n if (_amountStakedLong > desiredAmountOfLongTokens) {\n //Shift to short side\n IStaker(staker).shiftTokens(_amountStakedLong - desiredAmountOfLongTokens, marketIndex, true);\n } else if (_amountStakedShort > desiredAmountOfShortTokens) {\n //shift to long side\n IStaker(staker).shiftTokens(\n _amountStakedShort - desiredAmountOfShortTokens,\n marketIndex,\n false\n );\n }\n }\n\n /// @notice Shifts tokens to either the long or the short position for the market to maintain 50/50 split in $ value\n /// @param marketIndex An uint32 which uniquely identifies a market.\n function performShiftingStrategy(uint32 marketIndex) external {\n address longTokenAddress = ILongShort(longShort).syntheticTokens(marketIndex, true);\n address shortTokenAddress = ILongShort(longShort).syntheticTokens(marketIndex, false);\n (uint256 longTokenPrice, uint256 shortTokenPrice) = _getLongAndShortTokenPrice(marketIndex);\n\n (uint256 longShortRatio, uint256 totalValueStaked) = _getContractStakedBalanceAndRatio(\n marketIndex,\n longTokenAddress,\n shortTokenAddress,\n longTokenPrice,\n shortTokenPrice\n );\n\n if (longShortRatio != 1) {\n _performShiftingStrategy(\n marketIndex,\n totalValueStaked,\n longTokenAddress,\n shortTokenAddress,\n longTokenPrice,\n shortTokenPrice\n );\n }\n }\n}\n" + }, + "contracts/StrategyToken.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\";\n\ncontract StrategyToken is ERC20Upgradeable, ERC20BurnableUpgradeable {\n constructor(string memory name, string memory symbol) {\n __ERC20_init(name, symbol);\n }\n\n function mint(address _recipient, uint256 _amount) external {\n _mint(_recipient, _amount);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20Permit.sol\";\nimport \"../ERC20.sol\";\nimport \"../../../utils/cryptography/draft-EIP712.sol\";\nimport \"../../../utils/cryptography/ECDSA.sol\";\nimport \"../../../utils/Counters.sol\";\n\n/**\n * @dev Implementation 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 *\n * _Available since v3.4._\n */\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\n using Counters for Counters.Counter;\n\n mapping(address => Counters.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private immutable _PERMIT_TYPEHASH =\n keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n constructor(string memory name) EIP712(name, \"1\") {}\n\n /**\n * @dev See {IERC20Permit-permit}.\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 ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSA.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n Counters.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\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/utils/cryptography/draft-EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\n uint256 private immutable _CACHED_CHAIN_ID;\n\n bytes32 private immutable _HASHED_NAME;\n bytes32 private immutable _HASHED_VERSION;\n bytes32 private immutable _TYPE_HASH;\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n constructor(string memory name, string memory version) {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\n \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n );\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n if (block.chainid == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s;\n uint8 v;\n assembly {\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n v := add(shr(255, vs), 27)\n }\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Counters.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary Counters {\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n unchecked {\n counter._value += 1;\n }\n }\n\n function decrement(Counter storage counter) internal {\n uint256 value = counter._value;\n require(value > 0, \"Counter: decrement overflow\");\n unchecked {\n counter._value = value - 1;\n }\n }\n\n function reset(Counter storage counter) internal {\n counter._value = 0;\n }\n}\n" + }, + "contracts/FloatToken.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\";\n\nimport \"./interfaces/IFloatToken.sol\";\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\n/**\n @title FloatToken\n @notice The Float Token is the governance token for the Float Capital protocol\n */\ncontract FloatToken is\n IFloatToken,\n Initializable,\n ERC20Upgradeable,\n ERC20BurnableUpgradeable,\n PausableUpgradeable,\n AccessControlUpgradeable,\n ERC20PermitUpgradeable,\n ERC20VotesUpgradeable,\n UUPSUpgradeable\n{\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant UPGRADER_ROLE = keccak256(\"UPGRADER_ROLE\");\n\n /**\n @notice Initialize the Float Token with relevant\n @dev This function is called `initialize` to differentiate it from `initialize(string,string)` in the parent contract which should NOT be called to initialize this contract. \n @param name The name of the Float governance token\n @param symbol The ticker representing the token\n @param stakerAddress The staker contract that controls minting of the token\n */\n function initialize(\n string calldata name,\n string calldata symbol,\n address stakerAddress\n ) external initializer {\n __ERC20_init(name, symbol);\n __ERC20Burnable_init();\n __Pausable_init();\n __AccessControl_init();\n __ERC20Permit_init(name);\n __UUPSUpgradeable_init();\n\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\n renounceRole(MINTER_ROLE, msg.sender);\n renounceRole(PAUSER_ROLE, msg.sender);\n\n _setupRole(DEFAULT_ADMIN_ROLE, stakerAddress);\n _setupRole(MINTER_ROLE, stakerAddress);\n _setupRole(PAUSER_ROLE, stakerAddress);\n\n _setupRole(UPGRADER_ROLE, msg.sender);\n }\n\n /*╔═══════════════════════════════════════════════════════════════════╗\n ║ FUNCTIONS INHERITED BY ERC20PresetMinterPauserUpgradeable ║\n ╚═══════════════════════════════════════════════════════════════════╝*/\n\n /** \n @notice Mints an amount of Float tokens for an address.\n @dev Can only be called by addresses with a MINTER_ROLE. \n This should correspond to the Staker contract.\n @param to The address for which to mint the tokens for.\n @param amount Amount of synthetic tokens to mint in wei.\n */\n function mint(address to, uint256 amount) external override(IFloatToken) onlyRole(MINTER_ROLE) {\n _mint(to, amount);\n }\n\n /**\n @notice modify token functionality so that a pausing this token doesn't affect minting\n @dev Pause functionality in the open zeppelin ERC20PresetMinterPauserUpgradeable comes from the below function.\n We override it to exclude anyone with the minter role (ie the Staker contract)\n @param from address tokens are being sent from\n @param to address tokens are being sent to\n @param amount amount of tokens being sent\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n require(!paused() || hasRole(MINTER_ROLE, _msgSender()), \"Paused and not minter\");\n\n super._beforeTokenTransfer(from, to, amount);\n }\n\n function pause() external onlyRole(PAUSER_ROLE) {\n _pause();\n }\n\n function unpause() external onlyRole(PAUSER_ROLE) {\n _unpause();\n }\n\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) {\n super._afterTokenTransfer(from, to, amount);\n }\n\n function _mint(address to, uint256 amount)\n internal\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\n {\n super._mint(to, amount);\n }\n\n function _burn(address account, uint256 amount)\n internal\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\n {\n super._burn(account, amount);\n }\n\n function totalSupply()\n public\n view\n virtual\n override(ERC20Upgradeable, IFloatToken)\n returns (uint256)\n {\n return ERC20Upgradeable.totalSupply();\n }\n\n function transfer(address recipient, uint256 amount)\n public\n virtual\n override(ERC20Upgradeable, IFloatToken)\n returns (bool)\n {\n return ERC20Upgradeable.transfer(recipient, amount);\n }\n\n function burnFrom(address account, uint256 amount)\n public\n virtual\n override(ERC20BurnableUpgradeable, IFloatToken)\n {\n ERC20BurnableUpgradeable.burnFrom(account, amount);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./draft-ERC20PermitUpgradeable.sol\";\nimport \"../../../utils/math/MathUpgradeable.sol\";\nimport \"../../../utils/math/SafeCastUpgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,\n * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.\n *\n * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.\n *\n * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either\n * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting\n * power can be queried through the public accessors {getVotes} and {getPastVotes}.\n *\n * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it\n * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.\n * Enabling self-delegation can easily be done by overriding the {delegates} function. Keep in mind however that this\n * will significantly increase the base gas cost of transfers.\n *\n * _Available since v4.2._\n */\nabstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable {\n function __ERC20Votes_init_unchained() internal initializer {\n }\n struct Checkpoint {\n uint32 fromBlock;\n uint224 votes;\n }\n\n bytes32 private constant _DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n mapping(address => address) private _delegates;\n mapping(address => Checkpoint[]) private _checkpoints;\n Checkpoint[] private _totalSupplyCheckpoints;\n\n /**\n * @dev Emitted when an account changes their delegate.\n */\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /**\n * @dev Emitted when a token transfer or delegate change results in changes to an account's voting power.\n */\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\n\n /**\n * @dev Get the `pos`-th checkpoint for `account`.\n */\n function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) {\n return _checkpoints[account][pos];\n }\n\n /**\n * @dev Get number of checkpoints for `account`.\n */\n function numCheckpoints(address account) public view virtual returns (uint32) {\n return SafeCastUpgradeable.toUint32(_checkpoints[account].length);\n }\n\n /**\n * @dev Get the address `account` is currently delegating to.\n */\n function delegates(address account) public view virtual returns (address) {\n return _delegates[account];\n }\n\n /**\n * @dev Gets the current votes balance for `account`\n */\n function getVotes(address account) public view returns (uint256) {\n uint256 pos = _checkpoints[account].length;\n return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\n }\n\n /**\n * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.\n *\n * Requirements:\n *\n * - `blockNumber` must have been already mined\n */\n function getPastVotes(address account, uint256 blockNumber) public view returns (uint256) {\n require(blockNumber < block.number, \"ERC20Votes: block not yet mined\");\n return _checkpointsLookup(_checkpoints[account], blockNumber);\n }\n\n /**\n * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.\n * It is but NOT the sum of all the delegated votes!\n *\n * Requirements:\n *\n * - `blockNumber` must have been already mined\n */\n function getPastTotalSupply(uint256 blockNumber) public view returns (uint256) {\n require(blockNumber < block.number, \"ERC20Votes: block not yet mined\");\n return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);\n }\n\n /**\n * @dev Lookup a value in a list of (sorted) checkpoints.\n */\n function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {\n // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.\n //\n // During the loop, the index of the wanted checkpoint remains in the range [low-1, high).\n // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant.\n // - If the middle checkpoint is after `blockNumber`, we look in [low, mid)\n // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high)\n // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not\n // out of bounds (in which case we're looking too far in the past and the result is 0).\n // Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is\n // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out\n // the same.\n uint256 high = ckpts.length;\n uint256 low = 0;\n while (low < high) {\n uint256 mid = MathUpgradeable.average(low, high);\n if (ckpts[mid].fromBlock > blockNumber) {\n high = mid;\n } else {\n low = mid + 1;\n }\n }\n\n return high == 0 ? 0 : ckpts[high - 1].votes;\n }\n\n /**\n * @dev Delegate votes from the sender to `delegatee`.\n */\n function delegate(address delegatee) public virtual {\n return _delegate(_msgSender(), delegatee);\n }\n\n /**\n * @dev Delegates votes from signer to `delegatee`\n */\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual {\n require(block.timestamp <= expiry, \"ERC20Votes: signature expired\");\n address signer = ECDSAUpgradeable.recover(\n _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),\n v,\n r,\n s\n );\n require(nonce == _useNonce(signer), \"ERC20Votes: invalid nonce\");\n return _delegate(signer, delegatee);\n }\n\n /**\n * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1).\n */\n function _maxSupply() internal view virtual returns (uint224) {\n return type(uint224).max;\n }\n\n /**\n * @dev Snapshots the totalSupply after it has been increased.\n */\n function _mint(address account, uint256 amount) internal virtual override {\n super._mint(account, amount);\n require(totalSupply() <= _maxSupply(), \"ERC20Votes: total supply risks overflowing votes\");\n\n _writeCheckpoint(_totalSupplyCheckpoints, _add, amount);\n }\n\n /**\n * @dev Snapshots the totalSupply after it has been decreased.\n */\n function _burn(address account, uint256 amount) internal virtual override {\n super._burn(account, amount);\n\n _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount);\n }\n\n /**\n * @dev Move voting power when tokens are transferred.\n *\n * Emits a {DelegateVotesChanged} event.\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._afterTokenTransfer(from, to, amount);\n\n _moveVotingPower(delegates(from), delegates(to), amount);\n }\n\n /**\n * @dev Change delegation for `delegator` to `delegatee`.\n *\n * Emits events {DelegateChanged} and {DelegateVotesChanged}.\n */\n function _delegate(address delegator, address delegatee) internal virtual {\n address currentDelegate = delegates(delegator);\n uint256 delegatorBalance = balanceOf(delegator);\n _delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveVotingPower(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveVotingPower(\n address src,\n address dst,\n uint256 amount\n ) private {\n if (src != dst && amount > 0) {\n if (src != address(0)) {\n (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount);\n emit DelegateVotesChanged(src, oldWeight, newWeight);\n }\n\n if (dst != address(0)) {\n (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount);\n emit DelegateVotesChanged(dst, oldWeight, newWeight);\n }\n }\n }\n\n function _writeCheckpoint(\n Checkpoint[] storage ckpts,\n function(uint256, uint256) view returns (uint256) op,\n uint256 delta\n ) private returns (uint256 oldWeight, uint256 newWeight) {\n uint256 pos = ckpts.length;\n oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;\n newWeight = op(oldWeight, delta);\n\n if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {\n ckpts[pos - 1].votes = SafeCastUpgradeable.toUint224(newWeight);\n } else {\n ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(block.number), votes: SafeCastUpgradeable.toUint224(newWeight)}));\n }\n }\n\n function _add(uint256 a, uint256 b) private pure returns (uint256) {\n return a + b;\n }\n\n function _subtract(uint256 a, uint256 b) private pure returns (uint256) {\n return a - b;\n }\n uint256[47] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\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 / b + (a % b == 0 ? 0 : 1);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCastUpgradeable {\n /**\n * @dev Returns the downcasted uint224 from uint256, reverting on\n * overflow (when the input is greater than largest uint224).\n *\n * Counterpart to Solidity's `uint224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n */\n function toUint224(uint256 value) internal pure returns (uint224) {\n require(value <= type(uint224).max, \"SafeCast: value doesn't fit in 224 bits\");\n return uint224(value);\n }\n\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value <= type(uint128).max, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint96 from uint256, reverting on\n * overflow (when the input is greater than largest uint96).\n *\n * Counterpart to Solidity's `uint96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n */\n function toUint96(uint256 value) internal pure returns (uint96) {\n require(value <= type(uint96).max, \"SafeCast: value doesn't fit in 96 bits\");\n return uint96(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value <= type(uint64).max, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value <= type(uint32).max, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value <= type(uint16).max, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value <= type(uint8).max, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= type(int128).min && value <= type(int128).max, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= type(int64).min && value <= type(int64).max, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= type(int32).min && value <= type(int32).max, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= type(int16).min && value <= type(int16).max, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= type(int8).min && value <= type(int8).max, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n require(value <= uint256(type(int256).max), \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" + }, + "contracts/AlphaTestFLT.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\";\n\nimport \"./interfaces/IFloatToken.sol\";\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\n/**\n @title FloatToken\n @notice The Float Token is the governance token for the Float Capital protocol\n */\ncontract AlphaTestFLT is\n IFloatToken,\n Initializable,\n ERC20Upgradeable,\n ERC20BurnableUpgradeable,\n PausableUpgradeable,\n AccessControlUpgradeable,\n ERC20PermitUpgradeable,\n ERC20VotesUpgradeable,\n UUPSUpgradeable\n{\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant UPGRADER_ROLE = keccak256(\"UPGRADER_ROLE\");\n\n address public treasury;\n\n /**\n @notice Initialize the Float Token with relevant\n @dev This function is called `initialize` to differentiate it from `initialize(string,string)` in the parent contract which should NOT be called to initialize this contract. \n @param name The name of the Float governance token\n @param symbol The ticker representing the token\n @param stakerAddress The staker contract that controls minting of the token\n */\n function initialize(\n string calldata name,\n string calldata symbol,\n address stakerAddress,\n address treasuryAddress\n ) external initializer {\n __ERC20_init(name, symbol);\n __ERC20Burnable_init();\n __Pausable_init();\n __AccessControl_init();\n __ERC20Permit_init(name);\n __UUPSUpgradeable_init();\n\n treasury = treasuryAddress;\n\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\n renounceRole(MINTER_ROLE, msg.sender);\n renounceRole(PAUSER_ROLE, msg.sender);\n\n _setupRole(DEFAULT_ADMIN_ROLE, stakerAddress);\n _setupRole(MINTER_ROLE, stakerAddress);\n _setupRole(PAUSER_ROLE, stakerAddress);\n\n _setupRole(UPGRADER_ROLE, msg.sender);\n }\n\n /*╔═══════════════════════════════════════════════════════════════════╗\n ║ FUNCTIONS INHERITED BY ERC20PresetMinterPauserUpgradeable ║\n ╚═══════════════════════════════════════════════════════════════════╝*/\n\n /** \n @notice Mints an amount of Float tokens for an address.\n @dev Can only be called by addresses with a MINTER_ROLE. \n This should correspond to the Staker contract.\n @param to The address for which to mint the tokens for.\n @param amount Amount of synthetic tokens to mint in wei.\n */\n function mint(address to, uint256 amount) external override(IFloatToken) onlyRole(MINTER_ROLE) {\n _mint(to, amount);\n }\n\n /**\n @notice modify token functionality so that a pausing this token doesn't affect minting\n @dev Pause functionality in the open zeppelin ERC20PresetMinterPauserUpgradeable comes from the below function.\n We override it to exclude anyone with the minter role (ie the Staker contract)\n @param from address tokens are being sent from\n @param to address tokens are being sent to\n @param amount amount of tokens being sent\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n require(!paused() || hasRole(MINTER_ROLE, _msgSender()), \"Paused and not minter\");\n\n super._beforeTokenTransfer(from, to, amount);\n }\n\n function pause() external onlyRole(PAUSER_ROLE) {\n _pause();\n }\n\n function unpause() external onlyRole(PAUSER_ROLE) {\n _unpause();\n }\n\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) {\n super._afterTokenTransfer(from, to, amount);\n }\n\n function _mint(address to, uint256 amount)\n internal\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\n {\n super._mint(to, amount);\n }\n\n function _burn(address account, uint256 amount)\n internal\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\n {\n super._burn(account, amount);\n }\n\n function totalSupply()\n public\n view\n virtual\n override(ERC20Upgradeable, IFloatToken)\n returns (uint256)\n {\n return ERC20Upgradeable.totalSupply();\n }\n\n function transfer(address recipient, uint256 amount)\n public\n virtual\n override(ERC20Upgradeable, IFloatToken)\n returns (bool)\n {\n return ERC20Upgradeable.transfer(recipient, amount);\n }\n\n function burnFrom(address account, uint256 amount)\n public\n virtual\n override(ERC20BurnableUpgradeable, IFloatToken)\n {\n // If the burn comes from the treasury, let it happen automatically.\n // This is only for the alpha launch, no need to add these permissions to the main FLT deployment.\n if (msg.sender == treasury) {\n _burn(account, amount);\n } else {\n ERC20BurnableUpgradeable.burnFrom(account, amount);\n }\n }\n}\n" + }, + "contracts/TreasuryAlpha.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\nimport \"./interfaces/IFloatToken.sol\";\nimport \"./interfaces/ILongShort.sol\";\n\nimport \"@openzeppelin/contracts/utils/math/Math.sol\";\n\n/** This contract implementation is purely for the alpha, allowing the burning of FLT tokens\n for a proportional share of the value held in the treasury. In contrast, the beta launch will be\n rely on a more robust governance mechanism to vote on the buying and buring of FLT tokens using\n treasury funds.*/\n\n/** @title Treasury Contract */\ncontract TreasuryAlpha is AccessControlledAndUpgradeable {\n //Using Open Zeppelin safe transfer library for token transfers\n using SafeERC20 for IERC20;\n\n address public paymentToken;\n address public floatToken;\n address public longShort;\n // An aproximation of what the FLT price should be according to the yield at the time.\n uint256 public basePrice;\n bool public redemptionsActivated;\n\n event BasePriceUpdated(uint256 newBasePrice);\n\n function initialize(\n address _admin,\n address _paymentToken,\n address _floatToken,\n address _longShort\n ) external initializer {\n _AccessControlledAndUpgradeable_init(_admin);\n paymentToken = _paymentToken;\n floatToken = _floatToken;\n longShort = _longShort;\n }\n\n function onlyAdminModifierLogic() internal virtual {\n _checkRole(ADMIN_ROLE, msg.sender);\n }\n\n modifier onlyAdmin() {\n onlyAdminModifierLogic();\n _;\n }\n\n modifier redemptionsActive() {\n require(redemptionsActivated, \"redemptions haven't been activated\");\n _;\n }\n\n function _getValueLockedInTreasury() internal view returns (uint256) {\n return IERC20(paymentToken).balanceOf(address(this));\n }\n\n function _getFloatTokenSupply() internal view returns (uint256) {\n return IFloatToken(floatToken).totalSupply();\n }\n\n function updateBasePrice(uint256 newBasePrice) public onlyAdmin {\n // What should the minimum for this value be? 0.2 DAI per token seems reasonable if we are targetting 0.5 DAI as the normal price (and say Aave yield is poor or similar)\n require(newBasePrice > 2e17, \"base price too low\");\n\n basePrice = newBasePrice;\n emit BasePriceUpdated(newBasePrice);\n }\n\n function activateRedemptions() public onlyAdmin {\n redemptionsActivated = true;\n }\n\n function burnFloatForShareOfTreasury(uint256 amountOfFloatToBurn) external redemptionsActive {\n uint256 priceAccordingToTreasuryAndSupply = (_getValueLockedInTreasury() * 1e18) /\n _getFloatTokenSupply();\n // In normal operation the `priceAccordingToTreasuryAndSupply` value will be an over-estimation favouring people who withdraw early. Thus typically the 'basePrice' will be a bit lower to prevent this in typical cases.\n // We take the min of these two values so it is impossible for us to run with the money.\n uint256 priceToUse = Math.min(priceAccordingToTreasuryAndSupply, basePrice);\n\n uint256 amountToRecieve = (priceToUse * amountOfFloatToBurn) / 1e18;\n\n IFloatToken(floatToken).burnFrom(msg.sender, amountOfFloatToBurn); // Can modify the core FLT token if wanted to remove the need for this step. // Currently requires user to approve treasury contract.\n IERC20(paymentToken).safeTransfer(msg.sender, amountToRecieve);\n }\n\n function convertSynthsToPaymentTokenNextPriceLong(uint32 marketIndex, uint256 tokens_redeem)\n external\n {\n ILongShort(longShort).redeemLongNextPrice(marketIndex, tokens_redeem);\n }\n\n function convertSynthsToPaymentTokenNextPriceShort(uint32 marketIndex, uint256 tokens_redeem)\n external\n {\n ILongShort(longShort).redeemShortNextPrice(marketIndex, tokens_redeem);\n }\n}\n" + }, + "contracts/Treasury_v0.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\nimport \"./interfaces/IFloatToken.sol\";\nimport \"./interfaces/ILongShort.sol\";\n\n/** This contract implementation is purely for the alpha, allowing the burning of FLT tokens\n for a proportional share of the value held in the treasury. In contrast, the beta launch will be\n rely on a more robust governance mechanism to vote on the buying and buring of FLT tokens using\n treasury funds.*/\n\n/** @title Treasury Contract */\ncontract Treasury_v0 is AccessControlledAndUpgradeable {\n address public paymentToken;\n address public floatToken;\n address public longShort;\n\n function initialize(\n address _admin,\n address _paymentToken,\n address _floatToken,\n address _longShort\n ) external initializer {\n _AccessControlledAndUpgradeable_init(_admin);\n paymentToken = _paymentToken;\n floatToken = _floatToken;\n longShort = _longShort;\n }\n\n function convertSynthsToPaymentTokenNextPriceLong(uint32 marketIndex, uint256 tokens_redeem)\n external\n {\n ILongShort(longShort).redeemLongNextPrice(marketIndex, tokens_redeem);\n }\n\n function convertSynthsToPaymentTokenNextPriceShort(uint32 marketIndex, uint256 tokens_redeem)\n external\n {\n ILongShort(longShort).redeemShortNextPrice(marketIndex, tokens_redeem);\n }\n}\n" + }, + "contracts/SyntheticToken.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./interfaces/IStaker.sol\";\nimport \"./interfaces/ILongShort.sol\";\nimport \"./interfaces/ISyntheticToken.sol\";\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\";\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol\";\n\n/**\n@title SyntheticToken\n@notice An ERC20 token that tracks or inversely tracks the price of an\n underlying asset with floating exposure.\n@dev Logic for price tracking contained in LongShort.sol. \n The contract inherits from ERC20PresetMinterPauser.sol\n*/\ncontract SyntheticToken is ISyntheticToken, ERC20, ERC20Burnable, AccessControl, ERC20Permit {\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\n address public immutable longShort;\n /// @notice Address of the Staker contract, a deployed Staker.sol\n address public immutable staker;\n /// @notice Identifies which market in longShort the token is for.\n uint32 public immutable marketIndex;\n /// @notice Whether the token is a long token or short token for its market.\n bool public immutable isLong;\n\n /// @notice Creates an instance of the contract.\n /// @dev Should only be called by TokenFactory.sol for our system.\n /// @param name The name of the token.\n /// @param symbol The symbol for the token.\n /// @param _longShort Address of the core LongShort contract.\n /// @param _staker Address of the staker contract.\n /// @param _marketIndex Which market the token is for.\n /// @param _isLong Whether the token is long or short for its market.\n constructor(\n string memory name,\n string memory symbol,\n address _longShort,\n address _staker,\n uint32 _marketIndex,\n bool _isLong\n ) ERC20(name, symbol) ERC20Permit(name) {\n longShort = _longShort;\n staker = _staker;\n marketIndex = _marketIndex;\n isLong = _isLong;\n\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\n _setupRole(MINTER_ROLE, _longShort);\n }\n\n /// @notice Allows users to stake their synthetic tokens to earn Float.\n /// @dev Core staking logic contained in Staker.sol\n /// @param amount Amount to stake in wei.\n function stake(uint256 amount) external override {\n // NOTE: this is safe, this function will throw \"ERC20: transfer\n // amount exceeds balance\" if amount exceeds users balance.\n super._transfer(msg.sender, address(staker), amount);\n\n IStaker(staker).stakeFromUser(msg.sender, amount);\n }\n\n /*╔══════════════════════════════════════════════════════╗\n ║ FUNCTIONS INHERITED BY ERC20PresetMinterPauser ║\n ╚══════════════════════════════════════════════════════╝*/\n\n function totalSupply() public view virtual override(ERC20, ISyntheticToken) returns (uint256) {\n return ERC20.totalSupply();\n }\n\n /** \n @notice Mints a number of synthetic tokens for an address.\n @dev Can only be called by addresses with a minter role. \n This should correspond to the Long Short contract.\n @param to The address for which to mint the tokens for.\n @param amount Amount of synthetic tokens to mint in wei.\n */\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\n _mint(to, amount);\n }\n\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\n /// @param amount The amount of tokens to burn in wei.\n function burn(uint256 amount) public override(ERC20Burnable, ISyntheticToken) {\n require(msg.sender == longShort, \"Only LongShort contract\");\n super._burn(_msgSender(), amount);\n }\n\n /** \n @notice Overrides the default ERC20 transferFrom.\n @dev To allow users to avoid approving LongShort when redeeming tokens,\n longShort has a virtual infinite allowance.\n @param sender User for which to transfer tokens.\n @param recipient Recipient of the transferred tokens.\n @param amount Amount of tokens to transfer in wei.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override(ERC20, ISyntheticToken) returns (bool) {\n if (recipient == longShort && msg.sender == longShort) {\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\n ERC20._transfer(sender, recipient, amount);\n return true;\n } else {\n return ERC20.transferFrom(sender, recipient, amount);\n }\n }\n\n function transfer(address recipient, uint256 amount)\n public\n virtual\n override(ERC20, ISyntheticToken)\n returns (bool)\n {\n return ERC20.transfer(recipient, amount);\n }\n\n /** \n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\n tokens from next price actions before any token transfer occurs.\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\n @param sender User for which tokens are to be transferred for.\n */\n function _beforeTokenTransfer(\n address sender,\n address to,\n uint256 amount\n ) internal override {\n if (sender != longShort) {\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\n }\n super._beforeTokenTransfer(sender, to, amount);\n }\n\n /** \n @notice Gets the synthetic token balance of the user in wei.\n @dev To automatically account for next price actions which have been confirmed but not settled,\n includes any outstanding tokens owed by longShort.\n @param account The address for which to get the balance of.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return\n ERC20.balanceOf(account) +\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\n account,\n marketIndex,\n isLong\n );\n }\n}\n" + }, + "contracts/TokenFactory.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./SyntheticToken.sol\";\nimport \"./interfaces/ITokenFactory.sol\";\n\n/// @title TokenFactory\n/// @notice contract is used to reliably mint the synthetic tokens used by the float protocol.\ncontract TokenFactory is ITokenFactory {\n /*╔═══════════════════════════╗\n ║ STATE ║\n ╚═══════════════════════════╝*/\n\n /// @notice address of long short contract\n address public immutable longShort;\n\n /*╔═══════════════════════════╗\n ║ MODIFIERS ║\n ╚═══════════════════════════╝*/\n\n /// @dev only allow longShort contract to call this function\n modifier onlyLongShort() {\n require(msg.sender == address(longShort));\n _;\n }\n\n /*╔════════════════════════════╗\n ║ SET-UP ║\n ╚════════════════════════════╝*/\n\n /// @notice sets the address of the longShort contract on initialization\n /// @param _longShort address of the longShort contract\n constructor(address _longShort) {\n longShort = _longShort;\n }\n\n /*╔════════════════════════════╗\n ║ TOKEN CREATION ║\n ╚════════════════════════════╝*/\n\n /// @notice creates and sets up a new synthetic token\n /// @param syntheticName name of the synthetic token\n /// @param syntheticSymbol ticker symbol of the synthetic token\n /// @param staker address of the staker contract\n /// @param marketIndex market index this synthetic token belongs to\n /// @param isLong boolean denoting if the synthetic token is long or short\n /// @return syntheticToken - address of the created synthetic token\n function createSyntheticToken(\n string calldata syntheticName,\n string calldata syntheticSymbol,\n address staker,\n uint32 marketIndex,\n bool isLong\n ) external override onlyLongShort returns (address syntheticToken) {\n syntheticToken = address(\n new SyntheticToken(syntheticName, syntheticSymbol, longShort, staker, marketIndex, isLong)\n );\n }\n}\n" + }, + "contracts/mocks/ERC20Mock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\";\n\ncontract ERC20Mock is ERC20PresetMinterPauser {\n constructor(string memory name, string memory symbol) ERC20PresetMinterPauser(name, symbol) {}\n\n event TransferCalled(address sender, address recipient, uint256 amount);\n\n bool shouldMockTransfer = true;\n\n function setShouldMockTransfer(bool _value) public {\n shouldMockTransfer = _value;\n }\n\n function transfer(address recipient, uint256 amount) public override returns (bool) {\n emit TransferCalled(_msgSender(), recipient, amount);\n if (shouldMockTransfer) {\n return true;\n } else {\n return super.transfer(recipient, amount);\n }\n }\n}\n" + }, + "contracts/mocks/AaveIncentivesControllerMock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\";\nimport \"../interfaces/aave/IAaveIncentivesController.sol\";\n\ncontract AaveIncentivesControllerMock is IAaveIncentivesController {\n function claimRewards(\n address[] calldata assets,\n uint256 amount,\n address to\n ) external override returns (uint256 amountToClaim) {}\n\n function getUserUnclaimedRewards(address user)\n external\n view\n override\n returns (uint256 usersUnclaimedRewards)\n {}\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.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 _upgradeToAndCallSecure(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n address oldImplementation = _getImplementation();\n\n // Initial upgrade and setup call\n _setImplementation(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n\n // Perform rollback test if not already in progress\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\n if (!rollbackTesting.value) {\n // Trigger rollback using upgradeTo from the new implementation\n rollbackTesting.value = true;\n Address.functionDelegateCall(\n newImplementation,\n abi.encodeWithSignature(\"upgradeTo(address)\", oldImplementation)\n );\n rollbackTesting.value = false;\n // Check rollback was effective\n require(oldImplementation == _getImplementation(), \"ERC1967Upgrade: upgrade breaks further upgrades\");\n // Finally reset to the new implementation and log the upgrade\n _upgradeTo(newImplementation);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\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" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\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" + }, + "@openzeppelin/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\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 internall 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" + }, + "contracts/deployment/UUPSProxy.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\";\n\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\ncontract UUPSProxy is ERC1967Proxy {\n constructor(\n address _logic,\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\n bytes memory _data\n ) payable ERC1967Proxy(_logic, _data) {}\n}\n" + }, + "contracts/mocks/OracleManagerMock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"../interfaces/IOracleManager.sol\";\n\n/*\n * Mock implementation of an OracleManager with fixed, changeable prices.\n */\ncontract OracleManagerMock is IOracleManager {\n // Admin contract.\n address public admin;\n\n // Global state.\n int256 currentPrice; // e18\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier adminOnly() {\n require(msg.sender == admin, \"Not admin\");\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n\n constructor(address _admin) {\n admin = _admin;\n\n // Default to a price of 1.\n currentPrice = 1e18;\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n\n function setPrice(int256 newPrice) public adminOnly {\n currentPrice = newPrice;\n }\n\n function updatePrice() external override returns (int256) {\n return currentPrice;\n }\n\n function getLatestPrice() external view override returns (int256) {\n return currentPrice;\n }\n}\n" + }, + "contracts/mocks/LendingPoolAddressesProvider.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"../interfaces/aave/ILendingPoolAddressesProvider.sol\";\n\ncontract LendingPoolAddressesProviderMock is ILendingPoolAddressesProvider {\n address public lendingPool;\n\n function setLendingPool(address _lendingPool) external {\n lendingPool = _lendingPool;\n }\n\n function getLendingPool() external view override returns (address) {\n return lendingPool;\n }\n}\n" + }, + "contracts/FloatCapital_v0.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\n\n/** @title Float Capital Contract */\ncontract FloatCapital_v0 is AccessControlledAndUpgradeable {\n /*╔═════════════════════════════╗\n ║ CONTRACT SETUP ║\n ╚═════════════════════════════╝*/\n\n function initialize(address _admin) external initializer {\n _AccessControlledAndUpgradeable_init(_admin);\n }\n\n /** A percentage of float token to accrue here for project\n development */\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "devdoc", + "userdoc" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/polygon/.chainId b/deployments/polygon/.chainId new file mode 100644 index 0000000..0973804 --- /dev/null +++ b/deployments/polygon/.chainId @@ -0,0 +1 @@ +137 \ No newline at end of file diff --git a/deployments/polygon/AlphaTestFLT.json b/deployments/polygon/AlphaTestFLT.json new file mode 100644 index 0000000..3f8d94c --- /dev/null +++ b/deployments/polygon/AlphaTestFLT.json @@ -0,0 +1,1147 @@ +{ + "address": "0x01309A1Ec476871760D9Ea454628500BCcc1E011", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32", + "name": "pos", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint224", + "name": "votes", + "type": "uint224" + } + ], + "internalType": "struct ERC20VotesUpgradeable.Checkpoint", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "stakerAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "treasuryAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xfdbd67fc3e1ca35d1345c043ffdb0aa54a2a56a8a67d0883e0740a00a672ffb3", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x01309A1Ec476871760D9Ea454628500BCcc1E011", + "transactionIndex": 52, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000400000000000000000000000400000000000000000000000000000000000000000008000000000000000000000000000000000000000000040000000000002800000000000000000000100000000000000000000100200000400000000000000000000000000000080000000000000000000000020000000000000000000000400000000000000000001000000000000200000000000000000000000000000000000000000000000000000000000004000000020000008000001000000000008000000000000000000100000200000000000000000000200000000000000000000000000000000000000000000100000", + "blockHash": "0x15d618e7af12e1ebbbd6f1aaec06bfd1ce0cdb6098418ca975cd4755c8f092af", + "transactionHash": "0xfdbd67fc3e1ca35d1345c043ffdb0aa54a2a56a8a67d0883e0740a00a672ffb3", + "logs": [ + { + "transactionIndex": 52, + "blockNumber": 19058323, + "transactionHash": "0xfdbd67fc3e1ca35d1345c043ffdb0aa54a2a56a8a67d0883e0740a00a672ffb3", + "address": "0x01309A1Ec476871760D9Ea454628500BCcc1E011", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000003d4857c545673f8249a9f87f3559e7eea8fa1d02" + ], + "data": "0x", + "logIndex": 538, + "blockHash": "0x15d618e7af12e1ebbbd6f1aaec06bfd1ce0cdb6098418ca975cd4755c8f092af" + }, + { + "transactionIndex": 52, + "blockNumber": 19058323, + "transactionHash": "0xfdbd67fc3e1ca35d1345c043ffdb0aa54a2a56a8a67d0883e0740a00a672ffb3", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000bc6044f4a1688d8b8596a9f7d4659e09985eebe6" + ], + "data": "0x0000000000000000000000000000000000000000000000000000fa2927e62f800000000000000000000000000000000000000000000000000dd2eed936e397a00000000000000000000000000000000000000000000004451d01e2c7f5aa698b0000000000000000000000000000000000000000000000000dd1f4b00efd68200000000000000000000000000000000000000000000004451d02dcf11d90990b", + "logIndex": 539, + "blockHash": "0x15d618e7af12e1ebbbd6f1aaec06bfd1ce0cdb6098418ca975cd4755c8f092af" + } + ], + "blockNumber": 19058323, + "cumulativeGasUsed": "16216479", + "status": 1, + "byzantium": true + }, + "args": [ + "0x3d4857C545673f8249a9F87f3559E7eeA8fa1D02", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0x" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "implementation": "0x3d4857C545673f8249a9F87f3559E7eeA8fa1D02", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/AlphaTestFLT_Implementation.json b/deployments/polygon/AlphaTestFLT_Implementation.json new file mode 100644 index 0000000..ff254f1 --- /dev/null +++ b/deployments/polygon/AlphaTestFLT_Implementation.json @@ -0,0 +1,1616 @@ +{ + "address": "0x3d4857C545673f8249a9F87f3559E7eeA8fa1D02", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32", + "name": "pos", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint224", + "name": "votes", + "type": "uint224" + } + ], + "internalType": "struct ERC20VotesUpgradeable.Checkpoint", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "stakerAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "treasuryAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x773fa9cee96817da15fa48f02dfba60dea9ad6ce631622d0d4e3ca21a41e1710", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x3d4857C545673f8249a9F87f3559E7eeA8fa1D02", + "transactionIndex": 115, + "gasUsed": "3148215", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000400000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000001000000000000200000000000000000000000000000000000000000000000000000000000004000000000000008000001000000000008000000000000000000100000000000000000000000000200000000000000000000000000000000000000000000100000", + "blockHash": "0x662a87ea4af23f37214f2deba776187295fc1d7ae01e41c9ca5c7d5c7439bf8c", + "transactionHash": "0x773fa9cee96817da15fa48f02dfba60dea9ad6ce631622d0d4e3ca21a41e1710", + "logs": [ + { + "transactionIndex": 115, + "blockNumber": 19058317, + "transactionHash": "0x773fa9cee96817da15fa48f02dfba60dea9ad6ce631622d0d4e3ca21a41e1710", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000bc6044f4a1688d8b8596a9f7d4659e09985eebe6" + ], + "data": "0x000000000000000000000000000000000000000000000000000dc7da708068600000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000444d375651499f0a3570000000000000000000000000000000000000000000000000dd2eed936e397a0000000000000000000000000000000000000000000000444d3832cef0a710bb7", + "logIndex": 436, + "blockHash": "0x662a87ea4af23f37214f2deba776187295fc1d7ae01e41c9ca5c7d5c7439bf8c" + } + ], + "blockNumber": 19058317, + "cumulativeGasUsed": "14801986", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"pos\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint224\",\"name\":\"votes\",\"type\":\"uint224\"}],\"internalType\":\"struct ERC20VotesUpgradeable.Checkpoint\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"stakerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasuryAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"Destroys `amount` tokens from the caller. See {ERC20-_burn}.\"},\"checkpoints(address,uint32)\":{\"details\":\"Get the `pos`-th checkpoint for `account`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"delegate(address)\":{\"details\":\"Delegate votes from the sender to `delegatee`.\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Delegates votes from signer to `delegatee`\"},\"delegates(address)\":{\"details\":\"Get the address `account` is currently delegating to.\"},\"getPastTotalSupply(uint256)\":{\"details\":\"Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances. It is but NOT the sum of all the delegated votes! Requirements: - `blockNumber` must have been already mined\"},\"getPastVotes(address,uint256)\":{\"details\":\"Retrieve the number of votes for `account` at the end of `blockNumber`. Requirements: - `blockNumber` must have been already mined\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getVotes(address)\":{\"details\":\"Gets the current votes balance for `account`\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initialize(string,string,address,address)\":{\"details\":\"This function is called `initialize` to differentiate it from `initialize(string,string)` in the parent contract which should NOT be called to initialize this contract. \",\"params\":{\"name\":\"The name of the Float governance token\",\"stakerAddress\":\"The staker contract that controls minting of the token\",\"symbol\":\"The ticker representing the token\"}},\"mint(address,uint256)\":{\"details\":\"Can only be called by addresses with a MINTER_ROLE. This should correspond to the Staker contract.\",\"params\":{\"amount\":\"Amount of synthetic tokens to mint in wei.\",\"to\":\"The address for which to mint the tokens for.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"numCheckpoints(address)\":{\"details\":\"Get number of checkpoints for `account`.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"FloatToken\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize(string,string,address,address)\":{\"notice\":\"Initialize the Float Token with relevant\"},\"mint(address,uint256)\":{\"notice\":\"Mints an amount of Float tokens for an address.\"}},\"notice\":\"The Float Token is the governance token for the Float Capital protocol\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/AlphaTestFLT.sol\":\"AlphaTestFLT\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n __AccessControlEnumerable_init_unchained();\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {grantRole} to track enumerable memberships\\n */\\n function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\\n super.grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {revokeRole} to track enumerable memberships\\n */\\n function revokeRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\\n super.revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev Overload {renounceRole} to track enumerable memberships\\n */\\n function renounceRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\\n super.renounceRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev Overload {_setupRole} to track enumerable memberships\\n */\\n function _setupRole(bytes32 role, address account) internal virtual override {\\n super._setupRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2d8b1825d587f3384d6d87655f3cb66f0d71fe8dda7d98f2f9267a4bb842927d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf87bd7a150c81aad67bb354413fe55cb005e922c6e48d3580a63e32efa913c74\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x742c0fbab73bf595ca40025f6e81cb48dbd5e133950717f7befd062a925c0148\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\\n function __ERC20Burnable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC20Burnable_init_unchained();\\n }\\n\\n function __ERC20Burnable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5321bbe08dd6e82e85222024dc300d4959ff8615742ad63135759883a19e02a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../security/PausableUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev ERC20 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n */\\nabstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable {\\n function __ERC20Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n __ERC20Pausable_init_unchained();\\n }\\n\\n function __ERC20Pausable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev See {ERC20-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n require(!paused(), \\\"ERC20Pausable: token transfer while paused\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x84f8ee06b780f3294755a13a74e7d4f11599b2c42a09d920f0a191a5f3c6f2dc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"../../../utils/math/MathUpgradeable.sol\\\";\\nimport \\\"../../../utils/math/SafeCastUpgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,\\n * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.\\n *\\n * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.\\n *\\n * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either\\n * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting\\n * power can be queried through the public accessors {getVotes} and {getPastVotes}.\\n *\\n * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it\\n * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.\\n * Enabling self-delegation can easily be done by overriding the {delegates} function. Keep in mind however that this\\n * will significantly increase the base gas cost of transfers.\\n *\\n * _Available since v4.2._\\n */\\nabstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable {\\n function __ERC20Votes_init_unchained() internal initializer {\\n }\\n struct Checkpoint {\\n uint32 fromBlock;\\n uint224 votes;\\n }\\n\\n bytes32 private constant _DELEGATION_TYPEHASH =\\n keccak256(\\\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\\\");\\n\\n mapping(address => address) private _delegates;\\n mapping(address => Checkpoint[]) private _checkpoints;\\n Checkpoint[] private _totalSupplyCheckpoints;\\n\\n /**\\n * @dev Emitted when an account changes their delegate.\\n */\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n\\n /**\\n * @dev Emitted when a token transfer or delegate change results in changes to an account's voting power.\\n */\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /**\\n * @dev Get the `pos`-th checkpoint for `account`.\\n */\\n function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) {\\n return _checkpoints[account][pos];\\n }\\n\\n /**\\n * @dev Get number of checkpoints for `account`.\\n */\\n function numCheckpoints(address account) public view virtual returns (uint32) {\\n return SafeCastUpgradeable.toUint32(_checkpoints[account].length);\\n }\\n\\n /**\\n * @dev Get the address `account` is currently delegating to.\\n */\\n function delegates(address account) public view virtual returns (address) {\\n return _delegates[account];\\n }\\n\\n /**\\n * @dev Gets the current votes balance for `account`\\n */\\n function getVotes(address account) public view returns (uint256) {\\n uint256 pos = _checkpoints[account].length;\\n return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\\n }\\n\\n /**\\n * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastVotes(address account, uint256 blockNumber) public view returns (uint256) {\\n require(blockNumber < block.number, \\\"ERC20Votes: block not yet mined\\\");\\n return _checkpointsLookup(_checkpoints[account], blockNumber);\\n }\\n\\n /**\\n * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.\\n * It is but NOT the sum of all the delegated votes!\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastTotalSupply(uint256 blockNumber) public view returns (uint256) {\\n require(blockNumber < block.number, \\\"ERC20Votes: block not yet mined\\\");\\n return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);\\n }\\n\\n /**\\n * @dev Lookup a value in a list of (sorted) checkpoints.\\n */\\n function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {\\n // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.\\n //\\n // During the loop, the index of the wanted checkpoint remains in the range [low-1, high).\\n // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant.\\n // - If the middle checkpoint is after `blockNumber`, we look in [low, mid)\\n // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high)\\n // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not\\n // out of bounds (in which case we're looking too far in the past and the result is 0).\\n // Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is\\n // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out\\n // the same.\\n uint256 high = ckpts.length;\\n uint256 low = 0;\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (ckpts[mid].fromBlock > blockNumber) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n return high == 0 ? 0 : ckpts[high - 1].votes;\\n }\\n\\n /**\\n * @dev Delegate votes from the sender to `delegatee`.\\n */\\n function delegate(address delegatee) public virtual {\\n return _delegate(_msgSender(), delegatee);\\n }\\n\\n /**\\n * @dev Delegates votes from signer to `delegatee`\\n */\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual {\\n require(block.timestamp <= expiry, \\\"ERC20Votes: signature expired\\\");\\n address signer = ECDSAUpgradeable.recover(\\n _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),\\n v,\\n r,\\n s\\n );\\n require(nonce == _useNonce(signer), \\\"ERC20Votes: invalid nonce\\\");\\n return _delegate(signer, delegatee);\\n }\\n\\n /**\\n * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1).\\n */\\n function _maxSupply() internal view virtual returns (uint224) {\\n return type(uint224).max;\\n }\\n\\n /**\\n * @dev Snapshots the totalSupply after it has been increased.\\n */\\n function _mint(address account, uint256 amount) internal virtual override {\\n super._mint(account, amount);\\n require(totalSupply() <= _maxSupply(), \\\"ERC20Votes: total supply risks overflowing votes\\\");\\n\\n _writeCheckpoint(_totalSupplyCheckpoints, _add, amount);\\n }\\n\\n /**\\n * @dev Snapshots the totalSupply after it has been decreased.\\n */\\n function _burn(address account, uint256 amount) internal virtual override {\\n super._burn(account, amount);\\n\\n _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount);\\n }\\n\\n /**\\n * @dev Move voting power when tokens are transferred.\\n *\\n * Emits a {DelegateVotesChanged} event.\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._afterTokenTransfer(from, to, amount);\\n\\n _moveVotingPower(delegates(from), delegates(to), amount);\\n }\\n\\n /**\\n * @dev Change delegation for `delegator` to `delegatee`.\\n *\\n * Emits events {DelegateChanged} and {DelegateVotesChanged}.\\n */\\n function _delegate(address delegator, address delegatee) internal virtual {\\n address currentDelegate = delegates(delegator);\\n uint256 delegatorBalance = balanceOf(delegator);\\n _delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveVotingPower(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _moveVotingPower(\\n address src,\\n address dst,\\n uint256 amount\\n ) private {\\n if (src != dst && amount > 0) {\\n if (src != address(0)) {\\n (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount);\\n emit DelegateVotesChanged(src, oldWeight, newWeight);\\n }\\n\\n if (dst != address(0)) {\\n (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount);\\n emit DelegateVotesChanged(dst, oldWeight, newWeight);\\n }\\n }\\n }\\n\\n function _writeCheckpoint(\\n Checkpoint[] storage ckpts,\\n function(uint256, uint256) view returns (uint256) op,\\n uint256 delta\\n ) private returns (uint256 oldWeight, uint256 newWeight) {\\n uint256 pos = ckpts.length;\\n oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;\\n newWeight = op(oldWeight, delta);\\n\\n if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {\\n ckpts[pos - 1].votes = SafeCastUpgradeable.toUint224(newWeight);\\n } else {\\n ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(block.number), votes: SafeCastUpgradeable.toUint224(newWeight)}));\\n }\\n }\\n\\n function _add(uint256 a, uint256 b) private pure returns (uint256) {\\n return a + b;\\n }\\n\\n function _subtract(uint256 a, uint256 b) private pure returns (uint256) {\\n return a - b;\\n }\\n uint256[47] private __gap;\\n}\\n\",\"keccak256\":\"0xb0a5a6f23ddf9a8583e86a0831e3f8b28df6d24a316ea1c9b37a3bded254a950\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation 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 *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal initializer {\\n __Context_init_unchained();\\n __EIP712_init_unchained(name, \\\"1\\\");\\n __ERC20Permit_init_unchained(name);\\n }\\n\\n function __ERC20Permit_init_unchained(string memory name) internal initializer {\\n _PERMIT_TYPEHASH = keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\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 ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xf07c1013d0ecf7a80ff5bf8f59105fc0acc5bf83aa4196b409d9ac3666d37cc6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e321ee7110594e92c1c834d7de2fbdfd01fbed6c06127fe75c5836fe80a24a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"../extensions/ERC20PausableUpgradeable.sol\\\";\\nimport \\\"../../../access/AccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev {ERC20} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n */\\ncontract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlEnumerableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable {\\n function initialize(string memory name, string memory symbol) public virtual initializer {\\n __ERC20PresetMinterPauser_init(name, symbol);\\n }\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\n * account that deploys the contract.\\n *\\n * See {ERC20-constructor}.\\n */\\n function __ERC20PresetMinterPauser_init(string memory name, string memory symbol) internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n __AccessControlEnumerable_init_unchained();\\n __ERC20_init_unchained(name, symbol);\\n __ERC20Burnable_init_unchained();\\n __Pausable_init_unchained();\\n __ERC20Pausable_init_unchained();\\n __ERC20PresetMinterPauser_init_unchained(name, symbol);\\n }\\n\\n function __ERC20PresetMinterPauser_init_unchained(string memory name, string memory symbol) internal initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n }\\n\\n /**\\n * @dev Creates `amount` new tokens for `to`.\\n *\\n * See {ERC20-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(address to, uint256 amount) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC20PresetMinterPauser: must have minter role to mint\\\");\\n _mint(to, amount);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC20Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC20PresetMinterPauser: must have pauser role to pause\\\");\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC20Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC20PresetMinterPauser: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override(ERC20Upgradeable, ERC20PausableUpgradeable) {\\n super._beforeTokenTransfer(from, to, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xdf3ba47b3559c6760157d0ec93be6d3aec6b5eb785b85acb20ac2bb0cb003b74\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x00c96e792d367a436015f12ce2665aa8e2a0d61d2c6045a82cbb37da20e5a042\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x07411372282794f7ecde69a1065e5d20441abe7c9f8861437b4d45c9a4712fa6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal initializer {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal initializer {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x30f3940c119b4d93578bac394f43ee9b0b8465ea1e60b316244183be2983a5ed\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\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 / b + (a % b == 0 ? 0 : 1);\\n }\\n}\\n\",\"keccak256\":\"0xd10ce93bb60b3d8ad10fffca3d35594eba4a58e6c76a7ad96d184c326f88d9ac\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCastUpgradeable {\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= type(int128).min && value <= type(int128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= type(int64).min && value <= type(int64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= type(int32).min && value <= type(int32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= type(int16).min && value <= type(int16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= type(int8).min && value <= type(int8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0xb92541cd02568981bc3dac94060d542ab3231d8f30ade82aeba0588761c1b649\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9dc1ad66ada6a503bef1ffde62ac688c58eac660fe50c054f6e49e3b27ae295d\",\"license\":\"MIT\"},\"contracts/AlphaTestFLT.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\\\";\\n\\nimport \\\"./interfaces/IFloatToken.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\n/**\\n @title FloatToken\\n @notice The Float Token is the governance token for the Float Capital protocol\\n */\\ncontract AlphaTestFLT is\\n IFloatToken,\\n Initializable,\\n ERC20Upgradeable,\\n ERC20BurnableUpgradeable,\\n PausableUpgradeable,\\n AccessControlUpgradeable,\\n ERC20PermitUpgradeable,\\n ERC20VotesUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n\\n address public treasury;\\n\\n /**\\n @notice Initialize the Float Token with relevant\\n @dev This function is called `initialize` to differentiate it from `initialize(string,string)` in the parent contract which should NOT be called to initialize this contract. \\n @param name The name of the Float governance token\\n @param symbol The ticker representing the token\\n @param stakerAddress The staker contract that controls minting of the token\\n */\\n function initialize(\\n string calldata name,\\n string calldata symbol,\\n address stakerAddress,\\n address treasuryAddress\\n ) external initializer {\\n __ERC20_init(name, symbol);\\n __ERC20Burnable_init();\\n __Pausable_init();\\n __AccessControl_init();\\n __ERC20Permit_init(name);\\n __UUPSUpgradeable_init();\\n\\n treasury = treasuryAddress;\\n\\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n renounceRole(MINTER_ROLE, msg.sender);\\n\\n _setupRole(DEFAULT_ADMIN_ROLE, stakerAddress);\\n _setupRole(MINTER_ROLE, stakerAddress);\\n\\n _setupRole(PAUSER_ROLE, msg.sender);\\n _setupRole(UPGRADER_ROLE, msg.sender);\\n\\n // Token starts as paused\\n _pause();\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 FUNCTIONS INHERITED BY ERC20PresetMinterPauserUpgradeable \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /** \\n @notice Mints an amount of Float tokens for an address.\\n @dev Can only be called by addresses with a MINTER_ROLE. \\n This should correspond to the Staker contract.\\n @param to The address for which to mint the tokens for.\\n @param amount Amount of synthetic tokens to mint in wei.\\n */\\n function mint(address to, uint256 amount) external override(IFloatToken) onlyRole(MINTER_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /**\\n @notice modify token functionality so that a pausing this token doesn't affect minting\\n @dev Pause functionality in the open zeppelin ERC20PresetMinterPauserUpgradeable comes from the below function.\\n We override it to exclude anyone with the minter role (ie the Staker contract)\\n @param from address tokens are being sent from\\n @param to address tokens are being sent to\\n @param amount amount of tokens being sent\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n require(!paused() || hasRole(MINTER_ROLE, _msgSender()), \\\"Paused and not minter\\\");\\n\\n super._beforeTokenTransfer(from, to, amount);\\n }\\n\\n function pause() external onlyRole(PAUSER_ROLE) {\\n _pause();\\n }\\n\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\\n\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) {\\n super._afterTokenTransfer(from, to, amount);\\n }\\n\\n function _mint(address to, uint256 amount)\\n internal\\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\\n {\\n super._mint(to, amount);\\n }\\n\\n function _burn(address account, uint256 amount)\\n internal\\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\\n {\\n super._burn(account, amount);\\n }\\n\\n function totalSupply()\\n public\\n view\\n virtual\\n override(ERC20Upgradeable, IFloatToken)\\n returns (uint256)\\n {\\n return ERC20Upgradeable.totalSupply();\\n }\\n\\n function transfer(address recipient, uint256 amount)\\n public\\n virtual\\n override(ERC20Upgradeable, IFloatToken)\\n returns (bool)\\n {\\n return ERC20Upgradeable.transfer(recipient, amount);\\n }\\n\\n function burnFrom(address account, uint256 amount)\\n public\\n virtual\\n override(ERC20BurnableUpgradeable, IFloatToken)\\n {\\n // If the burn comes from the treasury, let it happen automatically.\\n // This is only for the alpha launch, no need to add these permissions to the main FLT deployment.\\n if (msg.sender == treasury) {\\n _burn(account, amount);\\n } else {\\n ERC20BurnableUpgradeable.burnFrom(account, amount);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5276f7aa01407f5ead98df5ce0451ebcbb1381dba81e7a154f915a1b8b6d87ba\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IFloatToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IFloatToken {\\n function mint(address to, uint256 amount) external;\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function burnFrom(address account, uint256 amount) external virtual;\\n}\\n\",\"keccak256\":\"0xdec0736a73d0855ee353797430e196f9be074ccd728209e28e881ffa24d76e5d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506137ff806100206000396000f3fe6080604052600436106102515760003560e01c80636fcfff4511610139578063a217fddf116100b6578063d53913931161007a578063d539139314610710578063d547741f14610732578063dd62ed3e14610752578063e63ab1e914610798578063f1127ed8146107ba578063f72c0d8b1461080457610251565b8063a217fddf1461067b578063a457c2d714610690578063a9059cbb146106b0578063c3cda520146106d0578063d505accf146106f057610251565b80638e539e8c116100fd5780638e539e8c146105e65780638f15b4141461060657806391d148541461062657806395d89b41146106465780639ab24eb01461065b57610251565b80636fcfff451461052657806370a082311461055b57806379cc6790146105915780637ecebe00146105b15780638456cb59146105d157610251565b80633659cfe6116101d257806342966c681161019657806342966c68146104485780634f1ef28614610468578063587cde1e1461047b5780635c19a95c146104cd5780635c975abb146104ed57806361d027b31461050557610251565b80633659cfe6146103b357806339509351146103d35780633a46b1a8146103f35780633f4ba83a1461041357806340c10f191461042857610251565b8063248a9ca311610219578063248a9ca3146103105780632f2ff15d14610340578063313ce567146103625780633644e5151461037e57806336568abe1461039357610251565b806301ffc9a71461025657806306fdde031461028b578063095ea7b3146102ad57806318160ddd146102cd57806323b872dd146102f0575b600080fd5b34801561026257600080fd5b50610276610271366004613489565b610838565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a0610871565b60405161028291906135cf565b3480156102b957600080fd5b506102766102c8366004613391565b610903565b3480156102d957600080fd5b506102e2610919565b604051908152602001610282565b3480156102fc57600080fd5b5061027661030b366004613230565b610929565b34801561031c57600080fd5b506102e261032b36600461344f565b600090815260fb602052604090206001015490565b34801561034c57600080fd5b5061036061035b366004613467565b6109da565b005b34801561036e57600080fd5b5060405160128152602001610282565b34801561038a57600080fd5b506102e2610a06565b34801561039f57600080fd5b506103606103ae366004613467565b610a10565b3480156103bf57600080fd5b506103606103ce3660046131e4565b610a8e565b3480156103df57600080fd5b506102766103ee366004613391565b610ab5565b3480156103ff57600080fd5b506102e261040e366004613391565b610af1565b34801561041f57600080fd5b50610360610b65565b34801561043457600080fd5b50610360610443366004613391565b610b86565b34801561045457600080fd5b5061036061046336600461344f565b610ba9565b6103606104763660046132d4565b610bb3565b34801561048757600080fd5b506104b56104963660046131e4565b6001600160a01b03908116600090815261019460205260409020541690565b6040516001600160a01b039091168152602001610282565b3480156104d957600080fd5b506103606104e83660046131e4565b610bc8565b3480156104f957600080fd5b5060975460ff16610276565b34801561051157600080fd5b5061022a546104b5906001600160a01b031681565b34801561053257600080fd5b506105466105413660046131e4565b610bd2565b60405163ffffffff9091168152602001610282565b34801561056757600080fd5b506102e26105763660046131e4565b6001600160a01b031660009081526033602052604090205490565b34801561059d57600080fd5b506103606105ac366004613391565b610bf5565b3480156105bd57600080fd5b506102e26105cc3660046131e4565b610c22565b3480156105dd57600080fd5b50610360610c41565b3480156105f257600080fd5b506102e261060136600461344f565b610c62565b34801561061257600080fd5b506103606106213660046134b1565b610cbf565b34801561063257600080fd5b50610276610641366004613467565b610eaf565b34801561065257600080fd5b506102a0610eda565b34801561066757600080fd5b506102e26106763660046131e4565b610ee9565b34801561068757600080fd5b506102e2600081565b34801561069c57600080fd5b506102766106ab366004613391565b610f80565b3480156106bc57600080fd5b506102766106cb366004613391565b611019565b3480156106dc57600080fd5b506103606106eb3660046133ba565b611025565b3480156106fc57600080fd5b5061036061070b36600461326b565b611152565b34801561071c57600080fd5b506102e26000805160206137aa83398151915281565b34801561073e57600080fd5b5061036061074d366004613467565b611299565b34801561075e57600080fd5b506102e261076d3660046131fe565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b3480156107a457600080fd5b506102e260008051602061376383398151915281565b3480156107c657600080fd5b506107da6107d5366004613411565b6112bf565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610282565b34801561081057600080fd5b506102e27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b148061086957506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60606036805461088090613701565b80601f01602080910402602001604051908101604052809291908181526020018280546108ac90613701565b80156108f95780601f106108ce576101008083540402835291602001916108f9565b820191906000526020600020905b8154815290600101906020018083116108dc57829003601f168201915b5050505050905090565b6000610910338484611352565b50600192915050565b600061092460355490565b905090565b6000610936848484611476565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156109c05760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6109cd8533858403611352565b60019150505b9392505050565b600082815260fb60205260409020600101546109f781335b61165b565b610a0183836116bf565b505050565b6000610924611745565b6001600160a01b0381163314610a805760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016109b7565b610a8a82826117c2565b5050565b610a9781611829565b610ab281604051806020016040528060008152506000611854565b50565b3360008181526034602090815260408083206001600160a01b03871684529091528120549091610910918590610aec908690613650565b611352565b6000438210610b425760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064016109b7565b6001600160a01b0383166000908152610195602052604090206109d390836119dc565b600080516020613763833981519152610b7e81336109f2565b610ab2611ab5565b6000805160206137aa833981519152610b9f81336109f2565b610a018383611b48565b610ab23382611b52565b610bbc82611829565b610a8a82826001611854565b610ab23382611b5c565b6001600160a01b0381166000908152610195602052604081205461086990611bd7565b61022a546001600160a01b0316331415610c1857610c138282611b52565b610a8a565b610a8a8282611c40565b6001600160a01b03811660009081526101616020526040812054610869565b600080516020613763833981519152610c5a81336109f2565b610ab2611cc1565b6000438210610cb35760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064016109b7565b610869610196836119dc565b600054610100900460ff1680610cd8575060005460ff16155b610cf45760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015610d16576000805461ffff19166101011790555b610d8987878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250611d3c92505050565b610d91611dbb565b610d99611e36565b610da1611e9d565b610de087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611efc92505050565b610de8611dbb565b61022a80546001600160a01b0319166001600160a01b038416179055610e0f600033610a10565b610e276000805160206137aa83398151915233610a10565b610e32600084611f9c565b610e4a6000805160206137aa83398151915284611f9c565b610e6260008051602061376383398151915233611f9c565b610e8c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611f9c565b610e94611cc1565b8015610ea6576000805461ff00191690555b50505050505050565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606037805461088090613701565b6001600160a01b038116600090815261019560205260408120548015610f6d576001600160a01b038316600090815261019560205260409020610f2d6001836136a7565b81548110610f4b57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316610f70565b60005b6001600160e01b03169392505050565b3360009081526034602090815260408083206001600160a01b0386168452909152812054828110156110025760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016109b7565b61100f3385858403611352565b5060019392505050565b60006109d38383611fa6565b834211156110755760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e6174757265206578706972656400000060448201526064016109b7565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906110ef906110e79060a00160405160208183030381529060405280519060200120611fb3565b858585612001565b90506110fa81612029565b86146111485760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e63650000000000000060448201526064016109b7565b610ea68188611b5c565b834211156111a25760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016109b7565b6000610162548888886111b48c612029565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061120f82611fb3565b9050600061121f82878787612001565b9050896001600160a01b0316816001600160a01b0316146112825760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016109b7565b61128d8a8a8a611352565b50505050505050505050565b600082815260fb60205260409020600101546112b581336109f2565b610a0183836117c2565b60408051808201909152600080825260208201526001600160a01b038316600090815261019560205260409020805463ffffffff841690811061131257634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b6001600160a01b0383166113b45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016109b7565b6001600160a01b0382166114155760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016109b7565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166114da5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016109b7565b6001600160a01b03821661153c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016109b7565b611547838383612052565b6001600160a01b038316600090815260336020526040902054818110156115bf5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016109b7565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906115f6908490613650565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161164291815260200190565b60405180910390a36116558484846120c0565b50505050565b6116658282610eaf565b610a8a5761167d816001600160a01b031660146120cb565b6116888360206120cb565b60405160200161169992919061355a565b60408051601f198184030181529082905262461bcd60e51b82526109b7916004016135cf565b6116c98282610eaf565b610a8a57600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff191660011790556117013390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006109247f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61177561012d5490565b61012e546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6117cc8282610eaf565b15610a8a57600082815260fb602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610a8a81336109f2565b60006118877f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050611892846122ad565b60008351118061189f5750815b156118b0576118ae8484612352565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff166119d557805460ff191660011781556040516001600160a01b038316602482015261192f90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052612352565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146119cc5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016109b7565b6119d58561243d565b5050505050565b8154600090815b81811015611a4e5760006119f7828461247d565b905084868281548110611a1a57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff161115611a3a57809250611a48565b611a45816001613650565b91505b506119e3565b8115611aa05784611a606001846136a7565b81548110611a7e57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316611aa3565b60005b6001600160e01b031695945050505050565b60975460ff16611afe5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109b7565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610a8a8282612498565b610a8a8282612528565b6001600160a01b0382811660008181526101946020818152604080842080546033845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611655828483612541565b600063ffffffff821115611c3c5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b60648201526084016109b7565b5090565b6000611c4c833361076d565b905081811015611caa5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b60648201526084016109b7565b611cb78333848403611352565b610a018383611b52565b60975460ff1615611d075760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109b7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b2b3390565b600054610100900460ff1680611d55575060005460ff16155b611d715760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015611d93576000805461ffff19166101011790555b611d9b612680565b611da583836126ea565b8015610a01576000805461ff0019169055505050565b600054610100900460ff1680611dd4575060005460ff16155b611df05760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015611e12576000805461ffff19166101011790555b611e1a612680565b611e22612680565b8015610ab2576000805461ff001916905550565b600054610100900460ff1680611e4f575060005460ff16155b611e6b5760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015611e8d576000805461ffff19166101011790555b611e95612680565b611e2261277f565b600054610100900460ff1680611eb6575060005460ff16155b611ed25760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015611ef4576000805461ffff19166101011790555b611e12612680565b600054610100900460ff1680611f15575060005460ff16155b611f315760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015611f53576000805461ffff19166101011790555b611f5b612680565b611f7e82604051806040016040528060018152602001603160f81b8152506127f4565b611f8782612880565b8015610a8a576000805461ff00191690555050565b610a8a82826116bf565b6000610910338484611476565b6000610869611fc0611745565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061201287878787612911565b9150915061201f816129fe565b5095945050505050565b6001600160a01b0381166000908152610161602052604090208054600181018255905b50919050565b60975460ff16158061207757506120776000805160206137aa83398151915233610641565b6120bb5760405162461bcd60e51b81526020600482015260156024820152742830bab9b2b21030b732103737ba1036b4b73a32b960591b60448201526064016109b7565b610a01565b610a01838383612c01565b606060006120da836002613688565b6120e5906002613650565b67ffffffffffffffff81111561210b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612135576020820181803683370190505b509050600360fc1b8160008151811061215e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061219b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006121bf846002613688565b6121ca906001613650565b90505b600181111561225e576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061220c57634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061223057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93612257816136ea565b90506121cd565b5083156109d35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109b7565b803b6123115760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016109b7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6123b15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016109b7565b600080846001600160a01b0316846040516123cc919061353e565b600060405180830381855af49150503d8060008114612407576040519150601f19603f3d011682016040523d82523d6000602084013e61240c565b606091505b5091509150612434828260405180606001604052806027815260200161378360279139612c34565b95945050505050565b612446816122ad565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600061248c6002848418613668565b6109d390848416613650565b6124a28282612c6d565b6001600160e01b036124b2610919565b11156125195760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b60648201526084016109b7565b611655610196612d6083612d6c565b6125328282612f0f565b61165561019661307083612d6c565b816001600160a01b0316836001600160a01b0316141580156125635750600081115b15610a01576001600160a01b038316156125f2576001600160a01b038316600090815261019560205260408120819061259f9061307085612d6c565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516125e7929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615610a01576001600160a01b038216600090815261019560205260408120819061262990612d6085612d6c565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612671929190918252602082015260400190565b60405180910390a25050505050565b600054610100900460ff1680612699575060005460ff16155b6126b55760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015611e22576000805461ffff19166101011790558015610ab2576000805461ff001916905550565b600054610100900460ff1680612703575060005460ff16155b61271f5760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015612741576000805461ffff19166101011790555b82516127549060369060208601906130e5565b5081516127689060379060208501906130e5565b508015610a01576000805461ff0019169055505050565b600054610100900460ff1680612798575060005460ff16155b6127b45760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff161580156127d6576000805461ffff19166101011790555b6097805460ff191690558015610ab2576000805461ff001916905550565b600054610100900460ff168061280d575060005460ff16155b6128295760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff1615801561284b576000805461ffff19166101011790555b825160208085019190912083519184019190912061012d9190915561012e558015610a01576000805461ff0019169055505050565b600054610100900460ff1680612899575060005460ff16155b6128b55760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff161580156128d7576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610162558015610a8a576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561294857506000905060036129f5565b8460ff16601b1415801561296057508460ff16601c14155b1561297157506000905060046129f5565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156129c5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129ee576000600192509250506129f5565b9150600090505b94509492505050565b6000816004811115612a2057634e487b7160e01b600052602160045260246000fd5b1415612a2b57610ab2565b6001816004811115612a4d57634e487b7160e01b600052602160045260246000fd5b1415612a9b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109b7565b6002816004811115612abd57634e487b7160e01b600052602160045260246000fd5b1415612b0b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109b7565b6003816004811115612b2d57634e487b7160e01b600052602160045260246000fd5b1415612b865760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109b7565b6004816004811115612ba857634e487b7160e01b600052602160045260246000fd5b1415610ab25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109b7565b6001600160a01b0383811660009081526101946020526040808220548584168352912054610a0192918216911683612541565b60608315612c435750816109d3565b825115612c535782518084602001fd5b8160405162461bcd60e51b81526004016109b791906135cf565b6001600160a01b038216612cc35760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016109b7565b612ccf60008383612052565b8060356000828254612ce19190613650565b90915550506001600160a01b03821660009081526033602052604081208054839290612d0e908490613650565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610a8a600083836120c0565b60006109d38284613650565b825460009081908015612dc55785612d856001836136a7565b81548110612da357634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316612dc8565b60005b6001600160e01b03169250612de183858763ffffffff16565b9150600081118015612e2d57504386612dfb6001846136a7565b81548110612e1957634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff16145b15612e9b57612e3b8261307c565b86612e476001846136a7565b81548110612e6557634e487b7160e01b600052603260045260246000fd5b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b03160217905550612f06565b856040518060400160405280612eb043611bd7565b63ffffffff168152602001612ec48561307c565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b50935093915050565b6001600160a01b038216612f6f5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016109b7565b612f7b82600083612052565b6001600160a01b03821660009081526033602052604090205481811015612fef5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016109b7565b6001600160a01b038316600090815260336020526040812083830390556035805484929061301e9084906136a7565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610a01836000846120c0565b60006109d382846136a7565b60006001600160e01b03821115611c3c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b60648201526084016109b7565b8280546130f190613701565b90600052602060002090601f0160209004810192826131135760008555613159565b82601f1061312c57805160ff1916838001178555613159565b82800160010185558215613159579182015b8281111561315957825182559160200191906001019061313e565b50611c3c9291505b80821115611c3c5760008155600101613161565b80356001600160a01b038116811461086c57600080fd5b60008083601f84011261319d578182fd5b50813567ffffffffffffffff8111156131b4578182fd5b6020830191508360208285010111156131cc57600080fd5b9250929050565b803560ff8116811461086c57600080fd5b6000602082840312156131f5578081fd5b6109d382613175565b60008060408385031215613210578081fd5b61321983613175565b915061322760208401613175565b90509250929050565b600080600060608486031215613244578081fd5b61324d84613175565b925061325b60208501613175565b9150604084013590509250925092565b600080600080600080600060e0888a031215613285578283fd5b61328e88613175565b965061329c60208901613175565b955060408801359450606088013593506132b8608089016131d3565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156132e6578182fd5b6132ef83613175565b9150602083013567ffffffffffffffff8082111561330b578283fd5b818501915085601f83011261331e578283fd5b8135818111156133305761333061374c565b604051601f8201601f19908116603f011681019083821181831017156133585761335861374c565b81604052828152886020848701011115613370578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600080604083850312156133a3578182fd5b6133ac83613175565b946020939093013593505050565b60008060008060008060c087890312156133d2578182fd5b6133db87613175565b955060208701359450604087013593506133f7606088016131d3565b92506080870135915060a087013590509295509295509295565b60008060408385031215613423578182fd5b61342c83613175565b9150602083013563ffffffff81168114613444578182fd5b809150509250929050565b600060208284031215613460578081fd5b5035919050565b60008060408385031215613479578182fd5b8235915061322760208401613175565b60006020828403121561349a578081fd5b81356001600160e01b0319811681146109d3578182fd5b600080600080600080608087890312156134c9578182fd5b863567ffffffffffffffff808211156134e0578384fd5b6134ec8a838b0161318c565b90985096506020890135915080821115613504578384fd5b5061351189828a0161318c565b9095509350613524905060408801613175565b915061353260608801613175565b90509295509295509295565b600082516135508184602087016136be565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516135928160178501602088016136be565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516135c38160288401602088016136be565b01602801949350505050565b60006020825282518060208401526135ee8160408501602087016136be565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561366357613663613736565b500190565b60008261368357634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156136a2576136a2613736565b500290565b6000828210156136b9576136b9613736565b500390565b60005b838110156136d95781810151838201526020016136c1565b838111156116555750506000910152565b6000816136f9576136f9613736565b506000190190565b600181811c9082168061371557607f821691505b6020821081141561204c57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a26469706673582212203747b73d5aa3fbef5bda36d82ed42ace8b8cab16ab2e25194dceb975406bf3f364736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106102515760003560e01c80636fcfff4511610139578063a217fddf116100b6578063d53913931161007a578063d539139314610710578063d547741f14610732578063dd62ed3e14610752578063e63ab1e914610798578063f1127ed8146107ba578063f72c0d8b1461080457610251565b8063a217fddf1461067b578063a457c2d714610690578063a9059cbb146106b0578063c3cda520146106d0578063d505accf146106f057610251565b80638e539e8c116100fd5780638e539e8c146105e65780638f15b4141461060657806391d148541461062657806395d89b41146106465780639ab24eb01461065b57610251565b80636fcfff451461052657806370a082311461055b57806379cc6790146105915780637ecebe00146105b15780638456cb59146105d157610251565b80633659cfe6116101d257806342966c681161019657806342966c68146104485780634f1ef28614610468578063587cde1e1461047b5780635c19a95c146104cd5780635c975abb146104ed57806361d027b31461050557610251565b80633659cfe6146103b357806339509351146103d35780633a46b1a8146103f35780633f4ba83a1461041357806340c10f191461042857610251565b8063248a9ca311610219578063248a9ca3146103105780632f2ff15d14610340578063313ce567146103625780633644e5151461037e57806336568abe1461039357610251565b806301ffc9a71461025657806306fdde031461028b578063095ea7b3146102ad57806318160ddd146102cd57806323b872dd146102f0575b600080fd5b34801561026257600080fd5b50610276610271366004613489565b610838565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a0610871565b60405161028291906135cf565b3480156102b957600080fd5b506102766102c8366004613391565b610903565b3480156102d957600080fd5b506102e2610919565b604051908152602001610282565b3480156102fc57600080fd5b5061027661030b366004613230565b610929565b34801561031c57600080fd5b506102e261032b36600461344f565b600090815260fb602052604090206001015490565b34801561034c57600080fd5b5061036061035b366004613467565b6109da565b005b34801561036e57600080fd5b5060405160128152602001610282565b34801561038a57600080fd5b506102e2610a06565b34801561039f57600080fd5b506103606103ae366004613467565b610a10565b3480156103bf57600080fd5b506103606103ce3660046131e4565b610a8e565b3480156103df57600080fd5b506102766103ee366004613391565b610ab5565b3480156103ff57600080fd5b506102e261040e366004613391565b610af1565b34801561041f57600080fd5b50610360610b65565b34801561043457600080fd5b50610360610443366004613391565b610b86565b34801561045457600080fd5b5061036061046336600461344f565b610ba9565b6103606104763660046132d4565b610bb3565b34801561048757600080fd5b506104b56104963660046131e4565b6001600160a01b03908116600090815261019460205260409020541690565b6040516001600160a01b039091168152602001610282565b3480156104d957600080fd5b506103606104e83660046131e4565b610bc8565b3480156104f957600080fd5b5060975460ff16610276565b34801561051157600080fd5b5061022a546104b5906001600160a01b031681565b34801561053257600080fd5b506105466105413660046131e4565b610bd2565b60405163ffffffff9091168152602001610282565b34801561056757600080fd5b506102e26105763660046131e4565b6001600160a01b031660009081526033602052604090205490565b34801561059d57600080fd5b506103606105ac366004613391565b610bf5565b3480156105bd57600080fd5b506102e26105cc3660046131e4565b610c22565b3480156105dd57600080fd5b50610360610c41565b3480156105f257600080fd5b506102e261060136600461344f565b610c62565b34801561061257600080fd5b506103606106213660046134b1565b610cbf565b34801561063257600080fd5b50610276610641366004613467565b610eaf565b34801561065257600080fd5b506102a0610eda565b34801561066757600080fd5b506102e26106763660046131e4565b610ee9565b34801561068757600080fd5b506102e2600081565b34801561069c57600080fd5b506102766106ab366004613391565b610f80565b3480156106bc57600080fd5b506102766106cb366004613391565b611019565b3480156106dc57600080fd5b506103606106eb3660046133ba565b611025565b3480156106fc57600080fd5b5061036061070b36600461326b565b611152565b34801561071c57600080fd5b506102e26000805160206137aa83398151915281565b34801561073e57600080fd5b5061036061074d366004613467565b611299565b34801561075e57600080fd5b506102e261076d3660046131fe565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b3480156107a457600080fd5b506102e260008051602061376383398151915281565b3480156107c657600080fd5b506107da6107d5366004613411565b6112bf565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610282565b34801561081057600080fd5b506102e27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b148061086957506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60606036805461088090613701565b80601f01602080910402602001604051908101604052809291908181526020018280546108ac90613701565b80156108f95780601f106108ce576101008083540402835291602001916108f9565b820191906000526020600020905b8154815290600101906020018083116108dc57829003601f168201915b5050505050905090565b6000610910338484611352565b50600192915050565b600061092460355490565b905090565b6000610936848484611476565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156109c05760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6109cd8533858403611352565b60019150505b9392505050565b600082815260fb60205260409020600101546109f781335b61165b565b610a0183836116bf565b505050565b6000610924611745565b6001600160a01b0381163314610a805760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016109b7565b610a8a82826117c2565b5050565b610a9781611829565b610ab281604051806020016040528060008152506000611854565b50565b3360008181526034602090815260408083206001600160a01b03871684529091528120549091610910918590610aec908690613650565b611352565b6000438210610b425760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064016109b7565b6001600160a01b0383166000908152610195602052604090206109d390836119dc565b600080516020613763833981519152610b7e81336109f2565b610ab2611ab5565b6000805160206137aa833981519152610b9f81336109f2565b610a018383611b48565b610ab23382611b52565b610bbc82611829565b610a8a82826001611854565b610ab23382611b5c565b6001600160a01b0381166000908152610195602052604081205461086990611bd7565b61022a546001600160a01b0316331415610c1857610c138282611b52565b610a8a565b610a8a8282611c40565b6001600160a01b03811660009081526101616020526040812054610869565b600080516020613763833981519152610c5a81336109f2565b610ab2611cc1565b6000438210610cb35760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064016109b7565b610869610196836119dc565b600054610100900460ff1680610cd8575060005460ff16155b610cf45760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015610d16576000805461ffff19166101011790555b610d8987878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250611d3c92505050565b610d91611dbb565b610d99611e36565b610da1611e9d565b610de087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611efc92505050565b610de8611dbb565b61022a80546001600160a01b0319166001600160a01b038416179055610e0f600033610a10565b610e276000805160206137aa83398151915233610a10565b610e32600084611f9c565b610e4a6000805160206137aa83398151915284611f9c565b610e6260008051602061376383398151915233611f9c565b610e8c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611f9c565b610e94611cc1565b8015610ea6576000805461ff00191690555b50505050505050565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606037805461088090613701565b6001600160a01b038116600090815261019560205260408120548015610f6d576001600160a01b038316600090815261019560205260409020610f2d6001836136a7565b81548110610f4b57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316610f70565b60005b6001600160e01b03169392505050565b3360009081526034602090815260408083206001600160a01b0386168452909152812054828110156110025760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016109b7565b61100f3385858403611352565b5060019392505050565b60006109d38383611fa6565b834211156110755760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e6174757265206578706972656400000060448201526064016109b7565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906110ef906110e79060a00160405160208183030381529060405280519060200120611fb3565b858585612001565b90506110fa81612029565b86146111485760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e63650000000000000060448201526064016109b7565b610ea68188611b5c565b834211156111a25760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016109b7565b6000610162548888886111b48c612029565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061120f82611fb3565b9050600061121f82878787612001565b9050896001600160a01b0316816001600160a01b0316146112825760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016109b7565b61128d8a8a8a611352565b50505050505050505050565b600082815260fb60205260409020600101546112b581336109f2565b610a0183836117c2565b60408051808201909152600080825260208201526001600160a01b038316600090815261019560205260409020805463ffffffff841690811061131257634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b6001600160a01b0383166113b45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016109b7565b6001600160a01b0382166114155760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016109b7565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166114da5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016109b7565b6001600160a01b03821661153c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016109b7565b611547838383612052565b6001600160a01b038316600090815260336020526040902054818110156115bf5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016109b7565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906115f6908490613650565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161164291815260200190565b60405180910390a36116558484846120c0565b50505050565b6116658282610eaf565b610a8a5761167d816001600160a01b031660146120cb565b6116888360206120cb565b60405160200161169992919061355a565b60408051601f198184030181529082905262461bcd60e51b82526109b7916004016135cf565b6116c98282610eaf565b610a8a57600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff191660011790556117013390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006109247f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61177561012d5490565b61012e546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6117cc8282610eaf565b15610a8a57600082815260fb602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610a8a81336109f2565b60006118877f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050611892846122ad565b60008351118061189f5750815b156118b0576118ae8484612352565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff166119d557805460ff191660011781556040516001600160a01b038316602482015261192f90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052612352565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146119cc5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016109b7565b6119d58561243d565b5050505050565b8154600090815b81811015611a4e5760006119f7828461247d565b905084868281548110611a1a57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff161115611a3a57809250611a48565b611a45816001613650565b91505b506119e3565b8115611aa05784611a606001846136a7565b81548110611a7e57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316611aa3565b60005b6001600160e01b031695945050505050565b60975460ff16611afe5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109b7565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610a8a8282612498565b610a8a8282612528565b6001600160a01b0382811660008181526101946020818152604080842080546033845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611655828483612541565b600063ffffffff821115611c3c5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b60648201526084016109b7565b5090565b6000611c4c833361076d565b905081811015611caa5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b60648201526084016109b7565b611cb78333848403611352565b610a018383611b52565b60975460ff1615611d075760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109b7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b2b3390565b600054610100900460ff1680611d55575060005460ff16155b611d715760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015611d93576000805461ffff19166101011790555b611d9b612680565b611da583836126ea565b8015610a01576000805461ff0019169055505050565b600054610100900460ff1680611dd4575060005460ff16155b611df05760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015611e12576000805461ffff19166101011790555b611e1a612680565b611e22612680565b8015610ab2576000805461ff001916905550565b600054610100900460ff1680611e4f575060005460ff16155b611e6b5760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015611e8d576000805461ffff19166101011790555b611e95612680565b611e2261277f565b600054610100900460ff1680611eb6575060005460ff16155b611ed25760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015611ef4576000805461ffff19166101011790555b611e12612680565b600054610100900460ff1680611f15575060005460ff16155b611f315760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015611f53576000805461ffff19166101011790555b611f5b612680565b611f7e82604051806040016040528060018152602001603160f81b8152506127f4565b611f8782612880565b8015610a8a576000805461ff00191690555050565b610a8a82826116bf565b6000610910338484611476565b6000610869611fc0611745565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061201287878787612911565b9150915061201f816129fe565b5095945050505050565b6001600160a01b0381166000908152610161602052604090208054600181018255905b50919050565b60975460ff16158061207757506120776000805160206137aa83398151915233610641565b6120bb5760405162461bcd60e51b81526020600482015260156024820152742830bab9b2b21030b732103737ba1036b4b73a32b960591b60448201526064016109b7565b610a01565b610a01838383612c01565b606060006120da836002613688565b6120e5906002613650565b67ffffffffffffffff81111561210b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612135576020820181803683370190505b509050600360fc1b8160008151811061215e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061219b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006121bf846002613688565b6121ca906001613650565b90505b600181111561225e576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061220c57634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061223057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93612257816136ea565b90506121cd565b5083156109d35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109b7565b803b6123115760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016109b7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6123b15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016109b7565b600080846001600160a01b0316846040516123cc919061353e565b600060405180830381855af49150503d8060008114612407576040519150601f19603f3d011682016040523d82523d6000602084013e61240c565b606091505b5091509150612434828260405180606001604052806027815260200161378360279139612c34565b95945050505050565b612446816122ad565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600061248c6002848418613668565b6109d390848416613650565b6124a28282612c6d565b6001600160e01b036124b2610919565b11156125195760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b60648201526084016109b7565b611655610196612d6083612d6c565b6125328282612f0f565b61165561019661307083612d6c565b816001600160a01b0316836001600160a01b0316141580156125635750600081115b15610a01576001600160a01b038316156125f2576001600160a01b038316600090815261019560205260408120819061259f9061307085612d6c565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516125e7929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615610a01576001600160a01b038216600090815261019560205260408120819061262990612d6085612d6c565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612671929190918252602082015260400190565b60405180910390a25050505050565b600054610100900460ff1680612699575060005460ff16155b6126b55760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015611e22576000805461ffff19166101011790558015610ab2576000805461ff001916905550565b600054610100900460ff1680612703575060005460ff16155b61271f5760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff16158015612741576000805461ffff19166101011790555b82516127549060369060208601906130e5565b5081516127689060379060208501906130e5565b508015610a01576000805461ff0019169055505050565b600054610100900460ff1680612798575060005460ff16155b6127b45760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff161580156127d6576000805461ffff19166101011790555b6097805460ff191690558015610ab2576000805461ff001916905550565b600054610100900460ff168061280d575060005460ff16155b6128295760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff1615801561284b576000805461ffff19166101011790555b825160208085019190912083519184019190912061012d9190915561012e558015610a01576000805461ff0019169055505050565b600054610100900460ff1680612899575060005460ff16155b6128b55760405162461bcd60e51b81526004016109b790613602565b600054610100900460ff161580156128d7576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610162558015610a8a576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561294857506000905060036129f5565b8460ff16601b1415801561296057508460ff16601c14155b1561297157506000905060046129f5565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156129c5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129ee576000600192509250506129f5565b9150600090505b94509492505050565b6000816004811115612a2057634e487b7160e01b600052602160045260246000fd5b1415612a2b57610ab2565b6001816004811115612a4d57634e487b7160e01b600052602160045260246000fd5b1415612a9b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109b7565b6002816004811115612abd57634e487b7160e01b600052602160045260246000fd5b1415612b0b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109b7565b6003816004811115612b2d57634e487b7160e01b600052602160045260246000fd5b1415612b865760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109b7565b6004816004811115612ba857634e487b7160e01b600052602160045260246000fd5b1415610ab25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109b7565b6001600160a01b0383811660009081526101946020526040808220548584168352912054610a0192918216911683612541565b60608315612c435750816109d3565b825115612c535782518084602001fd5b8160405162461bcd60e51b81526004016109b791906135cf565b6001600160a01b038216612cc35760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016109b7565b612ccf60008383612052565b8060356000828254612ce19190613650565b90915550506001600160a01b03821660009081526033602052604081208054839290612d0e908490613650565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610a8a600083836120c0565b60006109d38284613650565b825460009081908015612dc55785612d856001836136a7565b81548110612da357634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316612dc8565b60005b6001600160e01b03169250612de183858763ffffffff16565b9150600081118015612e2d57504386612dfb6001846136a7565b81548110612e1957634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff16145b15612e9b57612e3b8261307c565b86612e476001846136a7565b81548110612e6557634e487b7160e01b600052603260045260246000fd5b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b03160217905550612f06565b856040518060400160405280612eb043611bd7565b63ffffffff168152602001612ec48561307c565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b50935093915050565b6001600160a01b038216612f6f5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016109b7565b612f7b82600083612052565b6001600160a01b03821660009081526033602052604090205481811015612fef5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016109b7565b6001600160a01b038316600090815260336020526040812083830390556035805484929061301e9084906136a7565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610a01836000846120c0565b60006109d382846136a7565b60006001600160e01b03821115611c3c5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b60648201526084016109b7565b8280546130f190613701565b90600052602060002090601f0160209004810192826131135760008555613159565b82601f1061312c57805160ff1916838001178555613159565b82800160010185558215613159579182015b8281111561315957825182559160200191906001019061313e565b50611c3c9291505b80821115611c3c5760008155600101613161565b80356001600160a01b038116811461086c57600080fd5b60008083601f84011261319d578182fd5b50813567ffffffffffffffff8111156131b4578182fd5b6020830191508360208285010111156131cc57600080fd5b9250929050565b803560ff8116811461086c57600080fd5b6000602082840312156131f5578081fd5b6109d382613175565b60008060408385031215613210578081fd5b61321983613175565b915061322760208401613175565b90509250929050565b600080600060608486031215613244578081fd5b61324d84613175565b925061325b60208501613175565b9150604084013590509250925092565b600080600080600080600060e0888a031215613285578283fd5b61328e88613175565b965061329c60208901613175565b955060408801359450606088013593506132b8608089016131d3565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156132e6578182fd5b6132ef83613175565b9150602083013567ffffffffffffffff8082111561330b578283fd5b818501915085601f83011261331e578283fd5b8135818111156133305761333061374c565b604051601f8201601f19908116603f011681019083821181831017156133585761335861374c565b81604052828152886020848701011115613370578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600080604083850312156133a3578182fd5b6133ac83613175565b946020939093013593505050565b60008060008060008060c087890312156133d2578182fd5b6133db87613175565b955060208701359450604087013593506133f7606088016131d3565b92506080870135915060a087013590509295509295509295565b60008060408385031215613423578182fd5b61342c83613175565b9150602083013563ffffffff81168114613444578182fd5b809150509250929050565b600060208284031215613460578081fd5b5035919050565b60008060408385031215613479578182fd5b8235915061322760208401613175565b60006020828403121561349a578081fd5b81356001600160e01b0319811681146109d3578182fd5b600080600080600080608087890312156134c9578182fd5b863567ffffffffffffffff808211156134e0578384fd5b6134ec8a838b0161318c565b90985096506020890135915080821115613504578384fd5b5061351189828a0161318c565b9095509350613524905060408801613175565b915061353260608801613175565b90509295509295509295565b600082516135508184602087016136be565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516135928160178501602088016136be565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516135c38160288401602088016136be565b01602801949350505050565b60006020825282518060208401526135ee8160408501602087016136be565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561366357613663613736565b500190565b60008261368357634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156136a2576136a2613736565b500290565b6000828210156136b9576136b9613736565b500390565b60005b838110156136d95781810151838201526020016136c1565b838111156116555750506000910152565b6000816136f9576136f9613736565b506000190190565b600181811c9082168061371557607f821691505b6020821081141561204c57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a26469706673582212203747b73d5aa3fbef5bda36d82ed42ace8b8cab16ab2e25194dceb975406bf3f364736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "burn(uint256)": { + "details": "Destroys `amount` tokens from the caller. See {ERC20-_burn}." + }, + "checkpoints(address,uint32)": { + "details": "Get the `pos`-th checkpoint for `account`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "delegate(address)": { + "details": "Delegate votes from the sender to `delegatee`." + }, + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "Delegates votes from signer to `delegatee`" + }, + "delegates(address)": { + "details": "Get the address `account` is currently delegating to." + }, + "getPastTotalSupply(uint256)": { + "details": "Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances. It is but NOT the sum of all the delegated votes! Requirements: - `blockNumber` must have been already mined" + }, + "getPastVotes(address,uint256)": { + "details": "Retrieve the number of votes for `account` at the end of `blockNumber`. Requirements: - `blockNumber` must have been already mined" + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "getVotes(address)": { + "details": "Gets the current votes balance for `account`" + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "initialize(string,string,address,address)": { + "details": "This function is called `initialize` to differentiate it from `initialize(string,string)` in the parent contract which should NOT be called to initialize this contract. ", + "params": { + "name": "The name of the Float governance token", + "stakerAddress": "The staker contract that controls minting of the token", + "symbol": "The ticker representing the token" + } + }, + "mint(address,uint256)": { + "details": "Can only be called by addresses with a MINTER_ROLE. This should correspond to the Staker contract.", + "params": { + "amount": "Amount of synthetic tokens to mint in wei.", + "to": "The address for which to mint the tokens for." + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "numCheckpoints(address)": { + "details": "Get number of checkpoints for `account`." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "FloatToken", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "initialize(string,string,address,address)": { + "notice": "Initialize the Float Token with relevant" + }, + "mint(address,uint256)": { + "notice": "Mints an amount of Float tokens for an address." + } + }, + "notice": "The Float Token is the governance token for the Float Capital protocol", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1351, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1357, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1359, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 1361, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 1363, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 1904, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 2069, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1240, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_paused", + "offset": 0, + "slot": "151", + "type": "t_bool" + }, + { + "astId": 1331, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4436, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_roles", + "offset": 0, + "slot": "251", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4251, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "301", + "type": "t_bytes32" + }, + { + "astId": 4253, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "302", + "type": "t_bytes32" + }, + { + "astId": 4390, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "303", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2845, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_nonces", + "offset": 0, + "slot": "353", + "type": "t_mapping(t_address,t_struct(Counter)3544_storage)" + }, + { + "astId": 2847, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_PERMIT_TYPEHASH", + "offset": 0, + "slot": "354", + "type": "t_bytes32" + }, + { + "astId": 3015, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "355", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 2167, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_delegates", + "offset": 0, + "slot": "404", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 2173, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_checkpoints", + "offset": 0, + "slot": "405", + "type": "t_mapping(t_address,t_array(t_struct(Checkpoint)2158_storage)dyn_storage)" + }, + { + "astId": 2177, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_totalSupplyCheckpoints", + "offset": 0, + "slot": "406", + "type": "t_array(t_struct(Checkpoint)2158_storage)dyn_storage" + }, + { + "astId": 2793, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "407", + "type": "t_array(t_uint256)47_storage" + }, + { + "astId": 1085, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "454", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "__gap", + "offset": 0, + "slot": "504", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 9914, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "treasury", + "offset": 0, + "slot": "554", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Checkpoint)2158_storage)dyn_storage": { + "base": "t_struct(Checkpoint)2158_storage", + "encoding": "dynamic_array", + "label": "struct ERC20VotesUpgradeable.Checkpoint[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)47_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[47]", + "numberOfBytes": "1504" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_array(t_struct(Checkpoint)2158_storage)dyn_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct ERC20VotesUpgradeable.Checkpoint[])", + "numberOfBytes": "32", + "value": "t_array(t_struct(Checkpoint)2158_storage)dyn_storage" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)3544_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)3544_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Checkpoint)2158_storage": { + "encoding": "inplace", + "label": "struct ERC20VotesUpgradeable.Checkpoint", + "members": [ + { + "astId": 2155, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "fromBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 2157, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "votes", + "offset": 4, + "slot": "0", + "type": "t_uint224" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Counter)3544_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 3543, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/AlphaTestFLT.sol:AlphaTestFLT", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint224": { + "encoding": "inplace", + "label": "uint224", + "numberOfBytes": "28" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/polygon/AlphaTestFLT_Proxy.json b/deployments/polygon/AlphaTestFLT_Proxy.json new file mode 100644 index 0000000..0d93849 --- /dev/null +++ b/deployments/polygon/AlphaTestFLT_Proxy.json @@ -0,0 +1,147 @@ +{ + "address": "0x01309A1Ec476871760D9Ea454628500BCcc1E011", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xfdbd67fc3e1ca35d1345c043ffdb0aa54a2a56a8a67d0883e0740a00a672ffb3", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x01309A1Ec476871760D9Ea454628500BCcc1E011", + "transactionIndex": 52, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000400000000000000000000000400000000000000000000000000000000000000000008000000000000000000000000000000000000000000040000000000002800000000000000000000100000000000000000000100200000400000000000000000000000000000080000000000000000000000020000000000000000000000400000000000000000001000000000000200000000000000000000000000000000000000000000000000000000000004000000020000008000001000000000008000000000000000000100000200000000000000000000200000000000000000000000000000000000000000000100000", + "blockHash": "0x15d618e7af12e1ebbbd6f1aaec06bfd1ce0cdb6098418ca975cd4755c8f092af", + "transactionHash": "0xfdbd67fc3e1ca35d1345c043ffdb0aa54a2a56a8a67d0883e0740a00a672ffb3", + "logs": [ + { + "transactionIndex": 52, + "blockNumber": 19058323, + "transactionHash": "0xfdbd67fc3e1ca35d1345c043ffdb0aa54a2a56a8a67d0883e0740a00a672ffb3", + "address": "0x01309A1Ec476871760D9Ea454628500BCcc1E011", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000003d4857c545673f8249a9f87f3559e7eea8fa1d02" + ], + "data": "0x", + "logIndex": 538, + "blockHash": "0x15d618e7af12e1ebbbd6f1aaec06bfd1ce0cdb6098418ca975cd4755c8f092af" + }, + { + "transactionIndex": 52, + "blockNumber": 19058323, + "transactionHash": "0xfdbd67fc3e1ca35d1345c043ffdb0aa54a2a56a8a67d0883e0740a00a672ffb3", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000bc6044f4a1688d8b8596a9f7d4659e09985eebe6" + ], + "data": "0x0000000000000000000000000000000000000000000000000000fa2927e62f800000000000000000000000000000000000000000000000000dd2eed936e397a00000000000000000000000000000000000000000000004451d01e2c7f5aa698b0000000000000000000000000000000000000000000000000dd1f4b00efd68200000000000000000000000000000000000000000000004451d02dcf11d90990b", + "logIndex": 539, + "blockHash": "0x15d618e7af12e1ebbbd6f1aaec06bfd1ce0cdb6098418ca975cd4755c8f092af" + } + ], + "blockNumber": 19058323, + "cumulativeGasUsed": "16216479", + "status": 1, + "byzantium": true + }, + "args": [ + "0x3d4857C545673f8249a9F87f3559E7eeA8fa1D02", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0x" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/FloatCapital_v0.json b/deployments/polygon/FloatCapital_v0.json new file mode 100644 index 0000000..fdc4ccd --- /dev/null +++ b/deployments/polygon/FloatCapital_v0.json @@ -0,0 +1,473 @@ +{ + "address": "0xEe0c19f26b3B3A4fb82f466a6023DcD979c27a2F", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "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": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "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": "address", + "name": "_admin", + "type": "address" + } + ], + "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": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xEe0c19f26b3B3A4fb82f466a6023DcD979c27a2F", + "transactionIndex": 46, + "gasUsed": "349560", + "logsBloom": "0x00000004000000000000000000000000400000000000000000000000400000000000000000000000000000008000000000008000000000000000000000000000000000000000000000000000200002800000000020000000000100000000000000000000820200000500000000000800000000020000000880010000010000000000000000000000000000000000004000000000800020000001000000000000200000000000000000000000000000000000000000000000001000000000004000000020000008000001000000000008000000000000000100100000000020000080000000000200000000000000000000000000000000008000000000100000", + "blockHash": "0xe00c55f4a97318257de03d5b1ce2f0a4fda74226997de3f3fb610b3de794ab30", + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "logs": [ + { + "transactionIndex": 46, + "blockNumber": 19058356, + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "address": "0xEe0c19f26b3B3A4fb82f466a6023DcD979c27a2F", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000443908279dee487e70b46f25401a64343adbe04b" + ], + "data": "0x", + "logIndex": 254, + "blockHash": "0xe00c55f4a97318257de03d5b1ce2f0a4fda74226997de3f3fb610b3de794ab30" + }, + { + "transactionIndex": 46, + "blockNumber": 19058356, + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "address": "0xEe0c19f26b3B3A4fb82f466a6023DcD979c27a2F", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 255, + "blockHash": "0xe00c55f4a97318257de03d5b1ce2f0a4fda74226997de3f3fb610b3de794ab30" + }, + { + "transactionIndex": 46, + "blockNumber": 19058356, + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "address": "0xEe0c19f26b3B3A4fb82f466a6023DcD979c27a2F", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 256, + "blockHash": "0xe00c55f4a97318257de03d5b1ce2f0a4fda74226997de3f3fb610b3de794ab30" + }, + { + "transactionIndex": 46, + "blockNumber": 19058356, + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "address": "0xEe0c19f26b3B3A4fb82f466a6023DcD979c27a2F", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 257, + "blockHash": "0xe00c55f4a97318257de03d5b1ce2f0a4fda74226997de3f3fb610b3de794ab30" + }, + { + "transactionIndex": 46, + "blockNumber": 19058356, + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000bc6044f4a1688d8b8596a9f7d4659e09985eebe6" + ], + "data": "0x00000000000000000000000000000000000000000000000000013dec47a0b0000000000000000000000000000000000000000000000000000dce5dd4a7f0e1aa0000000000000000000000000000000000000000000004461f6e0e66f9c1d29c0000000000000000000000000000000000000000000000000dcd1fe8605031aa0000000000000000000000000000000000000000000004461f6f4c534162829c", + "logIndex": 258, + "blockHash": "0xe00c55f4a97318257de03d5b1ce2f0a4fda74226997de3f3fb610b3de794ab30" + } + ], + "blockNumber": 19058356, + "cumulativeGasUsed": "21030021", + "status": 1, + "byzantium": true + }, + "args": [ + "0x443908279DEe487e70b46F25401a64343adBE04B", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0xc4d66de8000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "0xcfcCB5e6b3882b7795eb1B1A9f18831A842d4eE0" + ] + }, + "implementation": "0x443908279DEe487e70b46F25401a64343adBE04B", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/FloatCapital_v0_Implementation.json b/deployments/polygon/FloatCapital_v0_Implementation.json new file mode 100644 index 0000000..3ff5024 --- /dev/null +++ b/deployments/polygon/FloatCapital_v0_Implementation.json @@ -0,0 +1,536 @@ +{ + "address": "0x443908279DEe487e70b46F25401a64343adBE04B", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "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": "address", + "name": "_admin", + "type": "address" + } + ], + "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": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0xe83ea57f9c484689d07687b9becdb6d6f27f331cf8abbaec3b2795f6c07abc2d", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x443908279DEe487e70b46F25401a64343adBE04B", + "transactionIndex": 39, + "gasUsed": "1010294", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000400000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000001000000000000200000000000000000000000000000000000000000000000000000000000004000000000000008000001000000000008000000000000000000100000000000000000000000000200000000000000000000000000000000000000000000100000", + "blockHash": "0x1fc94590276eb992cdc2497af3c666ccce6f9cf251f4eb6dee73fc553368226d", + "transactionHash": "0xe83ea57f9c484689d07687b9becdb6d6f27f331cf8abbaec3b2795f6c07abc2d", + "logs": [ + { + "transactionIndex": 39, + "blockNumber": 19058328, + "transactionHash": "0xe83ea57f9c484689d07687b9becdb6d6f27f331cf8abbaec3b2795f6c07abc2d", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000bc6044f4a1688d8b8596a9f7d4659e09985eebe6" + ], + "data": "0x000000000000000000000000000000000000000000000000000396db670c86760000000000000000000000000000000000000000000000000dd1f4b00efd68200000000000000000000000000000000000000000000004453fe18c68c68048a20000000000000000000000000000000000000000000000000dce5dd4a7f0e1aa0000000000000000000000000000000000000000000004453fe523442d8ccf18", + "logIndex": 203, + "blockHash": "0x1fc94590276eb992cdc2497af3c666ccce6f9cf251f4eb6dee73fc553368226d" + } + ], + "blockNumber": 19058328, + "cumulativeGasUsed": "19566503", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"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\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"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\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"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.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"Float Capital Contract \",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/FloatCapital_v0.sol\":\"FloatCapital_v0\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"contracts/FloatCapital_v0.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\n/** @title Float Capital Contract */\\ncontract FloatCapital_v0 is AccessControlledAndUpgradeable {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 CONTRACT SETUP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function initialize(address _admin) external initializer {\\n _AccessControlledAndUpgradeable_init(_admin);\\n }\\n\\n /** A percentage of float token to accrue here for project\\n development */\\n}\\n\",\"keccak256\":\"0xc31184f9f4530dd91f805f20ffe1569e75caa052dae352850e8d256e89f83430\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611151806100206000396000f3fe6080604052600436106100a75760003560e01c806375b238fc1161006457806375b238fc1461019457806391d14854146101c8578063a217fddf146101e8578063c4d66de8146101fd578063d547741f1461021d578063f72c0d8b1461023d576100a7565b806301ffc9a7146100ac578063248a9ca3146100e15780632f2ff15d1461011f57806336568abe146101415780633659cfe6146101615780634f1ef28614610181575b600080fd5b3480156100b857600080fd5b506100cc6100c7366004610f10565b610271565b60405190151581526020015b60405180910390f35b3480156100ed57600080fd5b506101116100fc366004610ecd565b60009081526065602052604090206001015490565b6040519081526020016100d8565b34801561012b57600080fd5b5061013f61013a366004610ee5565b6102aa565b005b34801561014d57600080fd5b5061013f61015c366004610ee5565b6102d6565b34801561016d57600080fd5b5061013f61017c366004610df6565b610359565b61013f61018f366004610e10565b610380565b3480156101a057600080fd5b506101117fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156101d457600080fd5b506100cc6101e3366004610ee5565b610395565b3480156101f457600080fd5b50610111600081565b34801561020957600080fd5b5061013f610218366004610df6565b6103c0565b34801561022957600080fd5b5061013f610238366004610ee5565b610435565b34801561024957600080fd5b506101117f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806102a257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6000828152606560205260409020600101546102c781335b61045b565b6102d183836104bf565b505050565b6001600160a01b038116331461034b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6103558282610545565b5050565b610362816105ac565b61037d816040518060200160405280600081525060006105d7565b50565b610389826105ac565b610355828260016105d7565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600054610100900460ff16806103d9575060005460ff16155b6103f55760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610417576000805461ffff19166101011790555b6104208261075f565b8015610355576000805461ff00191690555050565b60008281526065602052604090206001015461045181336102c2565b6102d18383610545565b6104658282610395565b6103555761047d816001600160a01b031660146107cf565b6104888360206107cf565b604051602001610499929190610f54565b60408051601f198184030181529082905262461bcd60e51b825261034291600401610fc9565b6104c98282610395565b6103555760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556105013390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61054f8282610395565b156103555760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361035581336102c2565b600061060a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050610615846109b8565b6000835111806106225750815b15610633576106318484610a5d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661075857805460ff191660011781556040516001600160a01b03831660248201526106b290869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052610a5d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b0383811691161461074f5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610342565b61075885610b48565b5050505050565b600054610100900460ff1680610778575060005460ff16155b6107945760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff161580156107b6576000805461ffff19166101011790555b6107be610b88565b6107c6610c0b565b61042082610c69565b606060006107de836002611062565b6107e990600261104a565b67ffffffffffffffff81111561080f57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610839576020820181803683370190505b509050600360fc1b8160008151811061086257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061089f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006108c3846002611062565b6108ce90600161104a565b90505b6001811115610962576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061091057634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061093457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361095b816110b1565b90506108d1565b5083156109b15760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610342565b9392505050565b803b610a1c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610342565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b610abc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610342565b600080846001600160a01b031684604051610ad79190610f38565b600060405180830381855af49150503d8060008114610b12576040519150601f19603f3d011682016040523d82523d6000602084013e610b17565b606091505b5091509150610b3f82826040518060600160405280602781526020016110f560279139610d32565b95945050505050565b610b51816109b8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680610ba1575060005460ff16155b610bbd5760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610bdf576000805461ffff19166101011790555b610be7610d6b565b610bef610d6b565b610bf7610d6b565b801561037d576000805461ff001916905550565b600054610100900460ff1680610c24575060005460ff16155b610c405760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610be7576000805461ffff1916610101179055610bef610d6b565b600054610100900460ff1680610c82575060005460ff16155b610c9e5760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610cc0576000805461ffff19166101011790555b6001600160a01b038216610cd357600080fd5b610cde600083610dd5565b610d087fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610dd5565b6104207f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383610dd5565b60608315610d415750816109b1565b825115610d515782518084602001fd5b8160405162461bcd60e51b81526004016103429190610fc9565b600054610100900460ff1680610d84575060005460ff16155b610da05760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610bf7576000805461ffff1916610101179055801561037d576000805461ff001916905550565b61035582826104bf565b80356001600160a01b03811681146102a557600080fd5b600060208284031215610e07578081fd5b6109b182610ddf565b60008060408385031215610e22578081fd5b610e2b83610ddf565b9150602083013567ffffffffffffffff80821115610e47578283fd5b818501915085601f830112610e5a578283fd5b813581811115610e6c57610e6c6110de565b604051601f8201601f19908116603f01168101908382118183101715610e9457610e946110de565b81604052828152886020848701011115610eac578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600060208284031215610ede578081fd5b5035919050565b60008060408385031215610ef7578182fd5b82359150610f0760208401610ddf565b90509250929050565b600060208284031215610f21578081fd5b81356001600160e01b0319811681146109b1578182fd5b60008251610f4a818460208701611081565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351610f8c816017850160208801611081565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351610fbd816028840160208801611081565b01602801949350505050565b6000602082528251806020840152610fe8816040850160208701611081565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561105d5761105d6110c8565b500190565b600081600019048311821515161561107c5761107c6110c8565b500290565b60005b8381101561109c578181015183820152602001611084565b838111156110ab576000848401525b50505050565b6000816110c0576110c06110c8565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220cd675f65fea9a966cdcfdd33d785243d32edf66939f7f37ab4fed2259cb5a8d664736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106100a75760003560e01c806375b238fc1161006457806375b238fc1461019457806391d14854146101c8578063a217fddf146101e8578063c4d66de8146101fd578063d547741f1461021d578063f72c0d8b1461023d576100a7565b806301ffc9a7146100ac578063248a9ca3146100e15780632f2ff15d1461011f57806336568abe146101415780633659cfe6146101615780634f1ef28614610181575b600080fd5b3480156100b857600080fd5b506100cc6100c7366004610f10565b610271565b60405190151581526020015b60405180910390f35b3480156100ed57600080fd5b506101116100fc366004610ecd565b60009081526065602052604090206001015490565b6040519081526020016100d8565b34801561012b57600080fd5b5061013f61013a366004610ee5565b6102aa565b005b34801561014d57600080fd5b5061013f61015c366004610ee5565b6102d6565b34801561016d57600080fd5b5061013f61017c366004610df6565b610359565b61013f61018f366004610e10565b610380565b3480156101a057600080fd5b506101117fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156101d457600080fd5b506100cc6101e3366004610ee5565b610395565b3480156101f457600080fd5b50610111600081565b34801561020957600080fd5b5061013f610218366004610df6565b6103c0565b34801561022957600080fd5b5061013f610238366004610ee5565b610435565b34801561024957600080fd5b506101117f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806102a257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6000828152606560205260409020600101546102c781335b61045b565b6102d183836104bf565b505050565b6001600160a01b038116331461034b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6103558282610545565b5050565b610362816105ac565b61037d816040518060200160405280600081525060006105d7565b50565b610389826105ac565b610355828260016105d7565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600054610100900460ff16806103d9575060005460ff16155b6103f55760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610417576000805461ffff19166101011790555b6104208261075f565b8015610355576000805461ff00191690555050565b60008281526065602052604090206001015461045181336102c2565b6102d18383610545565b6104658282610395565b6103555761047d816001600160a01b031660146107cf565b6104888360206107cf565b604051602001610499929190610f54565b60408051601f198184030181529082905262461bcd60e51b825261034291600401610fc9565b6104c98282610395565b6103555760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556105013390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61054f8282610395565b156103555760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361035581336102c2565b600061060a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050610615846109b8565b6000835111806106225750815b15610633576106318484610a5d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661075857805460ff191660011781556040516001600160a01b03831660248201526106b290869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052610a5d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b0383811691161461074f5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610342565b61075885610b48565b5050505050565b600054610100900460ff1680610778575060005460ff16155b6107945760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff161580156107b6576000805461ffff19166101011790555b6107be610b88565b6107c6610c0b565b61042082610c69565b606060006107de836002611062565b6107e990600261104a565b67ffffffffffffffff81111561080f57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610839576020820181803683370190505b509050600360fc1b8160008151811061086257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061089f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006108c3846002611062565b6108ce90600161104a565b90505b6001811115610962576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061091057634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061093457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361095b816110b1565b90506108d1565b5083156109b15760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610342565b9392505050565b803b610a1c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610342565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b610abc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610342565b600080846001600160a01b031684604051610ad79190610f38565b600060405180830381855af49150503d8060008114610b12576040519150601f19603f3d011682016040523d82523d6000602084013e610b17565b606091505b5091509150610b3f82826040518060600160405280602781526020016110f560279139610d32565b95945050505050565b610b51816109b8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680610ba1575060005460ff16155b610bbd5760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610bdf576000805461ffff19166101011790555b610be7610d6b565b610bef610d6b565b610bf7610d6b565b801561037d576000805461ff001916905550565b600054610100900460ff1680610c24575060005460ff16155b610c405760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610be7576000805461ffff1916610101179055610bef610d6b565b600054610100900460ff1680610c82575060005460ff16155b610c9e5760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610cc0576000805461ffff19166101011790555b6001600160a01b038216610cd357600080fd5b610cde600083610dd5565b610d087fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610dd5565b6104207f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383610dd5565b60608315610d415750816109b1565b825115610d515782518084602001fd5b8160405162461bcd60e51b81526004016103429190610fc9565b600054610100900460ff1680610d84575060005460ff16155b610da05760405162461bcd60e51b815260040161034290610ffc565b600054610100900460ff16158015610bf7576000805461ffff1916610101179055801561037d576000805461ff001916905550565b61035582826104bf565b80356001600160a01b03811681146102a557600080fd5b600060208284031215610e07578081fd5b6109b182610ddf565b60008060408385031215610e22578081fd5b610e2b83610ddf565b9150602083013567ffffffffffffffff80821115610e47578283fd5b818501915085601f830112610e5a578283fd5b813581811115610e6c57610e6c6110de565b604051601f8201601f19908116603f01168101908382118183101715610e9457610e946110de565b81604052828152886020848701011115610eac578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600060208284031215610ede578081fd5b5035919050565b60008060408385031215610ef7578182fd5b82359150610f0760208401610ddf565b90509250929050565b600060208284031215610f21578081fd5b81356001600160e01b0319811681146109b1578182fd5b60008251610f4a818460208701611081565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351610f8c816017850160208801611081565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351610fbd816028840160208801611081565b01602801949350505050565b6000602082528251806020840152610fe8816040850160208701611081565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561105d5761105d6110c8565b500190565b600081600019048311821515161561107c5761107c6110c8565b500290565b60005b8381101561109c578181015183820152602001611084565b838111156110ab576000848401525b50505050565b6000816110c0576110c06110c8565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220cd675f65fea9a966cdcfdd33d785243d32edf66939f7f37ab4fed2259cb5a8d664736f6c63430008030033", + "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." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "Float Capital Contract ", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/FloatCapital_v0.sol:FloatCapital_v0", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/polygon/FloatCapital_v0_Proxy.json b/deployments/polygon/FloatCapital_v0_Proxy.json new file mode 100644 index 0000000..3119a48 --- /dev/null +++ b/deployments/polygon/FloatCapital_v0_Proxy.json @@ -0,0 +1,192 @@ +{ + "address": "0xEe0c19f26b3B3A4fb82f466a6023DcD979c27a2F", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xEe0c19f26b3B3A4fb82f466a6023DcD979c27a2F", + "transactionIndex": 46, + "gasUsed": "349560", + "logsBloom": "0x00000004000000000000000000000000400000000000000000000000400000000000000000000000000000008000000000008000000000000000000000000000000000000000000000000000200002800000000020000000000100000000000000000000820200000500000000000800000000020000000880010000010000000000000000000000000000000000004000000000800020000001000000000000200000000000000000000000000000000000000000000000001000000000004000000020000008000001000000000008000000000000000100100000000020000080000000000200000000000000000000000000000000008000000000100000", + "blockHash": "0xe00c55f4a97318257de03d5b1ce2f0a4fda74226997de3f3fb610b3de794ab30", + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "logs": [ + { + "transactionIndex": 46, + "blockNumber": 19058356, + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "address": "0xEe0c19f26b3B3A4fb82f466a6023DcD979c27a2F", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000443908279dee487e70b46f25401a64343adbe04b" + ], + "data": "0x", + "logIndex": 254, + "blockHash": "0xe00c55f4a97318257de03d5b1ce2f0a4fda74226997de3f3fb610b3de794ab30" + }, + { + "transactionIndex": 46, + "blockNumber": 19058356, + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "address": "0xEe0c19f26b3B3A4fb82f466a6023DcD979c27a2F", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 255, + "blockHash": "0xe00c55f4a97318257de03d5b1ce2f0a4fda74226997de3f3fb610b3de794ab30" + }, + { + "transactionIndex": 46, + "blockNumber": 19058356, + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "address": "0xEe0c19f26b3B3A4fb82f466a6023DcD979c27a2F", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 256, + "blockHash": "0xe00c55f4a97318257de03d5b1ce2f0a4fda74226997de3f3fb610b3de794ab30" + }, + { + "transactionIndex": 46, + "blockNumber": 19058356, + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "address": "0xEe0c19f26b3B3A4fb82f466a6023DcD979c27a2F", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 257, + "blockHash": "0xe00c55f4a97318257de03d5b1ce2f0a4fda74226997de3f3fb610b3de794ab30" + }, + { + "transactionIndex": 46, + "blockNumber": 19058356, + "transactionHash": "0xce4f87548a17aafaccd3926249b61cbc8cceaf6312472e1b18fdee00085df09e", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000bc6044f4a1688d8b8596a9f7d4659e09985eebe6" + ], + "data": "0x00000000000000000000000000000000000000000000000000013dec47a0b0000000000000000000000000000000000000000000000000000dce5dd4a7f0e1aa0000000000000000000000000000000000000000000004461f6e0e66f9c1d29c0000000000000000000000000000000000000000000000000dcd1fe8605031aa0000000000000000000000000000000000000000000004461f6f4c534162829c", + "logIndex": 258, + "blockHash": "0xe00c55f4a97318257de03d5b1ce2f0a4fda74226997de3f3fb610b3de794ab30" + } + ], + "blockNumber": 19058356, + "cumulativeGasUsed": "21030021", + "status": 1, + "byzantium": true + }, + "args": [ + "0x443908279DEe487e70b46F25401a64343adBE04B", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0xc4d66de8000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/GEMS.json b/deployments/polygon/GEMS.json new file mode 100644 index 0000000..7219237 --- /dev/null +++ b/deployments/polygon/GEMS.json @@ -0,0 +1,540 @@ +{ + "address": "0x756218A9476bF7C75a887d9c7aB916DE15AB5Ddf", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gems", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "streak", + "type": "uint256" + } + ], + "name": "GemsCollected", + "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": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "GEM_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "gems", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "gm", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "lastAction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "streak", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xaa528aa3f08d2865e59ad143adddbd32b587f40b55a51d959bfd32d295e0a1e6", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x756218A9476bF7C75a887d9c7aB916DE15AB5Ddf", + "transactionIndex": 42, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000400000000020000001000000400000000000000000000000000000000000000000008000000000000000004000000000000004000000000000000000000002800000000000000000000100400000000000000000004000000000000000020000000000000000000080000000000000000000000000000000800000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000020000008000001000000000000000000000000000000100000000000000000000000000200000000000000000000000000000000002000000000100000", + "blockHash": "0x98cae97e6c61d1782c409ec96810171addd7d811d483b0943e5c87574d6aa644", + "transactionHash": "0xaa528aa3f08d2865e59ad143adddbd32b587f40b55a51d959bfd32d295e0a1e6", + "logs": [ + { + "transactionIndex": 42, + "blockNumber": 19058647, + "transactionHash": "0xaa528aa3f08d2865e59ad143adddbd32b587f40b55a51d959bfd32d295e0a1e6", + "address": "0x756218A9476bF7C75a887d9c7aB916DE15AB5Ddf", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000f996569ca45b50afe01c1b2d1258d3e396d78534" + ], + "data": "0x", + "logIndex": 192, + "blockHash": "0x98cae97e6c61d1782c409ec96810171addd7d811d483b0943e5c87574d6aa644" + }, + { + "transactionIndex": 42, + "blockNumber": 19058647, + "transactionHash": "0xaa528aa3f08d2865e59ad143adddbd32b587f40b55a51d959bfd32d295e0a1e6", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x0000000000000000000000000000000000000000000000000002265a8afa68800000000000000000000000000000000000000000000000000dc0e8fa463eacaa000000000000000000000000000000000000000000006e18534f93fd3c7fc4440000000000000000000000000000000000000000000000000dbec29fbb44442a000000000000000000000000000000000000000000006e185351ba57c77a2cc4", + "logIndex": 193, + "blockHash": "0x98cae97e6c61d1782c409ec96810171addd7d811d483b0943e5c87574d6aa644" + } + ], + "blockNumber": 19058647, + "cumulativeGasUsed": "9349109", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf996569ca45b50aFe01c1b2D1258d3e396D78534", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0x" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "implementation": "0xf996569ca45b50aFe01c1b2D1258d3e396D78534", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/GEMS_Implementation.json b/deployments/polygon/GEMS_Implementation.json new file mode 100644 index 0000000..096a103 --- /dev/null +++ b/deployments/polygon/GEMS_Implementation.json @@ -0,0 +1,685 @@ +{ + "address": "0xf996569ca45b50aFe01c1b2D1258d3e396D78534", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gems", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "streak", + "type": "uint256" + } + ], + "name": "GemsCollected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "GEM_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "gems", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "gm", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "lastAction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "streak", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0xbe2c0d7031092b53fd1bdf4c0d8b97714f2f633af79789050d513c4ed18c6d4d", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xf996569ca45b50aFe01c1b2D1258d3e396D78534", + "transactionIndex": 87, + "gasUsed": "1192914", + "logsBloom": "0x00000000000000000000000000000000000000000020000000000000400000000000000000000000000000000000000000008000000000000000000000000000000004000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000800000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000008000001000000000000000000000000000000100000000000000000000000000200000000000000000000000000000000000000000000100000", + "blockHash": "0xd34165960fc603fd9010abe14ec39b4b48281e72a61dea713256884378d0d203", + "transactionHash": "0xbe2c0d7031092b53fd1bdf4c0d8b97714f2f633af79789050d513c4ed18c6d4d", + "logs": [ + { + "transactionIndex": 87, + "blockNumber": 19058643, + "transactionHash": "0xbe2c0d7031092b53fd1bdf4c0d8b97714f2f633af79789050d513c4ed18c6d4d", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x000000000000000000000000000000000000000000000000000a5972038fb5000000000000000000000000000000000000000000000000000dcb426c49ce61aa000000000000000000000000000000000000000000006e18485f85f839f213a80000000000000000000000000000000000000000000000000dc0e8fa463eacaa000000000000000000000000000000000000000000006e184869df6a3d81c8a8", + "logIndex": 421, + "blockHash": "0xd34165960fc603fd9010abe14ec39b4b48281e72a61dea713256884378d0d203" + } + ], + "blockNumber": 19058643, + "cumulativeGasUsed": "19425909", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gems\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"streak\",\"type\":\"uint256\"}],\"name\":\"GemsCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GEM_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"gems\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"gm\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staker\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastAction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"streak\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"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.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"GEMS \",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/GEMS.sol\":\"GEMS\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"contracts/GEMS.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\n/** Contract giving user GEMS*/\\n\\n// Inspired by https://github.com/andrecronje/rarity/blob/main/rarity.sol\\n\\n/** @title GEMS */\\ncontract GEMS is AccessControlledAndUpgradeable {\\n bytes32 public constant GEM_ROLE = keccak256(\\\"GEM_ROLE\\\");\\n\\n uint256 constant gems_per_day = 250e18;\\n uint256 constant DAY = 1 days;\\n\\n mapping(address => uint256) public gems;\\n mapping(address => uint256) public streak;\\n mapping(address => uint256) public lastAction;\\n\\n event GemsCollected(address user, uint256 gems, uint256 streak);\\n\\n function initialize(\\n address _admin,\\n address _longShort,\\n address _staker\\n ) external initializer {\\n _AccessControlledAndUpgradeable_init(_admin);\\n _setupRole(GEM_ROLE, _longShort);\\n _setupRole(GEM_ROLE, _staker);\\n }\\n\\n // Say gm and get gems by performing an action in LongShort or Staker\\n function gm(address user) external {\\n if (hasRole(GEM_ROLE, msg.sender)) {\\n uint256 usersLastAction = lastAction[user];\\n uint256 blocktimestamp = block.timestamp;\\n\\n if (blocktimestamp - usersLastAction >= DAY) {\\n // Award gems\\n gems[user] += gems_per_day;\\n\\n // Increment streak\\n if (blocktimestamp - usersLastAction < 2 * DAY) {\\n streak[user] += 1;\\n } else {\\n streak[user] = 1; // reset streak to 1\\n }\\n\\n lastAction[user] = blocktimestamp;\\n }\\n emit GemsCollected(user, gems[user], streak[user]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0335305655aa936242355a082737ca1d3e819d38601a0bf3b1672158591e2abd\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061149f806100206000396000f3fe6080604052600436106100fe5760003560e01c806370720d1f11610095578063a217fddf11610064578063a217fddf146102e6578063c0c53b8b146102fb578063d547741f1461031b578063f4e5f7061461033b578063f72c0d8b1461035d576100fe565b806370720d1f1461024557806375b238fc1461027257806391d14854146102a657806392d0214c146102c6576100fe565b80633659cfe6116100d15780633659cfe6146101b85780633809467e146101d85780634f1ef286146102055780636a2a651814610218576100fe565b806301ffc9a714610103578063248a9ca3146101385780632f2ff15d1461017657806336568abe14610198575b600080fd5b34801561010f57600080fd5b5061012361011e36600461122b565b610391565b60405190151581526020015b60405180910390f35b34801561014457600080fd5b506101686101533660046111e8565b60009081526065602052604090206001015490565b60405190815260200161012f565b34801561018257600080fd5b50610196610191366004611200565b6103ca565b005b3480156101a457600080fd5b506101966101b3366004611200565b6103f6565b3480156101c457600080fd5b506101966101d33660046110cf565b610479565b3480156101e457600080fd5b506101686101f33660046110cf565b60fb6020526000908152604090205481565b61019661021336600461112b565b6104a0565b34801561022457600080fd5b506101686102333660046110cf565b60fc6020526000908152604090205481565b34801561025157600080fd5b506101686102603660046110cf565b60fd6020526000908152604090205481565b34801561027e57600080fd5b506101687fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102b257600080fd5b506101236102c1366004611200565b6104b5565b3480156102d257600080fd5b506101966102e13660046110cf565b6104e0565b3480156102f257600080fd5b50610168600081565b34801561030757600080fd5b506101966103163660046110e9565b610651565b34801561032757600080fd5b50610196610336366004611200565b6106f9565b34801561034757600080fd5b5061016860008051602061142383398151915281565b34801561036957600080fd5b506101687f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806103c257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6000828152606560205260409020600101546103e781335b61071f565b6103f18383610783565b505050565b6001600160a01b038116331461046b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104758282610809565b5050565b61048281610870565b61049d8160405180602001604052806000815250600061089b565b50565b6104a982610870565b6104758282600161089b565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6104f8600080516020611423833981519152336104b5565b1561049d576001600160a01b038116600090815260fd60205260409020544262015180610525838361139c565b106105ec576001600160a01b038316600090815260fb602052604081208054680d8d726b7177a80000929061055b908490611365565b9091555061056f905062015180600261137d565b610579838361139c565b10156105b3576001600160a01b038316600090815260fc602052604081208054600192906105a8908490611365565b909155506105d09050565b6001600160a01b038316600090815260fc60205260409020600190555b6001600160a01b038316600090815260fd602052604090208190555b6001600160a01b038316600081815260fb602090815260408083205460fc8352928190205481519485529184019290925282820152517f6f4864c954777b623ffcb477ee1875e76a6345a6ca1588bcc781048e8674e5ee9181900360600190a1505050565b600054610100900460ff168061066a575060005460ff16155b6106865760405162461bcd60e51b815260040161046290611317565b600054610100900460ff161580156106a8576000805461ffff19166101011790555b6106b184610a23565b6106c960008051602061142383398151915284610aa8565b6106e160008051602061142383398151915283610aa8565b80156106f3576000805461ff00191690555b50505050565b60008281526065602052604090206001015461071581336103e2565b6103f18383610809565b61072982826104b5565b61047557610741816001600160a01b03166014610ab2565b61074c836020610ab2565b60405160200161075d92919061126f565b60408051601f198184030181529082905262461bcd60e51b8252610462916004016112e4565b61078d82826104b5565b6104755760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556107c53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61081382826104b5565b156104755760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361047581336103e2565b60006108ce7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506108d984610c9b565b6000835111806108e65750815b156108f7576108f58484610d40565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610a1c57805460ff191660011781556040516001600160a01b038316602482015261097690869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052610d40565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b03838116911614610a135760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610462565b610a1c85610e2b565b5050505050565b600054610100900460ff1680610a3c575060005460ff16155b610a585760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610a7a576000805461ffff19166101011790555b610a82610e6b565b610a8a610eee565b610a9382610f4c565b8015610475576000805461ff00191690555050565b6104758282610783565b60606000610ac183600261137d565b610acc906002611365565b67ffffffffffffffff811115610af257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610b1c576020820181803683370190505b509050600360fc1b81600081518110610b4557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610b8257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610ba684600261137d565b610bb1906001611365565b90505b6001811115610c45576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610bf357634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110610c1757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93610c3e816113df565b9050610bb4565b508315610c945760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610462565b9392505050565b803b610cff5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610462565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b610d9f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610462565b600080846001600160a01b031684604051610dba9190611253565b600060405180830381855af49150503d8060008114610df5576040519150601f19603f3d011682016040523d82523d6000602084013e610dfa565b606091505b5091509150610e22828260405180606001604052806027815260200161144360279139611015565b95945050505050565b610e3481610c9b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680610e84575060005460ff16155b610ea05760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610ec2576000805461ffff19166101011790555b610eca61104e565b610ed261104e565b610eda61104e565b801561049d576000805461ff001916905550565b600054610100900460ff1680610f07575060005460ff16155b610f235760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610eca576000805461ffff1916610101179055610ed261104e565b600054610100900460ff1680610f65575060005460ff16155b610f815760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610fa3576000805461ffff19166101011790555b6001600160a01b038216610fb657600080fd5b610fc1600083610aa8565b610feb7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610aa8565b610a937f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383610aa8565b60608315611024575081610c94565b8251156110345782518084602001fd5b8160405162461bcd60e51b815260040161046291906112e4565b600054610100900460ff1680611067575060005460ff16155b6110835760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610eda576000805461ffff1916610101179055801561049d576000805461ff001916905550565b80356001600160a01b03811681146103c557600080fd5b6000602082840312156110e0578081fd5b610c94826110b8565b6000806000606084860312156110fd578182fd5b611106846110b8565b9250611114602085016110b8565b9150611122604085016110b8565b90509250925092565b6000806040838503121561113d578182fd5b611146836110b8565b9150602083013567ffffffffffffffff80821115611162578283fd5b818501915085601f830112611175578283fd5b8135818111156111875761118761140c565b604051601f8201601f19908116603f011681019083821181831017156111af576111af61140c565b816040528281528860208487010111156111c7578586fd5b82602086016020830137856020848301015280955050505050509250929050565b6000602082840312156111f9578081fd5b5035919050565b60008060408385031215611212578182fd5b82359150611222602084016110b8565b90509250929050565b60006020828403121561123c578081fd5b81356001600160e01b031981168114610c94578182fd5b600082516112658184602087016113b3565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516112a78160178501602088016113b3565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516112d88160288401602088016113b3565b01602801949350505050565b60006020825282518060208401526113038160408501602087016113b3565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115611378576113786113f6565b500190565b6000816000190483118215151615611397576113976113f6565b500290565b6000828210156113ae576113ae6113f6565b500390565b60005b838110156113ce5781810151838201526020016113b6565b838111156106f35750506000910152565b6000816113ee576113ee6113f6565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfefbb0a55d3bd620b175b4b5ed8e54b15ee857894bb1d3baf3b9219271d425d7f9416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c3ce78d167fc465a7b455d7d930fadb0a7bcf261567cf9417feb06f7fb1f03d164736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106100fe5760003560e01c806370720d1f11610095578063a217fddf11610064578063a217fddf146102e6578063c0c53b8b146102fb578063d547741f1461031b578063f4e5f7061461033b578063f72c0d8b1461035d576100fe565b806370720d1f1461024557806375b238fc1461027257806391d14854146102a657806392d0214c146102c6576100fe565b80633659cfe6116100d15780633659cfe6146101b85780633809467e146101d85780634f1ef286146102055780636a2a651814610218576100fe565b806301ffc9a714610103578063248a9ca3146101385780632f2ff15d1461017657806336568abe14610198575b600080fd5b34801561010f57600080fd5b5061012361011e36600461122b565b610391565b60405190151581526020015b60405180910390f35b34801561014457600080fd5b506101686101533660046111e8565b60009081526065602052604090206001015490565b60405190815260200161012f565b34801561018257600080fd5b50610196610191366004611200565b6103ca565b005b3480156101a457600080fd5b506101966101b3366004611200565b6103f6565b3480156101c457600080fd5b506101966101d33660046110cf565b610479565b3480156101e457600080fd5b506101686101f33660046110cf565b60fb6020526000908152604090205481565b61019661021336600461112b565b6104a0565b34801561022457600080fd5b506101686102333660046110cf565b60fc6020526000908152604090205481565b34801561025157600080fd5b506101686102603660046110cf565b60fd6020526000908152604090205481565b34801561027e57600080fd5b506101687fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102b257600080fd5b506101236102c1366004611200565b6104b5565b3480156102d257600080fd5b506101966102e13660046110cf565b6104e0565b3480156102f257600080fd5b50610168600081565b34801561030757600080fd5b506101966103163660046110e9565b610651565b34801561032757600080fd5b50610196610336366004611200565b6106f9565b34801561034757600080fd5b5061016860008051602061142383398151915281565b34801561036957600080fd5b506101687f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806103c257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6000828152606560205260409020600101546103e781335b61071f565b6103f18383610783565b505050565b6001600160a01b038116331461046b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104758282610809565b5050565b61048281610870565b61049d8160405180602001604052806000815250600061089b565b50565b6104a982610870565b6104758282600161089b565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6104f8600080516020611423833981519152336104b5565b1561049d576001600160a01b038116600090815260fd60205260409020544262015180610525838361139c565b106105ec576001600160a01b038316600090815260fb602052604081208054680d8d726b7177a80000929061055b908490611365565b9091555061056f905062015180600261137d565b610579838361139c565b10156105b3576001600160a01b038316600090815260fc602052604081208054600192906105a8908490611365565b909155506105d09050565b6001600160a01b038316600090815260fc60205260409020600190555b6001600160a01b038316600090815260fd602052604090208190555b6001600160a01b038316600081815260fb602090815260408083205460fc8352928190205481519485529184019290925282820152517f6f4864c954777b623ffcb477ee1875e76a6345a6ca1588bcc781048e8674e5ee9181900360600190a1505050565b600054610100900460ff168061066a575060005460ff16155b6106865760405162461bcd60e51b815260040161046290611317565b600054610100900460ff161580156106a8576000805461ffff19166101011790555b6106b184610a23565b6106c960008051602061142383398151915284610aa8565b6106e160008051602061142383398151915283610aa8565b80156106f3576000805461ff00191690555b50505050565b60008281526065602052604090206001015461071581336103e2565b6103f18383610809565b61072982826104b5565b61047557610741816001600160a01b03166014610ab2565b61074c836020610ab2565b60405160200161075d92919061126f565b60408051601f198184030181529082905262461bcd60e51b8252610462916004016112e4565b61078d82826104b5565b6104755760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556107c53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61081382826104b5565b156104755760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361047581336103e2565b60006108ce7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506108d984610c9b565b6000835111806108e65750815b156108f7576108f58484610d40565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610a1c57805460ff191660011781556040516001600160a01b038316602482015261097690869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052610d40565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b03838116911614610a135760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610462565b610a1c85610e2b565b5050505050565b600054610100900460ff1680610a3c575060005460ff16155b610a585760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610a7a576000805461ffff19166101011790555b610a82610e6b565b610a8a610eee565b610a9382610f4c565b8015610475576000805461ff00191690555050565b6104758282610783565b60606000610ac183600261137d565b610acc906002611365565b67ffffffffffffffff811115610af257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610b1c576020820181803683370190505b509050600360fc1b81600081518110610b4557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610b8257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610ba684600261137d565b610bb1906001611365565b90505b6001811115610c45576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610bf357634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110610c1757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93610c3e816113df565b9050610bb4565b508315610c945760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610462565b9392505050565b803b610cff5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610462565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b610d9f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610462565b600080846001600160a01b031684604051610dba9190611253565b600060405180830381855af49150503d8060008114610df5576040519150601f19603f3d011682016040523d82523d6000602084013e610dfa565b606091505b5091509150610e22828260405180606001604052806027815260200161144360279139611015565b95945050505050565b610e3481610c9b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680610e84575060005460ff16155b610ea05760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610ec2576000805461ffff19166101011790555b610eca61104e565b610ed261104e565b610eda61104e565b801561049d576000805461ff001916905550565b600054610100900460ff1680610f07575060005460ff16155b610f235760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610eca576000805461ffff1916610101179055610ed261104e565b600054610100900460ff1680610f65575060005460ff16155b610f815760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610fa3576000805461ffff19166101011790555b6001600160a01b038216610fb657600080fd5b610fc1600083610aa8565b610feb7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610aa8565b610a937f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383610aa8565b60608315611024575081610c94565b8251156110345782518084602001fd5b8160405162461bcd60e51b815260040161046291906112e4565b600054610100900460ff1680611067575060005460ff16155b6110835760405162461bcd60e51b815260040161046290611317565b600054610100900460ff16158015610eda576000805461ffff1916610101179055801561049d576000805461ff001916905550565b80356001600160a01b03811681146103c557600080fd5b6000602082840312156110e0578081fd5b610c94826110b8565b6000806000606084860312156110fd578182fd5b611106846110b8565b9250611114602085016110b8565b9150611122604085016110b8565b90509250925092565b6000806040838503121561113d578182fd5b611146836110b8565b9150602083013567ffffffffffffffff80821115611162578283fd5b818501915085601f830112611175578283fd5b8135818111156111875761118761140c565b604051601f8201601f19908116603f011681019083821181831017156111af576111af61140c565b816040528281528860208487010111156111c7578586fd5b82602086016020830137856020848301015280955050505050509250929050565b6000602082840312156111f9578081fd5b5035919050565b60008060408385031215611212578182fd5b82359150611222602084016110b8565b90509250929050565b60006020828403121561123c578081fd5b81356001600160e01b031981168114610c94578182fd5b600082516112658184602087016113b3565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516112a78160178501602088016113b3565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516112d88160288401602088016113b3565b01602801949350505050565b60006020825282518060208401526113038160408501602087016113b3565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115611378576113786113f6565b500190565b6000816000190483118215151615611397576113976113f6565b500290565b6000828210156113ae576113ae6113f6565b500390565b60005b838110156113ce5781810151838201526020016113b6565b838111156106f35750506000910152565b6000816113ee576113ee6113f6565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfefbb0a55d3bd620b175b4b5ed8e54b15ee857894bb1d3baf3b9219271d425d7f9416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c3ce78d167fc465a7b455d7d930fadb0a7bcf261567cf9417feb06f7fb1f03d164736f6c63430008030033", + "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." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "GEMS ", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/GEMS.sol:GEMS", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/GEMS.sol:GEMS", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/GEMS.sol:GEMS", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/GEMS.sol:GEMS", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/GEMS.sol:GEMS", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/GEMS.sol:GEMS", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/GEMS.sol:GEMS", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/GEMS.sol:GEMS", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 10540, + "contract": "contracts/GEMS.sol:GEMS", + "label": "gems", + "offset": 0, + "slot": "251", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 10544, + "contract": "contracts/GEMS.sol:GEMS", + "label": "streak", + "offset": 0, + "slot": "252", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 10548, + "contract": "contracts/GEMS.sol:GEMS", + "label": "lastAction", + "offset": 0, + "slot": "253", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/GEMS.sol:GEMS", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/GEMS.sol:GEMS", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/polygon/GEMS_Proxy.json b/deployments/polygon/GEMS_Proxy.json new file mode 100644 index 0000000..994eff2 --- /dev/null +++ b/deployments/polygon/GEMS_Proxy.json @@ -0,0 +1,147 @@ +{ + "address": "0x756218A9476bF7C75a887d9c7aB916DE15AB5Ddf", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xaa528aa3f08d2865e59ad143adddbd32b587f40b55a51d959bfd32d295e0a1e6", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x756218A9476bF7C75a887d9c7aB916DE15AB5Ddf", + "transactionIndex": 42, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000400000000020000001000000400000000000000000000000000000000000000000008000000000000000004000000000000004000000000000000000000002800000000000000000000100400000000000000000004000000000000000020000000000000000000080000000000000000000000000000000800000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000020000008000001000000000000000000000000000000100000000000000000000000000200000000000000000000000000000000002000000000100000", + "blockHash": "0x98cae97e6c61d1782c409ec96810171addd7d811d483b0943e5c87574d6aa644", + "transactionHash": "0xaa528aa3f08d2865e59ad143adddbd32b587f40b55a51d959bfd32d295e0a1e6", + "logs": [ + { + "transactionIndex": 42, + "blockNumber": 19058647, + "transactionHash": "0xaa528aa3f08d2865e59ad143adddbd32b587f40b55a51d959bfd32d295e0a1e6", + "address": "0x756218A9476bF7C75a887d9c7aB916DE15AB5Ddf", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000f996569ca45b50afe01c1b2d1258d3e396d78534" + ], + "data": "0x", + "logIndex": 192, + "blockHash": "0x98cae97e6c61d1782c409ec96810171addd7d811d483b0943e5c87574d6aa644" + }, + { + "transactionIndex": 42, + "blockNumber": 19058647, + "transactionHash": "0xaa528aa3f08d2865e59ad143adddbd32b587f40b55a51d959bfd32d295e0a1e6", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x0000000000000000000000000000000000000000000000000002265a8afa68800000000000000000000000000000000000000000000000000dc0e8fa463eacaa000000000000000000000000000000000000000000006e18534f93fd3c7fc4440000000000000000000000000000000000000000000000000dbec29fbb44442a000000000000000000000000000000000000000000006e185351ba57c77a2cc4", + "logIndex": 193, + "blockHash": "0x98cae97e6c61d1782c409ec96810171addd7d811d483b0943e5c87574d6aa644" + } + ], + "blockNumber": 19058647, + "cumulativeGasUsed": "9349109", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf996569ca45b50aFe01c1b2D1258d3e396D78534", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0x" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/LongShort.json b/deployments/polygon/LongShort.json new file mode 100644 index 0000000..f6a486e --- /dev/null +++ b/deployments/polygon/LongShort.json @@ -0,0 +1,1650 @@ +{ + "address": "0x168a5d1217AEcd258b03018d5bF1A1677A07b733", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + } + ], + "name": "ExecuteNextPriceSettlementsUser", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "tokenFactory", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "staker", + "type": "address" + } + ], + "name": "LongShortV1", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "initialSeed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "marketLeverage", + "type": "uint256" + } + ], + "name": "NewMarketLaunchedAndSeeded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositAdded", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oracleUpdateIndex", + "type": "uint256" + } + ], + "name": "NextPriceDeposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "synthRedeemed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oracleUpdateIndex", + "type": "uint256" + } + ], + "name": "NextPriceRedeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "synthShifted", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oracleUpdateIndex", + "type": "uint256" + } + ], + "name": "NextPriceSyntheticPositionShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldOracleAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOracleAddress", + "type": "address" + } + ], + "name": "OracleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "longTokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "shortTokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "paymentToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "int256", + "name": "initialAssetPrice", + "type": "int256" + }, + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "oracleAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "yieldManagerAddress", + "type": "address" + } + ], + "name": "SyntheticMarketCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "updateIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "underlyingAssetPrice", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "longValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shortValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "longPrice", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shortPrice", + "type": "uint256" + } + ], + "name": "SystemStateUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMANENT_INITIAL_LIQUIDITY_HOLDER", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "assetPrice", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "batched_amountPaymentToken_deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "batched_amountSyntheticToken_redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "batched_amountSyntheticToken_toShiftAwayFrom_marketSide", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_marketTreasurySplitGradient_e18", + "type": "uint256" + } + ], + "name": "changeMarketTreasurySplitGradient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "syntheticName", + "type": "string" + }, + { + "internalType": "string", + "name": "syntheticSymbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_oracleManager", + "type": "address" + }, + { + "internalType": "address", + "name": "_yieldManager", + "type": "address" + } + ], + "name": "createNewSyntheticMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "syntheticName", + "type": "string" + }, + { + "internalType": "string", + "name": "syntheticSymbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_shortToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_oracleManager", + "type": "address" + }, + { + "internalType": "address", + "name": "_yieldManager", + "type": "address" + } + ], + "name": "createNewSyntheticMarketExternalSyntheticTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + } + ], + "name": "executeOutstandingNextPriceSettlementsUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + } + ], + "name": "executeOutstandingNextPriceSettlementsUserMulti", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gems", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticToken_redeemOnOriginSide", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "priceSnapshotIndex", + "type": "uint256" + } + ], + "name": "getAmountSyntheticTokenToMintOnTargetSide", + "outputs": [ + { + "internalType": "uint256", + "name": "amountSyntheticTokensToMintOnTargetSide", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + } + ], + "name": "getUsersConfirmedButNotSettledSynthBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "confirmedButNotSettledBalance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "address", + "name": "_gems", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "kInitialMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "unstakeFee_e18", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialMarketSeedForEachMarketSide", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balanceIncentiveCurve_exponent", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "_marketTreasurySplitGradient_e18", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "marketLeverage", + "type": "uint256" + } + ], + "name": "initializeMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "latestMarket", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketExists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketLeverage_e18", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "marketSideValueInPaymentToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketTreasurySplitGradient_e18", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketUpdateIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mintLongNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mintShortNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "oracleManagers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "paymentTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "redeemLongNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "redeemShortNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + } + ], + "name": "shiftPositionFromLongNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + } + ], + "name": "shiftPositionFromShortNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + } + ], + "name": "shiftPositionNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "syntheticToken_priceSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "syntheticTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenFactory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_newOracleManager", + "type": "address" + } + ], + "name": "updateMarketOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + } + ], + "name": "updateSystemState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + } + ], + "name": "updateSystemStateMulti", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_currentUpdateIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_paymentToken_depositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_syntheticToken_redeemAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_syntheticToken_toShiftAwayFrom_marketSide", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "yieldManagers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x5d1cfda7d535fc9639b0d951ae06259ca24960b5215cae527e1c4a450cae2506", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x168a5d1217AEcd258b03018d5bF1A1677A07b733", + "transactionIndex": 34, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000400000000020000000000000400000000000000000001000020000000000000000008000000000000000000000000000000004000000000000000000000002800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000200000000000000800000000000000000000000000000000000000000000000200000000000000000000000000000000000200000000000000000000000004000000020000008000001000000000000000000000000000000100000000001000000000000000200000000000000000000000000008000000000000000100000", + "blockHash": "0x764f3a89dd5e52dfb935fe21694a33679747edf2e197d1fdf2d3ea7f52343e82", + "transactionHash": "0x5d1cfda7d535fc9639b0d951ae06259ca24960b5215cae527e1c4a450cae2506", + "logs": [ + { + "transactionIndex": 34, + "blockNumber": 19059206, + "transactionHash": "0x5d1cfda7d535fc9639b0d951ae06259ca24960b5215cae527e1c4a450cae2506", + "address": "0x168a5d1217AEcd258b03018d5bF1A1677A07b733", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000045bdab6840929937619d44fd2e8def962d8d2882" + ], + "data": "0x", + "logIndex": 55, + "blockHash": "0x764f3a89dd5e52dfb935fe21694a33679747edf2e197d1fdf2d3ea7f52343e82" + }, + { + "transactionIndex": 34, + "blockNumber": 19059206, + "transactionHash": "0x5d1cfda7d535fc9639b0d951ae06259ca24960b5215cae527e1c4a450cae2506", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x0000000000000000000000000000000000000000000000000008cdb3599d34000000000000000000000000000000000000000000000000000cfca7c2de2d2b42000000000000000000000000000000000000000000006e1fe683a5e6be422bb90000000000000000000000000000000000000000000000000cf3da0f848ff742000000000000000000000000000000000000000000006e1fe68c739a17df5fb9", + "logIndex": 56, + "blockHash": "0x764f3a89dd5e52dfb935fe21694a33679747edf2e197d1fdf2d3ea7f52343e82" + } + ], + "blockNumber": 19059206, + "cumulativeGasUsed": "2063735", + "status": 1, + "byzantium": true + }, + "args": [ + "0x45BdAB6840929937619d44Fd2E8DEf962D8D2882", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0x" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "implementation": "0x45BdAB6840929937619d44Fd2E8DEf962D8D2882", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/LongShort_Implementation.json b/deployments/polygon/LongShort_Implementation.json new file mode 100644 index 0000000..c3f3315 --- /dev/null +++ b/deployments/polygon/LongShort_Implementation.json @@ -0,0 +1,2307 @@ +{ + "address": "0x45BdAB6840929937619d44Fd2E8DEf962D8D2882", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + } + ], + "name": "ExecuteNextPriceSettlementsUser", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "tokenFactory", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "staker", + "type": "address" + } + ], + "name": "LongShortV1", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "initialSeed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "marketLeverage", + "type": "uint256" + } + ], + "name": "NewMarketLaunchedAndSeeded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositAdded", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oracleUpdateIndex", + "type": "uint256" + } + ], + "name": "NextPriceDeposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "synthRedeemed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oracleUpdateIndex", + "type": "uint256" + } + ], + "name": "NextPriceRedeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "synthShifted", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oracleUpdateIndex", + "type": "uint256" + } + ], + "name": "NextPriceSyntheticPositionShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldOracleAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOracleAddress", + "type": "address" + } + ], + "name": "OracleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "longTokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "shortTokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "paymentToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "int256", + "name": "initialAssetPrice", + "type": "int256" + }, + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "oracleAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "yieldManagerAddress", + "type": "address" + } + ], + "name": "SyntheticMarketCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "updateIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "underlyingAssetPrice", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "longValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shortValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "longPrice", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shortPrice", + "type": "uint256" + } + ], + "name": "SystemStateUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMANENT_INITIAL_LIQUIDITY_HOLDER", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "assetPrice", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "batched_amountPaymentToken_deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "batched_amountSyntheticToken_redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "batched_amountSyntheticToken_toShiftAwayFrom_marketSide", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_marketTreasurySplitGradient_e18", + "type": "uint256" + } + ], + "name": "changeMarketTreasurySplitGradient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "syntheticName", + "type": "string" + }, + { + "internalType": "string", + "name": "syntheticSymbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_oracleManager", + "type": "address" + }, + { + "internalType": "address", + "name": "_yieldManager", + "type": "address" + } + ], + "name": "createNewSyntheticMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "syntheticName", + "type": "string" + }, + { + "internalType": "string", + "name": "syntheticSymbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_shortToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_oracleManager", + "type": "address" + }, + { + "internalType": "address", + "name": "_yieldManager", + "type": "address" + } + ], + "name": "createNewSyntheticMarketExternalSyntheticTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + } + ], + "name": "executeOutstandingNextPriceSettlementsUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + } + ], + "name": "executeOutstandingNextPriceSettlementsUserMulti", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gems", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticToken_redeemOnOriginSide", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "priceSnapshotIndex", + "type": "uint256" + } + ], + "name": "getAmountSyntheticTokenToMintOnTargetSide", + "outputs": [ + { + "internalType": "uint256", + "name": "amountSyntheticTokensToMintOnTargetSide", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + } + ], + "name": "getUsersConfirmedButNotSettledSynthBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "confirmedButNotSettledBalance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "address", + "name": "_gems", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "kInitialMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "unstakeFee_e18", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialMarketSeedForEachMarketSide", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balanceIncentiveCurve_exponent", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "_marketTreasurySplitGradient_e18", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "marketLeverage", + "type": "uint256" + } + ], + "name": "initializeMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "latestMarket", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketExists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketLeverage_e18", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "marketSideValueInPaymentToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketTreasurySplitGradient_e18", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketUpdateIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mintLongNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mintShortNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "oracleManagers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "paymentTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "redeemLongNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "redeemShortNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + } + ], + "name": "shiftPositionFromLongNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + } + ], + "name": "shiftPositionFromShortNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + } + ], + "name": "shiftPositionNextPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "syntheticToken_priceSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "syntheticTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenFactory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_newOracleManager", + "type": "address" + } + ], + "name": "updateMarketOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + } + ], + "name": "updateSystemState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + } + ], + "name": "updateSystemStateMulti", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_currentUpdateIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_paymentToken_depositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_syntheticToken_redeemAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_syntheticToken_toShiftAwayFrom_marketSide", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "yieldManagers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x72cfce080c0d6404c141c14847944ad7c6569ddcc9e68a34543635d903649cb0", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x45BdAB6840929937619d44Fd2E8DEf962D8D2882", + "transactionIndex": 56, + "gasUsed": "4367611", + "logsBloom": "0x00000000000000000000000000000000000000000020000000000000400000000000000000000000000000000000000000008000000000000000000000000000000004000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000800000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000008000001000000000000000000000000000000100000000000000000000000000200000000000000000000000000000000000000000000100000", + "blockHash": "0xd873eb35a4549037c5aea6ec92f638ef2c777c6462011d7bff8fd1a3562a2105", + "transactionHash": "0x72cfce080c0d6404c141c14847944ad7c6569ddcc9e68a34543635d903649cb0", + "logs": [ + { + "transactionIndex": 56, + "blockNumber": 19059200, + "transactionHash": "0x72cfce080c0d6404c141c14847944ad7c6569ddcc9e68a34543635d903649cb0", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x000000000000000000000000000000000000000000000000009b2b30cdb88c000000000000000000000000000000000000000000000000000d97d2f3abe5b742000000000000000000000000000000000000000000006e1fd1fc92b846226f800000000000000000000000000000000000000000000000000cfca7c2de2d2b42000000000000000000000000000000000000000000006e1fd297bde913dafb80", + "logIndex": 261, + "blockHash": "0xd873eb35a4549037c5aea6ec92f638ef2c777c6462011d7bff8fd1a3562a2105" + } + ], + "blockNumber": 19059200, + "cumulativeGasUsed": "15377054", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"}],\"name\":\"ExecuteNextPriceSettlementsUser\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenFactory\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"LongShortV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialSeed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"marketLeverage\",\"type\":\"uint256\"}],\"name\":\"NewMarketLaunchedAndSeeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isLong\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositAdded\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oracleUpdateIndex\",\"type\":\"uint256\"}],\"name\":\"NextPriceDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isLong\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"synthRedeemed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oracleUpdateIndex\",\"type\":\"uint256\"}],\"name\":\"NextPriceRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isShiftFromLong\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"synthShifted\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oracleUpdateIndex\",\"type\":\"uint256\"}],\"name\":\"NextPriceSyntheticPositionShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldOracleAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOracleAddress\",\"type\":\"address\"}],\"name\":\"OracleUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"longTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"shortTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"paymentToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"initialAssetPrice\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oracleAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"yieldManagerAddress\",\"type\":\"address\"}],\"name\":\"SyntheticMarketCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"updateIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"underlyingAssetPrice\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"longValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shortValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"longPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shortPrice\",\"type\":\"uint256\"}],\"name\":\"SystemStateUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMANENT_INITIAL_LIQUIDITY_HOLDER\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"assetPrice\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"batched_amountPaymentToken_deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"batched_amountSyntheticToken_redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"batched_amountSyntheticToken_toShiftAwayFrom_marketSide\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_marketTreasurySplitGradient_e18\",\"type\":\"uint256\"}],\"name\":\"changeMarketTreasurySplitGradient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"syntheticName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"syntheticSymbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_paymentToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oracleManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_yieldManager\",\"type\":\"address\"}],\"name\":\"createNewSyntheticMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"syntheticName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"syntheticSymbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_longToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_shortToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_paymentToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oracleManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_yieldManager\",\"type\":\"address\"}],\"name\":\"createNewSyntheticMarketExternalSyntheticTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"}],\"name\":\"executeOutstandingNextPriceSettlementsUser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint32[]\",\"name\":\"marketIndexes\",\"type\":\"uint32[]\"}],\"name\":\"executeOutstandingNextPriceSettlementsUserMulti\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gems\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amountSyntheticToken_redeemOnOriginSide\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isShiftFromLong\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"priceSnapshotIndex\",\"type\":\"uint256\"}],\"name\":\"getAmountSyntheticTokenToMintOnTargetSide\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountSyntheticTokensToMintOnTargetSide\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isLong\",\"type\":\"bool\"}],\"name\":\"getUsersConfirmedButNotSettledSynthBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"confirmedButNotSettledBalance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenFactory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gems\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"kInitialMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeFee_e18\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initialMarketSeedForEachMarketSide\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balanceIncentiveCurve_exponent\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"balanceIncentiveCurve_equilibriumOffset\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"_marketTreasurySplitGradient_e18\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"marketLeverage\",\"type\":\"uint256\"}],\"name\":\"initializeMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestMarket\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketLeverage_e18\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"marketSideValueInPaymentToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketTreasurySplitGradient_e18\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketUpdateIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mintLongNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mintShortNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"oracleManagers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"paymentTokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"tokens_redeem\",\"type\":\"uint256\"}],\"name\":\"redeemLongNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"tokens_redeem\",\"type\":\"uint256\"}],\"name\":\"redeemShortNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amountSyntheticTokensToShift\",\"type\":\"uint256\"}],\"name\":\"shiftPositionFromLongNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amountSyntheticTokensToShift\",\"type\":\"uint256\"}],\"name\":\"shiftPositionFromShortNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amountSyntheticTokensToShift\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isShiftFromLong\",\"type\":\"bool\"}],\"name\":\"shiftPositionNextPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staker\",\"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\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"syntheticToken_priceSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"syntheticTokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_newOracleManager\",\"type\":\"address\"}],\"name\":\"updateMarketOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"}],\"name\":\"updateSystemState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"marketIndexes\",\"type\":\"uint32[]\"}],\"name\":\"updateSystemStateMulti\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_currentUpdateIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_paymentToken_depositAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_syntheticToken_redeemAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_syntheticToken_toShiftAwayFrom_marketSide\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"yieldManagers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"float.capital\",\"custom:auditors\":\"This contract balances long and short sides.\",\"details\":\"All functions in this file are currently `virtual`. This is NOT to encourage inheritance. It is merely for convenince when unit testing.\",\"kind\":\"dev\",\"methods\":{\"createNewSyntheticMarket(string,string,address,address,address)\":{\"details\":\"This does not make the market active. The `initializeMarket` function was split out separately to this function to reduce costs.\",\"params\":{\"_oracleManager\":\"The address of the oracle manager that provides the price feed for this market\",\"_paymentToken\":\"The address of the erc20 token used to buy this synthetic asset this will likely always be DAI\",\"_yieldManager\":\"The contract that manages depositing the paymentToken into a yield bearing protocol\",\"syntheticName\":\"Name of the synthetic asset\",\"syntheticSymbol\":\"Symbol for the synthetic asset\"}},\"createNewSyntheticMarketExternalSyntheticTokens(string,string,address,address,address,address,address)\":{\"details\":\"This does not make the market active. The `initializeMarket` function was split out separately to this function to reduce costs.\",\"params\":{\"_longToken\":\"Address for the long token.\",\"_oracleManager\":\"The address of the oracle manager that provides the price feed for this market\",\"_paymentToken\":\"The address of the erc20 token used to buy this synthetic asset this will likely always be DAI\",\"_shortToken\":\"Address for the short token.\",\"_yieldManager\":\"The contract that manages depositing the paymentToken into a yield bearing protocol\",\"syntheticName\":\"Name of the synthetic asset\",\"syntheticSymbol\":\"Symbol for the synthetic asset\"}},\"executeOutstandingNextPriceSettlementsUser(address,uint32)\":{\"params\":{\"marketIndex\":\"An uint32 which uniquely identifies a market.\",\"user\":\"The address of the user for whom to execute the function.\"}},\"executeOutstandingNextPriceSettlementsUserMulti(address,uint32[])\":{\"params\":{\"marketIndexes\":\"An array of int32s which each uniquely identify a market.\",\"user\":\"The address of the user for whom to execute the function.\"}},\"getAmountSyntheticTokenToMintOnTargetSide(uint32,uint256,bool,uint256)\":{\"details\":\"Intended for use primarily by Staker.sol\",\"params\":{\"amountSyntheticToken_redeemOnOriginSide\":\"Amount of synth token in wei.\",\"isShiftFromLong\":\"Whether the token shift is from long to short (true), or short to long (false).\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\",\"priceSnapshotIndex\":\"Index which identifies which synth prices to use.\"},\"returns\":{\"amountSyntheticTokensToMintOnTargetSide\":\"The amount in wei of tokens for the other side that the shift was worth.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getUsersConfirmedButNotSettledSynthBalance(address,uint32,bool)\":{\"details\":\"Used in SyntheticToken.sol balanceOf to allow for automatic reflection of next price actions.\",\"params\":{\"isLong\":\"Whether it is for the long synthetic asset or the short synthetic asset.\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\",\"user\":\"The address of the user for whom to execute the function for.\"},\"returns\":{\"confirmedButNotSettledBalance\":\"The amount in wei of tokens that the user is owed.\"}},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address,address)\":{\"details\":\"Calls OpenZeppelin's initializer modifier.\",\"params\":{\"_admin\":\"Address of the admin role.\",\"_staker\":\"Address of the contract which handles synthetic asset stakes.\",\"_tokenFactory\":\"Address of the contract which creates synthetic asset tokens.\"}},\"initializeMarket(uint32,uint256,uint256,uint256,uint256,uint256,int256,uint256,uint256)\":{\"details\":\"Seperated from createNewSyntheticMarket due to gas considerations.\",\"params\":{\"balanceIncentiveCurve_equilibriumOffset\":\"An offset to account for naturally imbalanced markets when Float token issuance should differ for market sides. See Staker.sol\",\"balanceIncentiveCurve_exponent\":\"Sets the degree to which Float token issuance differs for market sides in unbalanced markets. See Staker.sol\",\"initialMarketSeedForEachMarketSide\":\"Amount of payment token that will be deposited in each market side to seed the market.\",\"kInitialMultiplier\":\"Linearly decreasing multiplier for Float token issuance for the market when staking synths.\",\"kPeriod\":\"Time which kInitialMultiplier will last\",\"marketIndex\":\"An int32 which uniquely identifies the market.\",\"unstakeFee_e18\":\"Base 1e18 percentage fee levied when unstaking for the market.\"}},\"mintLongNextPrice(uint32,uint256)\":{\"params\":{\"amount\":\"Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"mintShortNextPrice(uint32,uint256)\":{\"params\":{\"amount\":\"Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"redeemLongNextPrice(uint32,uint256)\":{\"params\":{\"marketIndex\":\"An uint32 which uniquely identifies a market.\",\"tokens_redeem\":\"Amount in wei of synth tokens to redeem at the next oracle price.\"}},\"redeemShortNextPrice(uint32,uint256)\":{\"params\":{\"marketIndex\":\"An uint32 which uniquely identifies a market.\",\"tokens_redeem\":\"Amount in wei of synth tokens to redeem at the next oracle price.\"}},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"shiftPositionFromLongNextPrice(uint32,uint256)\":{\"params\":{\"amountSyntheticTokensToShift\":\"Amount in wei of synthetic tokens to shift from long to short the next oracle price update.\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"shiftPositionFromShortNextPrice(uint32,uint256)\":{\"params\":{\"amountSyntheticTokensToShift\":\"Amount in wei of synthetic tokens to shift from the short to long at the next oracle price update.\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"shiftPositionNextPrice(uint32,uint256,bool)\":{\"details\":\"Called by external functions to shift either way. Intended for primary use by Staker.sol\",\"params\":{\"amountSyntheticTokensToShift\":\"Amount in wei of synthetic tokens to shift from the one side to the other at the next oracle price update.\",\"isShiftFromLong\":\"Whether the token shift is from long to short (true), or short to long (false).\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"updateMarketOracle(uint32,address)\":{\"details\":\"Can only be called by the current admin.\",\"params\":{\"_newOracleManager\":\"Address of the replacement oracle manager.\",\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"updateSystemState(uint32)\":{\"params\":{\"marketIndex\":\"An uint32 which uniquely identifies a market.\"}},\"updateSystemStateMulti(uint32[])\":{\"params\":{\"marketIndexes\":\"An array of int32s which uniquely identify markets.\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"stateVariables\":{\"PERMANENT_INITIAL_LIQUIDITY_HOLDER\":{\"details\":\"f10a7 spells float in hex - for fun - important part is that the private key for this address in not known.\"},\"__constantsGap\":{\"details\":\"an empty allocation of storage for use in future upgrades - inspiration from OZ: https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/10f0f1a95b1b0fd5520351886bae7a03490f1056/contracts/token/ERC20/ERC20Upgradeable.sol#L361\"}},\"title\":\"Core logic of Float Protocal markets\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"PERMANENT_INITIAL_LIQUIDITY_HOLDER()\":{\"notice\":\"this is the address that permanently locked initial liquidity for markets is held by. These tokens will never move so market can never have zero liquidity on a side.\"},\"changeMarketTreasurySplitGradient(uint32,uint256)\":{\"notice\":\"changes the gradient of the line for determining the yield split between market and treasury.\"},\"createNewSyntheticMarket(string,string,address,address,address)\":{\"notice\":\"Creates an entirely new long/short market tracking an underlying oracle price. Make sure the synthetic names/symbols are unique.\"},\"createNewSyntheticMarketExternalSyntheticTokens(string,string,address,address,address,address,address)\":{\"notice\":\"Creates an entirely new long/short market tracking an underlying oracle price. Uses already created synthetic tokens.\"},\"executeOutstandingNextPriceSettlementsUser(address,uint32)\":{\"notice\":\"After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user.\"},\"executeOutstandingNextPriceSettlementsUserMulti(address,uint32[])\":{\"notice\":\"Executes outstanding next price settlements for a user for multiple markets.\"},\"getAmountSyntheticTokenToMintOnTargetSide(uint32,uint256,bool,uint256)\":{\"notice\":\"Given an executed next price shift from tokens on one market side to the other, determines how many other side tokens the shift was worth.\"},\"getUsersConfirmedButNotSettledSynthBalance(address,uint32,bool)\":{\"notice\":\"The amount of a synth token a user is owed following a batch execution. 4 possible states for next price actions: - \\\"Pending\\\" - means the next price update hasn't happened or been enacted on by the updateSystemState function. - \\\"Confirmed\\\" - means the next price has been updated by the updateSystemState function. There is still - outstanding (lazy) computation that needs to be executed per user in the batch. - \\\"Settled\\\" - there is no more computation left for the user. - \\\"Non-existent\\\" - user has no next price actions. This function returns a calculated value only in the case of 'confirmed' next price actions. It should return zero for all other types of next price actions.\"},\"initialize(address,address,address,address)\":{\"notice\":\"Initializes the contract.\"},\"initializeMarket(uint32,uint256,uint256,uint256,uint256,uint256,int256,uint256,uint256)\":{\"notice\":\"Sets a market as active once it has already been setup by createNewSyntheticMarket.\"},\"mintLongNextPrice(uint32,uint256)\":{\"notice\":\"Allows users to mint long synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\"},\"mintShortNextPrice(uint32,uint256)\":{\"notice\":\"Allows users to mint short synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\"},\"redeemLongNextPrice(uint32,uint256)\":{\"notice\":\"Allows users to redeem long synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle.\"},\"redeemShortNextPrice(uint32,uint256)\":{\"notice\":\"Allows users to redeem short synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle.\"},\"shiftPositionFromLongNextPrice(uint32,uint256)\":{\"notice\":\"Allows users to shift their position from long to short in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\"},\"shiftPositionFromShortNextPrice(uint32,uint256)\":{\"notice\":\"Allows users to shift their position from short to long in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\"},\"shiftPositionNextPrice(uint32,uint256,bool)\":{\"notice\":\"Allows users to shift their position from one side of the market to the other in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\"},\"syntheticToken_priceSnapshot(uint32,bool,uint256)\":{\"notice\":\"synthetic token prices of a given market of a (long/short) at every previous price update\"},\"updateMarketOracle(uint32,address)\":{\"notice\":\"Update oracle for a market\"},\"updateSystemState(uint32)\":{\"notice\":\"Updates the state of a market to account for the latest oracle price update.\"},\"updateSystemStateMulti(uint32[])\":{\"notice\":\"Updates the state of multiples markets to account for their latest oracle price updates.\"}},\"notice\":\"visit https://float.capital for more info\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LongShort.sol\":\"LongShort\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x02348b2e4b9f3200c7e3907c5c2661643a6d8520e9f79939fbb9b4005a54894d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 / b + (a % b == 0 ? 0 : 1);\\n }\\n}\\n\",\"keccak256\":\"0x49ebdac5d515aebb95168564158940b79d7d5d12fbfe59cec546a00d57fee64a\",\"license\":\"MIT\"},\"contracts/GEMS.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\n/** Contract giving user GEMS*/\\n\\n// Inspired by https://github.com/andrecronje/rarity/blob/main/rarity.sol\\n\\n/** @title GEMS */\\ncontract GEMS is AccessControlledAndUpgradeable {\\n bytes32 public constant GEM_ROLE = keccak256(\\\"GEM_ROLE\\\");\\n\\n uint256 constant gems_per_day = 250e18;\\n uint256 constant DAY = 1 days;\\n\\n mapping(address => uint256) public gems;\\n mapping(address => uint256) public streak;\\n mapping(address => uint256) public lastAction;\\n\\n event GemsCollected(address user, uint256 gems, uint256 streak);\\n\\n function initialize(\\n address _admin,\\n address _longShort,\\n address _staker\\n ) external initializer {\\n _AccessControlledAndUpgradeable_init(_admin);\\n _setupRole(GEM_ROLE, _longShort);\\n _setupRole(GEM_ROLE, _staker);\\n }\\n\\n // Say gm and get gems by performing an action in LongShort or Staker\\n function gm(address user) external {\\n if (hasRole(GEM_ROLE, msg.sender)) {\\n uint256 usersLastAction = lastAction[user];\\n uint256 blocktimestamp = block.timestamp;\\n\\n if (blocktimestamp - usersLastAction >= DAY) {\\n // Award gems\\n gems[user] += gems_per_day;\\n\\n // Increment streak\\n if (blocktimestamp - usersLastAction < 2 * DAY) {\\n streak[user] += 1;\\n } else {\\n streak[user] = 1; // reset streak to 1\\n }\\n\\n lastAction[user] = blocktimestamp;\\n }\\n emit GemsCollected(user, gems[user], streak[user]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0335305655aa936242355a082737ca1d3e819d38601a0bf3b1672158591e2abd\",\"license\":\"BUSL-1.1\"},\"contracts/LongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"./interfaces/ITokenFactory.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/IYieldManager.sol\\\";\\nimport \\\"./interfaces/IOracleManager.sol\\\";\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\nimport \\\"./GEMS.sol\\\";\\n\\n/**\\n **** visit https://float.capital *****\\n */\\n\\n/// @title Core logic of Float Protocal markets\\n/// @author float.capital\\n/// @notice visit https://float.capital for more info\\n/// @dev All functions in this file are currently `virtual`. This is NOT to encourage inheritance.\\n/// It is merely for convenince when unit testing.\\n/// @custom:auditors This contract balances long and short sides.\\ncontract LongShort is ILongShort, AccessControlledAndUpgradeable {\\n //Using Open Zeppelin safe transfer library for token transfers\\n using SafeERC20 for IERC20;\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 VARIABLES \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Fixed-precision constants \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n /// @notice this is the address that permanently locked initial liquidity for markets is held by.\\n /// These tokens will never move so market can never have zero liquidity on a side.\\n /// @dev f10a7 spells float in hex - for fun - important part is that the private key for this address in not known.\\n address public constant PERMANENT_INITIAL_LIQUIDITY_HOLDER =\\n 0xf10A7_F10A7_f10A7_F10a7_F10A7_f10a7_F10A7_f10a7;\\n\\n /// @dev an empty allocation of storage for use in future upgrades - inspiration from OZ:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/10f0f1a95b1b0fd5520351886bae7a03490f1056/contracts/token/ERC20/ERC20Upgradeable.sol#L361\\n uint256[45] private __constantsGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Global state \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n uint32 public latestMarket;\\n\\n address public staker;\\n address public tokenFactory;\\n address public gems;\\n\\n uint256[45] private __globalStateGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Market specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n mapping(uint32 => bool) public marketExists;\\n\\n mapping(uint32 => int256) public assetPrice;\\n mapping(uint32 => uint256) public override marketUpdateIndex;\\n mapping(uint32 => uint256) public marketTreasurySplitGradient_e18;\\n mapping(uint32 => uint256) public marketLeverage_e18;\\n\\n mapping(uint32 => address) public paymentTokens;\\n mapping(uint32 => address) public yieldManagers;\\n mapping(uint32 => address) public oracleManagers;\\n uint256[45] private __marketStateGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Market + position (long/short) specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n mapping(uint32 => mapping(bool => address)) public override syntheticTokens;\\n mapping(uint32 => mapping(bool => uint256)) public override marketSideValueInPaymentToken;\\n\\n /// @notice synthetic token prices of a given market of a (long/short) at every previous price update\\n mapping(uint32 => mapping(bool => mapping(uint256 => uint256)))\\n public\\n override syntheticToken_priceSnapshot;\\n\\n mapping(uint32 => mapping(bool => uint256)) public batched_amountPaymentToken_deposit;\\n mapping(uint32 => mapping(bool => uint256)) public batched_amountSyntheticToken_redeem;\\n mapping(uint32 => mapping(bool => uint256))\\n public batched_amountSyntheticToken_toShiftAwayFrom_marketSide;\\n uint256[45] private __marketPositonStateGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 User specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n mapping(uint32 => mapping(address => uint256)) public userNextPrice_currentUpdateIndex;\\n\\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\\n public userNextPrice_paymentToken_depositAmount;\\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\\n public userNextPrice_syntheticToken_redeemAmount;\\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\\n public userNextPrice_syntheticToken_toShiftAwayFrom_marketSide;\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MODIFIERS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function adminOnlyModifierLogic() internal virtual {\\n _checkRole(ADMIN_ROLE, msg.sender);\\n }\\n\\n modifier adminOnly() {\\n adminOnlyModifierLogic();\\n _;\\n }\\n\\n function requireMarketExistsModifierLogic(uint32 marketIndex) internal view virtual {\\n require(marketExists[marketIndex], \\\"market doesn't exist\\\");\\n }\\n\\n modifier requireMarketExists(uint32 marketIndex) {\\n requireMarketExistsModifierLogic(marketIndex);\\n _;\\n }\\n\\n modifier updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(\\n address user,\\n uint32 marketIndex\\n ) {\\n _updateSystemStateInternal(marketIndex);\\n _executeOutstandingNextPriceSettlements(user, marketIndex);\\n _;\\n }\\n\\n function gemCollectingModifierLogic() internal virtual {\\n if (msg.sender != staker) {\\n GEMS(gems).gm(msg.sender);\\n }\\n }\\n\\n modifier gemCollecting() {\\n gemCollectingModifierLogic();\\n _;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 CONTRACT SET-UP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Initializes the contract.\\n /// @dev Calls OpenZeppelin's initializer modifier.\\n /// @param _admin Address of the admin role.\\n /// @param _tokenFactory Address of the contract which creates synthetic asset tokens.\\n /// @param _staker Address of the contract which handles synthetic asset stakes.\\n function initialize(\\n address _admin,\\n address _tokenFactory,\\n address _staker,\\n address _gems\\n ) external virtual initializer {\\n require(\\n _admin != address(0) &&\\n _tokenFactory != address(0) &&\\n _staker != address(0) &&\\n _gems != address(0)\\n );\\n _AccessControlledAndUpgradeable_init(_admin);\\n tokenFactory = _tokenFactory;\\n staker = _staker;\\n gems = _gems;\\n\\n emit LongShortV1(_admin, _tokenFactory, _staker);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 ADMIN \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Update oracle for a market\\n /// @dev Can only be called by the current admin.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param _newOracleManager Address of the replacement oracle manager.\\n function updateMarketOracle(uint32 marketIndex, address _newOracleManager) external adminOnly {\\n // If not a oracle contract this would break things.. Test's arn't validating this\\n // Ie require isOracle interface - ERC165\\n address previousOracleManager = oracleManagers[marketIndex];\\n oracleManagers[marketIndex] = _newOracleManager;\\n emit OracleUpdated(marketIndex, previousOracleManager, _newOracleManager);\\n }\\n\\n /// @notice changes the gradient of the line for determining the yield split between market and treasury.\\n function changeMarketTreasurySplitGradient(\\n uint32 marketIndex,\\n uint256 _marketTreasurySplitGradient_e18\\n ) external adminOnly {\\n marketTreasurySplitGradient_e18[marketIndex] = _marketTreasurySplitGradient_e18;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MARKET CREATION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Creates an entirely new long/short market tracking an underlying oracle price.\\n /// Make sure the synthetic names/symbols are unique.\\n /// @dev This does not make the market active.\\n /// The `initializeMarket` function was split out separately to this function to reduce costs.\\n /// @param syntheticName Name of the synthetic asset\\n /// @param syntheticSymbol Symbol for the synthetic asset\\n /// @param _paymentToken The address of the erc20 token used to buy this synthetic asset\\n /// this will likely always be DAI\\n /// @param _oracleManager The address of the oracle manager that provides the price feed for this market\\n /// @param _yieldManager The contract that manages depositing the paymentToken into a yield bearing protocol\\n function createNewSyntheticMarket(\\n string calldata syntheticName,\\n string calldata syntheticSymbol,\\n address _paymentToken,\\n address _oracleManager,\\n address _yieldManager\\n ) external adminOnly {\\n require(\\n _paymentToken != address(0) && _oracleManager != address(0) && _yieldManager != address(0)\\n );\\n\\n uint32 marketIndex = ++latestMarket;\\n address _staker = staker;\\n\\n // Ensure new markets don't use the same yield manager\\n IYieldManager(_yieldManager).initializeForMarket();\\n\\n // Create new synthetic long token.\\n syntheticTokens[marketIndex][true] = ITokenFactory(tokenFactory).createSyntheticToken(\\n string(abi.encodePacked(\\\"Float Long \\\", syntheticName)),\\n string(abi.encodePacked(\\\"fl\\\", syntheticSymbol)),\\n _staker,\\n marketIndex,\\n true\\n );\\n\\n // Create new synthetic short token.\\n syntheticTokens[marketIndex][false] = ITokenFactory(tokenFactory).createSyntheticToken(\\n string(abi.encodePacked(\\\"Float Short \\\", syntheticName)),\\n string(abi.encodePacked(\\\"fs\\\", syntheticSymbol)),\\n _staker,\\n marketIndex,\\n false\\n );\\n\\n // Initial market state.\\n paymentTokens[marketIndex] = _paymentToken;\\n yieldManagers[marketIndex] = _yieldManager;\\n oracleManagers[marketIndex] = _oracleManager;\\n assetPrice[marketIndex] = IOracleManager(oracleManagers[marketIndex]).updatePrice();\\n\\n emit SyntheticMarketCreated(\\n marketIndex,\\n syntheticTokens[marketIndex][true],\\n syntheticTokens[marketIndex][false],\\n _paymentToken,\\n assetPrice[marketIndex],\\n syntheticName,\\n syntheticSymbol,\\n _oracleManager,\\n _yieldManager\\n );\\n }\\n\\n /// @notice Creates an entirely new long/short market tracking an underlying oracle price.\\n /// Uses already created synthetic tokens.\\n /// @dev This does not make the market active.\\n /// The `initializeMarket` function was split out separately to this function to reduce costs.\\n /// @param syntheticName Name of the synthetic asset\\n /// @param syntheticSymbol Symbol for the synthetic asset\\n /// @param _longToken Address for the long token.\\n /// @param _shortToken Address for the short token.\\n /// @param _paymentToken The address of the erc20 token used to buy this synthetic asset\\n /// this will likely always be DAI\\n /// @param _oracleManager The address of the oracle manager that provides the price feed for this market\\n /// @param _yieldManager The contract that manages depositing the paymentToken into a yield bearing protocol\\n function createNewSyntheticMarketExternalSyntheticTokens(\\n string calldata syntheticName,\\n string calldata syntheticSymbol,\\n address _longToken,\\n address _shortToken,\\n address _paymentToken,\\n address _oracleManager,\\n address _yieldManager\\n ) external adminOnly {\\n uint32 marketIndex = ++latestMarket;\\n\\n // Ensure new markets don't use the same yield manager\\n IYieldManager(_yieldManager).initializeForMarket();\\n\\n // Assign new synthetic long token.\\n syntheticTokens[marketIndex][true] = _longToken;\\n\\n // Assign new synthetic short token.\\n syntheticTokens[marketIndex][false] = _shortToken;\\n\\n // Initial market state.\\n paymentTokens[marketIndex] = _paymentToken;\\n yieldManagers[marketIndex] = _yieldManager;\\n oracleManagers[marketIndex] = _oracleManager;\\n assetPrice[marketIndex] = IOracleManager(oracleManagers[marketIndex]).updatePrice();\\n\\n emit SyntheticMarketCreated(\\n marketIndex,\\n _longToken,\\n _shortToken,\\n _paymentToken,\\n assetPrice[marketIndex],\\n syntheticName,\\n syntheticSymbol,\\n _oracleManager,\\n _yieldManager\\n );\\n }\\n\\n /// @notice Seeds a new market with initial capital.\\n /// @dev Only called when initializing a market.\\n /// @param initialMarketSeedForEachMarketSide Amount in wei for which to seed both sides of the market.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n function _seedMarketInitially(uint256 initialMarketSeedForEachMarketSide, uint32 marketIndex)\\n internal\\n virtual\\n {\\n require(\\n // You require at least 1e18 (1 payment token with 18 decimal places) of the underlying payment token to seed the market.\\n initialMarketSeedForEachMarketSide >= 1e18,\\n \\\"Insufficient market seed\\\"\\n );\\n\\n uint256 amountToLockInYieldManager = initialMarketSeedForEachMarketSide * 2;\\n _transferPaymentTokensFromUserToYieldManager(marketIndex, amountToLockInYieldManager);\\n IYieldManager(yieldManagers[marketIndex]).depositPaymentToken(amountToLockInYieldManager);\\n\\n ISyntheticToken(syntheticTokens[marketIndex][true]).mint(\\n PERMANENT_INITIAL_LIQUIDITY_HOLDER,\\n initialMarketSeedForEachMarketSide\\n );\\n ISyntheticToken(syntheticTokens[marketIndex][false]).mint(\\n PERMANENT_INITIAL_LIQUIDITY_HOLDER,\\n initialMarketSeedForEachMarketSide\\n );\\n\\n marketSideValueInPaymentToken[marketIndex][true] = initialMarketSeedForEachMarketSide;\\n marketSideValueInPaymentToken[marketIndex][false] = initialMarketSeedForEachMarketSide;\\n }\\n\\n /// @notice Sets a market as active once it has already been setup by createNewSyntheticMarket.\\n /// @dev Seperated from createNewSyntheticMarket due to gas considerations.\\n /// @param marketIndex An int32 which uniquely identifies the market.\\n /// @param kInitialMultiplier Linearly decreasing multiplier for Float token issuance for the market when staking synths.\\n /// @param kPeriod Time which kInitialMultiplier will last\\n /// @param unstakeFee_e18 Base 1e18 percentage fee levied when unstaking for the market.\\n /// @param balanceIncentiveCurve_exponent Sets the degree to which Float token issuance differs\\n /// for market sides in unbalanced markets. See Staker.sol\\n /// @param balanceIncentiveCurve_equilibriumOffset An offset to account for naturally imbalanced markets\\n /// when Float token issuance should differ for market sides. See Staker.sol\\n /// @param initialMarketSeedForEachMarketSide Amount of payment token that will be deposited in each market side to seed the market.\\n function initializeMarket(\\n uint32 marketIndex,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 initialMarketSeedForEachMarketSide,\\n uint256 balanceIncentiveCurve_exponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 _marketTreasurySplitGradient_e18,\\n uint256 marketLeverage\\n ) external adminOnly {\\n require(\\n kInitialMultiplier != 0 &&\\n unstakeFee_e18 != 0 &&\\n initialMarketSeedForEachMarketSide != 0 &&\\n balanceIncentiveCurve_exponent != 0 &&\\n _marketTreasurySplitGradient_e18 != 0\\n );\\n\\n require(!marketExists[marketIndex], \\\"already initialized\\\");\\n require(marketIndex <= latestMarket, \\\"index too high\\\");\\n\\n marketExists[marketIndex] = true;\\n\\n marketTreasurySplitGradient_e18[marketIndex] = _marketTreasurySplitGradient_e18;\\n\\n // Set this value to one initially - 0 is a null value and thus potentially bug prone.\\n marketUpdateIndex[marketIndex] = 1;\\n\\n _seedMarketInitially(initialMarketSeedForEachMarketSide, marketIndex);\\n\\n marketLeverage_e18[marketIndex] = marketLeverage;\\n\\n // Add new staker funds with fresh synthetic tokens.\\n IStaker(staker).addNewStakingFund(\\n marketIndex,\\n syntheticTokens[marketIndex][true],\\n syntheticTokens[marketIndex][false],\\n kInitialMultiplier,\\n kPeriod,\\n unstakeFee_e18,\\n balanceIncentiveCurve_exponent,\\n balanceIncentiveCurve_equilibriumOffset\\n );\\n\\n IStaker(staker).pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n marketIndex,\\n 1,\\n 1e18,\\n 1e18,\\n initialMarketSeedForEachMarketSide,\\n initialMarketSeedForEachMarketSide\\n );\\n\\n emit NewMarketLaunchedAndSeeded(\\n marketIndex,\\n initialMarketSeedForEachMarketSide,\\n marketLeverage\\n );\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 GETTER FUNCTIONS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Calculates the conversion rate from synthetic tokens to payment tokens.\\n /// @dev Synth tokens have a fixed 18 decimals.\\n /// @param amountPaymentTokenBackingSynth Amount of payment tokens in that token's lowest denomination.\\n /// @param amountSyntheticToken Amount of synth token in wei.\\n /// @return syntheticTokenPrice The calculated conversion rate in base 1e18.\\n function _getSyntheticTokenPrice(\\n uint256 amountPaymentTokenBackingSynth,\\n uint256 amountSyntheticToken\\n ) internal pure virtual returns (uint256 syntheticTokenPrice) {\\n return (amountPaymentTokenBackingSynth * 1e18) / amountSyntheticToken;\\n }\\n\\n /// @notice Converts synth token amounts to payment token amounts at a synth token price.\\n /// @dev Price assumed base 1e18.\\n /// @param amountSyntheticToken Amount of synth token in wei.\\n /// @param syntheticTokenPriceInPaymentTokens The conversion rate from synth to payment tokens in base 1e18.\\n /// @return amountPaymentToken The calculated amount of payment tokens in token's lowest denomination.\\n function _getAmountPaymentToken(\\n uint256 amountSyntheticToken,\\n uint256 syntheticTokenPriceInPaymentTokens\\n ) internal pure virtual returns (uint256 amountPaymentToken) {\\n return (amountSyntheticToken * syntheticTokenPriceInPaymentTokens) / 1e18;\\n }\\n\\n /// @notice Converts payment token amounts to synth token amounts at a synth token price.\\n /// @dev Price assumed base 1e18.\\n /// @param amountPaymentTokenBackingSynth Amount of payment tokens in that token's lowest denomination.\\n /// @param syntheticTokenPriceInPaymentTokens The conversion rate from synth to payment tokens in base 1e18.\\n /// @return amountSyntheticToken The calculated amount of synthetic token in wei.\\n function _getAmountSyntheticToken(\\n uint256 amountPaymentTokenBackingSynth,\\n uint256 syntheticTokenPriceInPaymentTokens\\n ) internal pure virtual returns (uint256 amountSyntheticToken) {\\n return (amountPaymentTokenBackingSynth * 1e18) / syntheticTokenPriceInPaymentTokens;\\n }\\n\\n /**\\n @notice Calculate the amount of target side synthetic tokens that are worth the same\\n amount of payment tokens as X many synthetic tokens on origin side.\\n The resulting equation comes from simplifying this function\\n\\n _getAmountSyntheticToken(\\n _getAmountPaymentToken(\\n amountOriginSynth,\\n priceOriginSynth\\n ),\\n priceTargetSynth)\\n\\n Unpacking the function we get:\\n ((amountOriginSynth * priceOriginSynth) / 1e18) * 1e18 / priceTargetSynth\\n And simplifying this we get:\\n (amountOriginSynth * priceOriginSynth) / priceTargetSynth\\n @param amountSyntheticTokens_originSide Amount of synthetic tokens on origin side\\n @param syntheticTokenPrice_originSide Price of origin side's synthetic token\\n @param syntheticTokenPrice_targetSide Price of target side's synthetic token\\n @return equivalentAmountSyntheticTokensOnTargetSide Amount of synthetic token on target side\\n */\\n function _getEquivalentAmountSyntheticTokensOnTargetSide(\\n uint256 amountSyntheticTokens_originSide,\\n uint256 syntheticTokenPrice_originSide,\\n uint256 syntheticTokenPrice_targetSide\\n ) internal pure virtual returns (uint256 equivalentAmountSyntheticTokensOnTargetSide) {\\n equivalentAmountSyntheticTokensOnTargetSide =\\n (amountSyntheticTokens_originSide * syntheticTokenPrice_originSide) /\\n syntheticTokenPrice_targetSide;\\n }\\n\\n /// @notice Given an executed next price shift from tokens on one market side to the other,\\n /// determines how many other side tokens the shift was worth.\\n /// @dev Intended for use primarily by Staker.sol\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amountSyntheticToken_redeemOnOriginSide Amount of synth token in wei.\\n /// @param isShiftFromLong Whether the token shift is from long to short (true), or short to long (false).\\n /// @param priceSnapshotIndex Index which identifies which synth prices to use.\\n /// @return amountSyntheticTokensToMintOnTargetSide The amount in wei of tokens for the other side that the shift was worth.\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticToken_redeemOnOriginSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) public view virtual override returns (uint256 amountSyntheticTokensToMintOnTargetSide) {\\n uint256 syntheticTokenPriceOnOriginSide = syntheticToken_priceSnapshot[marketIndex][\\n isShiftFromLong\\n ][priceSnapshotIndex];\\n uint256 syntheticTokenPriceOnTargetSide = syntheticToken_priceSnapshot[marketIndex][\\n !isShiftFromLong\\n ][priceSnapshotIndex];\\n\\n amountSyntheticTokensToMintOnTargetSide = _getEquivalentAmountSyntheticTokensOnTargetSide(\\n amountSyntheticToken_redeemOnOriginSide,\\n syntheticTokenPriceOnOriginSide,\\n syntheticTokenPriceOnTargetSide\\n );\\n }\\n\\n /**\\n @notice The amount of a synth token a user is owed following a batch execution.\\n 4 possible states for next price actions:\\n - \\\"Pending\\\" - means the next price update hasn't happened or been enacted on by the updateSystemState function.\\n - \\\"Confirmed\\\" - means the next price has been updated by the updateSystemState function. There is still\\n - outstanding (lazy) computation that needs to be executed per user in the batch.\\n - \\\"Settled\\\" - there is no more computation left for the user.\\n - \\\"Non-existent\\\" - user has no next price actions.\\n This function returns a calculated value only in the case of 'confirmed' next price actions.\\n It should return zero for all other types of next price actions.\\n @dev Used in SyntheticToken.sol balanceOf to allow for automatic reflection of next price actions.\\n @param user The address of the user for whom to execute the function for.\\n @param marketIndex An uint32 which uniquely identifies a market.\\n @param isLong Whether it is for the long synthetic asset or the short synthetic asset.\\n @return confirmedButNotSettledBalance The amount in wei of tokens that the user is owed.\\n */\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n )\\n external\\n view\\n virtual\\n override\\n requireMarketExists(marketIndex)\\n returns (uint256 confirmedButNotSettledBalance)\\n {\\n uint256 currentMarketUpdateIndex = marketUpdateIndex[marketIndex];\\n uint256 userNextPrice_currentUpdateIndex_forMarket = userNextPrice_currentUpdateIndex[\\n marketIndex\\n ][user];\\n if (\\n userNextPrice_currentUpdateIndex_forMarket != 0 &&\\n userNextPrice_currentUpdateIndex_forMarket <= currentMarketUpdateIndex\\n ) {\\n uint256 amountPaymentTokenDeposited = userNextPrice_paymentToken_depositAmount[marketIndex][\\n isLong\\n ][user];\\n\\n if (amountPaymentTokenDeposited > 0) {\\n uint256 syntheticTokenPrice = syntheticToken_priceSnapshot[marketIndex][isLong][\\n userNextPrice_currentUpdateIndex_forMarket\\n ];\\n\\n confirmedButNotSettledBalance = _getAmountSyntheticToken(\\n amountPaymentTokenDeposited,\\n syntheticTokenPrice\\n );\\n }\\n\\n uint256 amountSyntheticTokensToBeShiftedAwayFromOriginSide = userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[\\n marketIndex\\n ][!isLong][user];\\n\\n if (amountSyntheticTokensToBeShiftedAwayFromOriginSide > 0) {\\n uint256 syntheticTokenPriceOnOriginSide = syntheticToken_priceSnapshot[marketIndex][\\n !isLong\\n ][userNextPrice_currentUpdateIndex_forMarket];\\n uint256 syntheticTokenPriceOnTargetSide = syntheticToken_priceSnapshot[marketIndex][isLong][\\n userNextPrice_currentUpdateIndex_forMarket\\n ];\\n\\n confirmedButNotSettledBalance += _getEquivalentAmountSyntheticTokensOnTargetSide(\\n amountSyntheticTokensToBeShiftedAwayFromOriginSide,\\n syntheticTokenPriceOnOriginSide,\\n syntheticTokenPriceOnTargetSide\\n );\\n }\\n }\\n }\\n\\n /**\\n @notice Calculates the percentage in base 1e18 of how much of the accrued yield\\n for a market should be allocated to treasury.\\n @dev For gas considerations also returns whether the long side is imbalanced.\\n @dev For gas considerations totalValueLockedInMarket is passed as a parameter as the function\\n calling this function has pre calculated the value\\n @param longValue The current total payment token value of the long side of the market.\\n @param shortValue The current total payment token value of the short side of the market.\\n @param totalValueLockedInMarket Total payment token value of both sides of the market.\\n @return isLongSideUnderbalanced Whether the long side initially had less value than the short side.\\n @return treasuryYieldPercent_e18 The percentage in base 1e18 of how much of the accrued yield\\n for a market should be allocated to treasury.\\n */\\n function _getYieldSplit(\\n uint32 marketIndex,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 totalValueLockedInMarket\\n ) internal view virtual returns (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) {\\n isLongSideUnderbalanced = longValue < shortValue;\\n uint256 imbalance;\\n\\n unchecked {\\n if (isLongSideUnderbalanced) {\\n imbalance = shortValue - longValue;\\n } else {\\n imbalance = longValue - shortValue;\\n }\\n }\\n\\n // marketTreasurySplitGradient_e18 may be adjusted to ensure yield is given\\n // to the market at a desired rate e.g. if a market tends to become imbalanced\\n // frequently then the gradient can be increased to funnel yield to the market\\n // quicker.\\n // See this equation in latex: https://ipfs.io/ipfs/QmXsW4cHtxpJ5BFwRcMSUw7s5G11Qkte13NTEfPLTKEx4x\\n // Interact with this equation: https://www.desmos.com/calculator/pnl43tfv5b\\n uint256 marketPercentCalculated_e18 = (imbalance *\\n marketTreasurySplitGradient_e18[marketIndex]) / totalValueLockedInMarket;\\n\\n uint256 marketPercent_e18 = Math.min(marketPercentCalculated_e18, 1e18);\\n\\n unchecked {\\n treasuryYieldPercent_e18 = 1e18 - marketPercent_e18;\\n }\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 HELPER FUNCTIONS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice First gets yield from the yield manager and allocates it to market and treasury.\\n /// It then allocates the full market yield portion to the underbalanced side of the market.\\n /// NB this function also adjusts the value of the long and short side based on the latest\\n /// price of the underlying asset received from the oracle. This function should ideally be\\n /// called everytime there is an price update from the oracle. We have built a bot that does this.\\n /// The system is still perectly safe if not called every price update, the synthetic will just\\n /// less closely track the underlying asset.\\n /// @dev In one function as yield should be allocated before rebalancing.\\n /// This prevents an attack whereby the user imbalances a side to capture all accrued yield.\\n /// @param marketIndex The market for which to execute the function for.\\n /// @param newAssetPrice The new asset price.\\n /// @return longValue The value of the long side after rebalancing.\\n /// @return shortValue The value of the short side after rebalancing.\\n function _claimAndDistributeYieldThenRebalanceMarket(uint32 marketIndex, int256 newAssetPrice)\\n internal\\n virtual\\n returns (uint256 longValue, uint256 shortValue)\\n {\\n int256 oldAssetPrice = assetPrice[marketIndex];\\n // Claiming and distributing the yield\\n longValue = marketSideValueInPaymentToken[marketIndex][true];\\n shortValue = marketSideValueInPaymentToken[marketIndex][false];\\n uint256 totalValueLockedInMarket = longValue + shortValue;\\n\\n (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) = _getYieldSplit(\\n marketIndex,\\n longValue,\\n shortValue,\\n totalValueLockedInMarket\\n );\\n\\n uint256 marketAmount = IYieldManager(yieldManagers[marketIndex])\\n .distributeYieldForTreasuryAndReturnMarketAllocation(\\n totalValueLockedInMarket,\\n treasuryYieldPercent_e18\\n );\\n\\n if (marketAmount > 0) {\\n if (isLongSideUnderbalanced) {\\n longValue += marketAmount;\\n } else {\\n shortValue += marketAmount;\\n }\\n }\\n\\n // Adjusting value of long and short pool based on price movement\\n // The side/position with less liquidity has 100% percent exposure to the price movement.\\n // The side/position with more liquidity will have exposure < 100% to the price movement.\\n // I.e. Imagine $100 in longValue and $50 shortValue\\n // long side would have $50/$100 = 50% exposure to price movements based on the liquidity imbalance.\\n // min(longValue, shortValue) = $50 , therefore if the price change was -10% then\\n // $50 * 10% = $5 gained for short side and conversely $5 lost for long side.\\n int256 underbalancedSideValue = int256(Math.min(longValue, shortValue));\\n\\n // See this equation in latex: https://ipfs.io/ipfs/QmPeJ3SZdn1GfxqCD4GDYyWTJGPMSHkjPJaxrzk2qTTPSE\\n // Interact with this equation: https://www.desmos.com/calculator/t8gr6j5vsq\\n int256 valueChange = ((newAssetPrice - oldAssetPrice) *\\n underbalancedSideValue *\\n int256(marketLeverage_e18[marketIndex])) / (oldAssetPrice * 1e18);\\n\\n if (valueChange < 0) {\\n valueChange = -valueChange; // make value change positive\\n\\n // handle 'impossible' edge case where underlying price feed changes more than 100% downwards gracefully.\\n if (uint256(valueChange) > longValue) {\\n valueChange = (int256(longValue) * 99999) / 100000;\\n }\\n longValue -= uint256(valueChange);\\n shortValue += uint256(valueChange);\\n } else {\\n // handle 'impossible' edge case where underlying price feed changes more than 100% upwards gracefully.\\n if (uint256(valueChange) > shortValue) {\\n valueChange = (int256(shortValue) * 99999) / 100000;\\n }\\n longValue += uint256(valueChange);\\n shortValue -= uint256(valueChange);\\n }\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 UPDATING SYSTEM STATE \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Updates the value of the long and short sides to account for latest oracle price updates\\n /// and batches all next price actions.\\n /// @dev To prevent front-running only executes on price change from an oracle.\\n /// We assume the function will be called for each market at least once per price update.\\n /// Note Even if not called on every price update, this won't affect security, it will only affect how closely\\n /// the synthetic asset actually tracks the underlying asset.\\n /// @param marketIndex The market index for which to update.\\n function _updateSystemStateInternal(uint32 marketIndex)\\n internal\\n virtual\\n requireMarketExists(marketIndex)\\n {\\n // If a negative int is return this should fail.\\n int256 newAssetPrice = IOracleManager(oracleManagers[marketIndex]).updatePrice();\\n\\n uint256 currentMarketIndex = marketUpdateIndex[marketIndex];\\n\\n bool assetPriceHasChanged = assetPrice[marketIndex] != newAssetPrice;\\n\\n if (assetPriceHasChanged) {\\n uint256 syntheticTokenPrice_inPaymentTokens_long = syntheticToken_priceSnapshot[marketIndex][\\n true\\n ][currentMarketIndex];\\n uint256 syntheticTokenPrice_inPaymentTokens_short = syntheticToken_priceSnapshot[marketIndex][\\n false\\n ][currentMarketIndex];\\n // if there is a price change and the 'staker' contract has pending updates, push the stakers price snapshot index to the staker\\n // (so the staker can handle its internal accounting)\\n\\n (\\n uint256 newLongPoolValue,\\n uint256 newShortPoolValue\\n ) = _claimAndDistributeYieldThenRebalanceMarket(marketIndex, newAssetPrice);\\n\\n syntheticTokenPrice_inPaymentTokens_long = _getSyntheticTokenPrice(\\n newLongPoolValue,\\n ISyntheticToken(syntheticTokens[marketIndex][true]).totalSupply()\\n );\\n syntheticTokenPrice_inPaymentTokens_short = _getSyntheticTokenPrice(\\n newShortPoolValue,\\n ISyntheticToken(syntheticTokens[marketIndex][false]).totalSupply()\\n );\\n\\n assetPrice[marketIndex] = newAssetPrice;\\n\\n currentMarketIndex++;\\n marketUpdateIndex[marketIndex] = currentMarketIndex;\\n\\n syntheticToken_priceSnapshot[marketIndex][true][\\n currentMarketIndex\\n ] = syntheticTokenPrice_inPaymentTokens_long;\\n\\n syntheticToken_priceSnapshot[marketIndex][false][\\n currentMarketIndex\\n ] = syntheticTokenPrice_inPaymentTokens_short;\\n\\n (\\n int256 long_changeInMarketValue_inPaymentToken,\\n int256 short_changeInMarketValue_inPaymentToken\\n ) = _batchConfirmOutstandingPendingActions(\\n marketIndex,\\n syntheticTokenPrice_inPaymentTokens_long,\\n syntheticTokenPrice_inPaymentTokens_short\\n );\\n\\n newLongPoolValue = uint256(\\n int256(newLongPoolValue) + long_changeInMarketValue_inPaymentToken\\n );\\n newShortPoolValue = uint256(\\n int256(newShortPoolValue) + short_changeInMarketValue_inPaymentToken\\n );\\n marketSideValueInPaymentToken[marketIndex][true] = newLongPoolValue;\\n marketSideValueInPaymentToken[marketIndex][false] = newShortPoolValue;\\n\\n IStaker(staker).pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n marketIndex,\\n currentMarketIndex,\\n syntheticTokenPrice_inPaymentTokens_long,\\n syntheticTokenPrice_inPaymentTokens_short,\\n newLongPoolValue,\\n newShortPoolValue\\n );\\n\\n emit SystemStateUpdated(\\n marketIndex,\\n currentMarketIndex,\\n newAssetPrice,\\n newLongPoolValue,\\n newShortPoolValue,\\n syntheticTokenPrice_inPaymentTokens_long,\\n syntheticTokenPrice_inPaymentTokens_short\\n );\\n }\\n }\\n\\n /// @notice Updates the state of a market to account for the latest oracle price update.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n function updateSystemState(uint32 marketIndex) external override {\\n _updateSystemStateInternal(marketIndex);\\n }\\n\\n /// @notice Updates the state of multiples markets to account for their latest oracle price updates.\\n /// @param marketIndexes An array of int32s which uniquely identify markets.\\n function updateSystemStateMulti(uint32[] calldata marketIndexes) external override {\\n uint256 length = marketIndexes.length;\\n for (uint256 i = 0; i < length; i++) {\\n _updateSystemStateInternal(marketIndexes[i]);\\n }\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 DEPOSIT \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Transfers payment tokens for a market from msg.sender to this contract.\\n /// @dev Tokens are transferred directly to this contract to be deposited by the yield manager in the batch to earn yield.\\n /// Since we check the return value of the transferFrom method, all payment tokens we use must conform to the ERC20 standard.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amount Amount of payment tokens in that token's lowest denominationto deposit.\\n function _transferPaymentTokensFromUserToYieldManager(uint32 marketIndex, uint256 amount)\\n internal\\n virtual\\n {\\n IERC20(paymentTokens[marketIndex]).safeTransferFrom(\\n msg.sender,\\n yieldManagers[marketIndex],\\n amount\\n );\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MINT POSITION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Allows users to mint synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\\n /// @dev Called by external functions to mint either long or short. If a user mints multiple times before a price update, these are treated as a single mint.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\\n /// @param isLong Whether the mint is for a long or short synth.\\n function _mintNextPrice(\\n uint32 marketIndex,\\n uint256 amount,\\n bool isLong\\n )\\n internal\\n virtual\\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\\n gemCollecting\\n {\\n _transferPaymentTokensFromUserToYieldManager(marketIndex, amount);\\n\\n batched_amountPaymentToken_deposit[marketIndex][isLong] += amount;\\n userNextPrice_paymentToken_depositAmount[marketIndex][isLong][msg.sender] += amount;\\n uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1;\\n userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex;\\n\\n emit NextPriceDeposit(marketIndex, isLong, amount, msg.sender, nextUpdateIndex);\\n }\\n\\n /// @notice Allows users to mint long synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external override {\\n _mintNextPrice(marketIndex, amount, true);\\n }\\n\\n /// @notice Allows users to mint short synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external override {\\n _mintNextPrice(marketIndex, amount, false);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 REDEEM POSITION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Allows users to redeem their synthetic tokens for payment tokens. To prevent front-running these redeems are executed on the next price update from the oracle.\\n /// @dev Called by external functions to redeem either long or short. Payment tokens are actually transferred to the user when executeOutstandingNextPriceSettlements is called from a function call by the user.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param tokens_redeem Amount in wei of synth tokens to redeem.\\n /// @param isLong Whether this redeem is for a long or short synth.\\n function _redeemNextPrice(\\n uint32 marketIndex,\\n uint256 tokens_redeem,\\n bool isLong\\n )\\n internal\\n virtual\\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\\n gemCollecting\\n {\\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).transferFrom(\\n msg.sender,\\n address(this),\\n tokens_redeem\\n );\\n\\n userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][msg.sender] += tokens_redeem;\\n uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1;\\n userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex;\\n\\n batched_amountSyntheticToken_redeem[marketIndex][isLong] += tokens_redeem;\\n\\n emit NextPriceRedeem(marketIndex, isLong, tokens_redeem, msg.sender, nextUpdateIndex);\\n }\\n\\n /// @notice Allows users to redeem long synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param tokens_redeem Amount in wei of synth tokens to redeem at the next oracle price.\\n function redeemLongNextPrice(uint32 marketIndex, uint256 tokens_redeem) external override {\\n _redeemNextPrice(marketIndex, tokens_redeem, true);\\n }\\n\\n /// @notice Allows users to redeem short synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param tokens_redeem Amount in wei of synth tokens to redeem at the next oracle price.\\n function redeemShortNextPrice(uint32 marketIndex, uint256 tokens_redeem) external override {\\n _redeemNextPrice(marketIndex, tokens_redeem, false);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 SHIFT POSITION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Allows users to shift their position from one side of the market to the other in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\\n /// @dev Called by external functions to shift either way. Intended for primary use by Staker.sol\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from the one side to the other at the next oracle price update.\\n /// @param isShiftFromLong Whether the token shift is from long to short (true), or short to long (false).\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n )\\n public\\n virtual\\n override\\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\\n gemCollecting\\n {\\n require(\\n ISyntheticToken(syntheticTokens[marketIndex][isShiftFromLong]).transferFrom(\\n msg.sender,\\n address(this),\\n amountSyntheticTokensToShift\\n )\\n );\\n\\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][\\n msg.sender\\n ] += amountSyntheticTokensToShift;\\n uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1;\\n userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex;\\n\\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][\\n isShiftFromLong\\n ] += amountSyntheticTokensToShift;\\n\\n emit NextPriceSyntheticPositionShift(\\n marketIndex,\\n isShiftFromLong,\\n amountSyntheticTokensToShift,\\n msg.sender,\\n nextUpdateIndex\\n );\\n }\\n\\n /// @notice Allows users to shift their position from long to short in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from long to short the next oracle price update.\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external\\n override\\n {\\n shiftPositionNextPrice(marketIndex, amountSyntheticTokensToShift, true);\\n }\\n\\n /// @notice Allows users to shift their position from short to long in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from the short to long at the next oracle price update.\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external\\n override\\n {\\n shiftPositionNextPrice(marketIndex, amountSyntheticTokensToShift, false);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 NEXT PRICE SETTLEMENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Transfers outstanding synth tokens from a next price mint to the user.\\n /// @dev The outstanding synths should already be reflected for the user due to balanceOf in SyntheticToken.sol, this just does the accounting.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param user The address of the user for whom to execute the function for.\\n /// @param isLong Whether this is for the long or short synth for the market.\\n function _executeOutstandingNextPriceMints(\\n uint32 marketIndex,\\n address user,\\n bool isLong\\n ) internal virtual {\\n uint256 currentPaymentTokenDepositAmount = userNextPrice_paymentToken_depositAmount[\\n marketIndex\\n ][isLong][user];\\n if (currentPaymentTokenDepositAmount > 0) {\\n userNextPrice_paymentToken_depositAmount[marketIndex][isLong][user] = 0;\\n uint256 amountSyntheticTokensToTransferToUser = _getAmountSyntheticToken(\\n currentPaymentTokenDepositAmount,\\n syntheticToken_priceSnapshot[marketIndex][isLong][\\n userNextPrice_currentUpdateIndex[marketIndex][user]\\n ]\\n );\\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).transfer(\\n user,\\n amountSyntheticTokensToTransferToUser\\n );\\n }\\n }\\n\\n /// @notice Transfers outstanding payment tokens from a next price redemption to the user.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param user The address of the user for whom to execute the function for.\\n /// @param isLong Whether this is for the long or short synth for the market.\\n function _executeOutstandingNextPriceRedeems(\\n uint32 marketIndex,\\n address user,\\n bool isLong\\n ) internal virtual {\\n uint256 currentSyntheticTokenRedemptions = userNextPrice_syntheticToken_redeemAmount[\\n marketIndex\\n ][isLong][user];\\n if (currentSyntheticTokenRedemptions > 0) {\\n userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][user] = 0;\\n uint256 amountPaymentToken_toRedeem = _getAmountPaymentToken(\\n currentSyntheticTokenRedemptions,\\n syntheticToken_priceSnapshot[marketIndex][isLong][\\n userNextPrice_currentUpdateIndex[marketIndex][user]\\n ]\\n );\\n\\n IYieldManager(yieldManagers[marketIndex]).transferPaymentTokensToUser(\\n user,\\n amountPaymentToken_toRedeem\\n );\\n }\\n }\\n\\n /// @notice Transfers outstanding synth tokens from a next price position shift to the user.\\n /// @dev The outstanding synths should already be reflected for the user due to balanceOf in SyntheticToken.sol, this just does the accounting.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param user The address of the user for whom to execute the function for.\\n /// @param isShiftFromLong Whether the token shift was from long to short (true), or short to long (false).\\n function _executeOutstandingNextPriceTokenShifts(\\n uint32 marketIndex,\\n address user,\\n bool isShiftFromLong\\n ) internal virtual {\\n uint256 syntheticToken_toShiftAwayFrom_marketSide = userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[\\n marketIndex\\n ][isShiftFromLong][user];\\n if (syntheticToken_toShiftAwayFrom_marketSide > 0) {\\n uint256 syntheticToken_toShiftTowardsTargetSide = getAmountSyntheticTokenToMintOnTargetSide(\\n marketIndex,\\n syntheticToken_toShiftAwayFrom_marketSide,\\n isShiftFromLong,\\n userNextPrice_currentUpdateIndex[marketIndex][user]\\n );\\n\\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][\\n user\\n ] = 0;\\n\\n require(\\n ISyntheticToken(syntheticTokens[marketIndex][!isShiftFromLong]).transfer(\\n user,\\n syntheticToken_toShiftTowardsTargetSide\\n )\\n );\\n }\\n }\\n\\n /// @notice After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user.\\n /// @dev Once the market has updated for the next price, should be guaranteed (through modifiers) to execute for a user before user initiation of new next price actions.\\n /// @param user The address of the user for whom to execute the function.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n function _executeOutstandingNextPriceSettlements(address user, uint32 marketIndex)\\n internal\\n virtual\\n {\\n uint256 userCurrentUpdateIndex = userNextPrice_currentUpdateIndex[marketIndex][user];\\n if (userCurrentUpdateIndex != 0 && userCurrentUpdateIndex <= marketUpdateIndex[marketIndex]) {\\n _executeOutstandingNextPriceMints(marketIndex, user, true);\\n _executeOutstandingNextPriceMints(marketIndex, user, false);\\n _executeOutstandingNextPriceRedeems(marketIndex, user, true);\\n _executeOutstandingNextPriceRedeems(marketIndex, user, false);\\n _executeOutstandingNextPriceTokenShifts(marketIndex, user, true);\\n _executeOutstandingNextPriceTokenShifts(marketIndex, user, false);\\n\\n userNextPrice_currentUpdateIndex[marketIndex][user] = 0;\\n\\n emit ExecuteNextPriceSettlementsUser(user, marketIndex);\\n }\\n }\\n\\n /// @notice After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user.\\n /// @param user The address of the user for whom to execute the function.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex)\\n external\\n override\\n {\\n _executeOutstandingNextPriceSettlements(user, marketIndex);\\n }\\n\\n /// @notice Executes outstanding next price settlements for a user for multiple markets.\\n /// @param user The address of the user for whom to execute the function.\\n /// @param marketIndexes An array of int32s which each uniquely identify a market.\\n function executeOutstandingNextPriceSettlementsUserMulti(\\n address user,\\n uint32[] memory marketIndexes\\n ) external {\\n uint256 length = marketIndexes.length;\\n for (uint256 i = 0; i < length; i++) {\\n _executeOutstandingNextPriceSettlements(user, marketIndexes[i]);\\n }\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 BATCHED NEXT PRICE SETTLEMENT ACTIONS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice Either transfers funds from the yield manager to this contract if redeems > deposits,\\n /// and vice versa. The yield manager handles depositing and withdrawing the funds from a yield market.\\n /// @dev When all batched next price actions are handled the total value in the market can either increase or decrease based on the value of mints and redeems.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param totalPaymentTokenValueChangeForMarket An int256 which indicates the magnitude and direction of the change in market value.\\n function _handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\\n uint32 marketIndex,\\n int256 totalPaymentTokenValueChangeForMarket\\n ) internal virtual {\\n if (totalPaymentTokenValueChangeForMarket > 0) {\\n IYieldManager(yieldManagers[marketIndex]).depositPaymentToken(\\n uint256(totalPaymentTokenValueChangeForMarket)\\n );\\n } else if (totalPaymentTokenValueChangeForMarket < 0) {\\n // NB there will be issues here if not enough liquidity exists to withdraw\\n // Boolean should be returned from yield manager and think how to appropriately handle this\\n IYieldManager(yieldManagers[marketIndex]).removePaymentTokenFromMarket(\\n uint256(-totalPaymentTokenValueChangeForMarket)\\n );\\n }\\n }\\n\\n /// @notice Given a desired change in synth token supply, either mints or burns tokens to achieve that desired change.\\n /// @dev When all batched next price actions are executed total supply for a synth can either increase or decrease.\\n /// @param marketIndex An uint32 which uniquely identifies a market.\\n /// @param isLong Whether this function should execute for the long or short synth for the market.\\n /// @param changeInSyntheticTokensTotalSupply The amount in wei by which synth token supply should change.\\n function _handleChangeInSyntheticTokensTotalSupply(\\n uint32 marketIndex,\\n bool isLong,\\n int256 changeInSyntheticTokensTotalSupply\\n ) internal virtual {\\n if (changeInSyntheticTokensTotalSupply > 0) {\\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).mint(\\n address(this),\\n uint256(changeInSyntheticTokensTotalSupply)\\n );\\n } else if (changeInSyntheticTokensTotalSupply < 0) {\\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).burn(\\n uint256(-changeInSyntheticTokensTotalSupply)\\n );\\n }\\n }\\n\\n /**\\n @notice Performs all batched next price actions on an oracle price update.\\n @dev Mints or burns all synthetic tokens for this contract.\\n\\n After this function is executed all user actions in that batch are confirmed and can be settled individually by\\n calling _executeOutstandingNexPriceSettlements for a given user.\\n\\n The maths here is safe from rounding errors since it always over estimates on the batch with division.\\n (as an example (5/3) + (5/3) = 2 but (5+5)/3 = 10/3 = 3, so the batched action would mint one more)\\n @param marketIndex An uint32 which uniquely identifies a market.\\n @param syntheticTokenPrice_inPaymentTokens_long The long synthetic token price for this oracle price update.\\n @param syntheticTokenPrice_inPaymentTokens_short The short synthetic token price for this oracle price update.\\n @return long_changeInMarketValue_inPaymentToken The total value change for the long side after all batched actions are executed.\\n @return short_changeInMarketValue_inPaymentToken The total value change for the short side after all batched actions are executed.\\n */\\n function _batchConfirmOutstandingPendingActions(\\n uint32 marketIndex,\\n uint256 syntheticTokenPrice_inPaymentTokens_long,\\n uint256 syntheticTokenPrice_inPaymentTokens_short\\n )\\n internal\\n virtual\\n returns (\\n int256 long_changeInMarketValue_inPaymentToken,\\n int256 short_changeInMarketValue_inPaymentToken\\n )\\n {\\n int256 changeInSupply_syntheticToken_long;\\n int256 changeInSupply_syntheticToken_short;\\n\\n // NOTE: the only reason we are reusing amountForCurrentAction_workingVariable for all actions (redeemLong, redeemShort, mintLong, mintShort, shiftFromLong, shiftFromShort) is to reduce stack usage\\n uint256 amountForCurrentAction_workingVariable = batched_amountPaymentToken_deposit[\\n marketIndex\\n ][true];\\n\\n // Handle batched deposits LONG\\n if (amountForCurrentAction_workingVariable > 0) {\\n long_changeInMarketValue_inPaymentToken = int256(amountForCurrentAction_workingVariable);\\n\\n batched_amountPaymentToken_deposit[marketIndex][true] = 0;\\n\\n changeInSupply_syntheticToken_long = int256(\\n _getAmountSyntheticToken(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_long\\n )\\n );\\n }\\n\\n // Handle batched deposits SHORT\\n amountForCurrentAction_workingVariable = batched_amountPaymentToken_deposit[marketIndex][false];\\n if (amountForCurrentAction_workingVariable > 0) {\\n short_changeInMarketValue_inPaymentToken = int256(amountForCurrentAction_workingVariable);\\n\\n batched_amountPaymentToken_deposit[marketIndex][false] = 0;\\n\\n changeInSupply_syntheticToken_short = int256(\\n _getAmountSyntheticToken(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_short\\n )\\n );\\n }\\n\\n // Handle shift tokens from LONG to SHORT\\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_toShiftAwayFrom_marketSide[\\n marketIndex\\n ][true];\\n\\n if (amountForCurrentAction_workingVariable > 0) {\\n int256 paymentTokenValueChangeForShiftToShort = int256(\\n _getAmountPaymentToken(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_long\\n )\\n );\\n\\n long_changeInMarketValue_inPaymentToken -= paymentTokenValueChangeForShiftToShort;\\n short_changeInMarketValue_inPaymentToken += paymentTokenValueChangeForShiftToShort;\\n\\n changeInSupply_syntheticToken_long -= int256(amountForCurrentAction_workingVariable);\\n changeInSupply_syntheticToken_short += int256(\\n _getEquivalentAmountSyntheticTokensOnTargetSide(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_long,\\n syntheticTokenPrice_inPaymentTokens_short\\n )\\n );\\n\\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][true] = 0;\\n }\\n\\n // Handle shift tokens from SHORT to LONG\\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_toShiftAwayFrom_marketSide[\\n marketIndex\\n ][false];\\n if (amountForCurrentAction_workingVariable > 0) {\\n int256 paymentTokenValueChangeForShiftToLong = int256(\\n _getAmountPaymentToken(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_short\\n )\\n );\\n\\n short_changeInMarketValue_inPaymentToken -= paymentTokenValueChangeForShiftToLong;\\n long_changeInMarketValue_inPaymentToken += paymentTokenValueChangeForShiftToLong;\\n\\n changeInSupply_syntheticToken_short -= int256(amountForCurrentAction_workingVariable);\\n changeInSupply_syntheticToken_long += int256(\\n _getEquivalentAmountSyntheticTokensOnTargetSide(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_short,\\n syntheticTokenPrice_inPaymentTokens_long\\n )\\n );\\n\\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][false] = 0;\\n }\\n\\n // Handle batched redeems LONG\\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_redeem[marketIndex][true];\\n if (amountForCurrentAction_workingVariable > 0) {\\n long_changeInMarketValue_inPaymentToken -= int256(\\n _getAmountPaymentToken(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_long\\n )\\n );\\n changeInSupply_syntheticToken_long -= int256(amountForCurrentAction_workingVariable);\\n\\n batched_amountSyntheticToken_redeem[marketIndex][true] = 0;\\n }\\n\\n // Handle batched redeems SHORT\\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_redeem[marketIndex][\\n false\\n ];\\n if (amountForCurrentAction_workingVariable > 0) {\\n short_changeInMarketValue_inPaymentToken -= int256(\\n _getAmountPaymentToken(\\n amountForCurrentAction_workingVariable,\\n syntheticTokenPrice_inPaymentTokens_short\\n )\\n );\\n changeInSupply_syntheticToken_short -= int256(amountForCurrentAction_workingVariable);\\n\\n batched_amountSyntheticToken_redeem[marketIndex][false] = 0;\\n }\\n\\n // Batch settle payment tokens\\n _handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\\n marketIndex,\\n long_changeInMarketValue_inPaymentToken + short_changeInMarketValue_inPaymentToken\\n );\\n // Batch settle synthetic tokens\\n _handleChangeInSyntheticTokensTotalSupply(\\n marketIndex,\\n true,\\n changeInSupply_syntheticToken_long\\n );\\n _handleChangeInSyntheticTokensTotalSupply(\\n marketIndex,\\n false,\\n changeInSupply_syntheticToken_short\\n );\\n }\\n}\\n\",\"keccak256\":\"0x042be3eac27b431ca3981fbcd58ee99e1c899d0d0bb05fef6b1d44331c59dd2b\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IOracleManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/*\\n * Manages price feeds from different oracle implementations.\\n */\\ninterface IOracleManager {\\n function updatePrice() external returns (int256);\\n\\n /*\\n *Returns the latest price from the oracle feed.\\n */\\n function getLatestPrice() external view returns (int256);\\n}\\n\",\"keccak256\":\"0x257b71cc5a9394ba0ea022556bf1f38012046c5ca568ff0d73ce6cf95c278376\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ITokenFactory.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ITokenFactory {\\n function createSyntheticToken(\\n string calldata syntheticName,\\n string calldata syntheticSymbol,\\n address staker,\\n uint32 marketIndex,\\n bool isLong\\n ) external returns (address);\\n}\\n\",\"keccak256\":\"0x90e4adf1a78ded36d804731a69137b3a4b6c4a6e9c9af46c7ccfa8d91b976e2e\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IYieldManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/// @notice Manages yield accumulation for the LongShort contract. Each market is deployed with its own yield manager to simplify the bookkeeping, as different markets may share a payment token and yield pool.\\nabstract contract IYieldManager {\\n event ClaimAaveRewardTokenToTreasury(uint256 amount);\\n\\n event YieldDistributed(uint256 unrealizedYield, uint256 treasuryYieldPercent_e18);\\n\\n /// @dev This is purely saving some gas, but the subgraph will know how much is due for the treasury at all times - no need to include in event.\\n event WithdrawTreasuryFunds();\\n\\n /// @notice distributed yield not yet transferred to the treasury\\n function totalReservedForTreasury() external virtual returns (uint256);\\n\\n /// @notice Deposits the given amount of payment tokens into this yield manager.\\n /// @param amount Amount of payment token to deposit\\n function depositPaymentToken(uint256 amount) external virtual;\\n\\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\\n /// @param user User to recieve the payout\\n /// @param amount Amount of payment token to pay to user\\n function transferPaymentTokensToUser(address user, uint256 amount) external virtual;\\n\\n /// @notice Withdraws the given amount of tokens from this yield manager.\\n /// @param amount Amount of payment token to withdraw\\n function removePaymentTokenFromMarket(uint256 amount) external virtual;\\n\\n /** \\n @notice Calculates and updates the yield allocation to the treasury and the market\\n @dev treasuryPercent = 1 - marketPercent\\n @param totalValueRealizedForMarket total value of long and short side of the market\\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\\n @return amountForMarketIncentives The market allocation of the yield\\n */\\n function distributeYieldForTreasuryAndReturnMarketAllocation(\\n uint256 totalValueRealizedForMarket,\\n uint256 treasuryYieldPercent_e18\\n ) external virtual returns (uint256 amountForMarketIncentives);\\n\\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\\n function withdrawTreasuryFunds() external virtual;\\n\\n /// @notice Initializes a specific yield manager to a given market\\n function initializeForMarket() external virtual;\\n}\\n\",\"keccak256\":\"0x20116e375d536c6ee7bec74d1ee5c1a552465a79fc8f1f2a9e2428078d3648f6\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50614e0f806100206000396000f3fe60806040526004361061031a5760003560e01c8063867dfc6d116101ab578063c2b80072116100f7578063eeb0235211610095578063f72c0d8b1161006f578063f72c0d8b14610b3e578063f7cbb68714610b72578063f80c9b9214610b92578063f8c8765e14610bcb5761031a565b8063eeb0235214610ac7578063f41cb19514610ae7578063f68a327f14610b1e5761031a565b8063d88905c9116100d1578063d88905c914610a46578063da04ce1414610a66578063e6b604e014610a86578063e77772fe14610aa65761031a565b8063c2b80072146109c7578063c2e1247114610a06578063d547741f14610a265761031a565b80639c5b0ee311610164578063b054c4a11161013e578063b054c4a1146108f3578063b36f537414610935578063b3c7e21814610966578063bb0a45291461099f5761031a565b80639c5b0ee31461086e5780639dc39e0f146108a5578063a217fddf146108de5761031a565b8063867dfc6d146107a05780638900bdfa146107c0578063897a0786146107ee57806391a9fa611461080e57806391d148541461082e57806392f6fe801461084e5761031a565b80634f1ef2861161026a578063682ad286116102235780636f486c5b116101fd5780636f486c5b146106ed57806371fd96231461072c57806375b238fc1461074c5780637a0e94f0146107805761031a565b8063682ad2861461068c5780636c305055146106ac5780636c8d2b97146106cd5761031a565b80634f1ef286146105965780635ebaf1db146105a9578063602aabab146105d2578063636190c81461060057806364d16f531461063357806364e4a81d146106535761031a565b8063248a9ca3116102d757806334daaa25116102b157806334daaa25146104fd57806336568abe146105365780633659cfe6146105565780633d6a2b3f146105765761031a565b8063248a9ca31461046e5780632f2ff15d1461049e57806334898684146104be5761031a565b806301ffc9a71461031f57806305c8146f146103545780630e5140dc1461037657806314c88ffa146103c35780631badf5c0146103f157806321658e4814610440575b600080fd5b34801561032b57600080fd5b5061033f61033a36600461446c565b610beb565b60405190151581526020015b60405180910390f35b34801561036057600080fd5b5061037461036f36600461461c565b610c24565b005b34801561038257600080fd5b506103b561039136600461468c565b6101c360209081526000938452604080852082529284528284209052825290205481565b60405190815260200161034b565b3480156103cf57600080fd5b506103b56103de36600461461c565b61015a6020526000908152604090205481565b3480156103fd57600080fd5b5061042861040c36600461461c565b61015f602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161034b565b34801561044c57600080fd5b506103b561045b36600461461c565b61015b6020526000908152604090205481565b34801561047a57600080fd5b506103b5610489366004614425565b60009081526065602052604090206001015490565b3480156104aa57600080fd5b506103746104b936600461443d565b610c30565b3480156104ca57600080fd5b506103b56104d936600461468c565b6101c260209081526000938452604080852082529284528284209052825290205481565b34801561050957600080fd5b506103b5610518366004614661565b61019160209081526000928352604080842090915290825290205481565b34801561054257600080fd5b5061037461055136600461443d565b610c5c565b34801561056257600080fd5b50610374610571366004614124565b610cdf565b34801561058257600080fd5b50610374610591366004614552565b610d03565b6103746105a436600461427b565b610f2a565b3480156105b557600080fd5b50610128546104289064010000000090046001600160a01b031681565b3480156105de57600080fd5b506103b56105ed36600461461c565b61015c6020526000908152604090205481565b34801561060c57600080fd5b506101285461061e9063ffffffff1681565b60405163ffffffff909116815260200161034b565b34801561063f57600080fd5b5061037461064e366004614636565b610f3f565b34801561065f57600080fd5b506103b561066e366004614661565b61019060209081526000928352604080842090915290825290205481565b34801561069857600080fd5b506103746106a7366004614707565b610fc5565b3480156106b857600080fd5b5061012a54610428906001600160a01b031681565b3480156106d957600080fd5b506103746106e8366004614399565b610fd1565b3480156106f957600080fd5b506103b56107083660046146c9565b61018f60209081526000938452604080852082529284528284209052825290205481565b34801561073857600080fd5b50610374610747366004614730565b611032565b34801561075857600080fd5b506103b57fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561078c57600080fd5b5061037461079b3660046141b7565b611201565b3480156107ac57600080fd5b506103746107bb366004614707565b611251565b3480156107cc57600080fd5b506103b56107db36600461461c565b6101596020526000908152604090205481565b3480156107fa57600080fd5b5061037461080936600461431d565b61125d565b34801561081a57600080fd5b50610374610829366004614707565b611267565b34801561083a57600080fd5b5061033f61084936600461443d565b611273565b34801561085a57600080fd5b506103b5610869366004614764565b61129e565b34801561087a57600080fd5b5061042861088936600461461c565b61015e602052600090815260409020546001600160a01b031681565b3480156108b157600080fd5b506103b56108c0366004614636565b6101c060209081526000928352604080842090915290825290205481565b3480156108ea57600080fd5b506103b5600081565b3480156108ff57600080fd5b5061042861090e366004614661565b61018d6020908152600092835260408084209091529082529020546001600160a01b031681565b34801561094157600080fd5b5061033f61095036600461461c565b6101586020526000908152604090205460ff1681565b34801561097257600080fd5b506103b5610981366004614661565b61018e60209081526000928352604080842090915290825290205481565b3480156109ab57600080fd5b5061042873f10a7f10a7f10a7f10a7f10a7f10a7f10a7f10a781565b3480156109d357600080fd5b506103b56109e236600461468c565b6101c160209081526000938452604080852082529284528284209052825290205481565b348015610a1257600080fd5b50610374610a21366004614707565b6112f4565b348015610a3257600080fd5b50610374610a4136600461443d565b611300565b348015610a5257600080fd5b50610374610a613660046144ac565b611326565b348015610a7257600080fd5b50610374610a81366004614707565b6117f4565b348015610a9257600080fd5b50610374610aa1366004614707565b611816565b348015610ab257600080fd5b5061012954610428906001600160a01b031681565b348015610ad357600080fd5b50610374610ae2366004614707565b611822565b348015610af357600080fd5b50610428610b0236600461461c565b61015d602052600090815260409020546001600160a01b031681565b348015610b2a57600080fd5b506103b5610b39366004614351565b61182e565b348015610b4a57600080fd5b506103b57f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b348015610b7e57600080fd5b50610374610b8d3660046147a9565b61199a565b348015610b9e57600080fd5b506103b5610bad366004614661565b61019260209081526000928352604080842090915290825290205481565b348015610bd757600080fd5b50610374610be636600461415c565b611c74565b60006001600160e01b03198216637965db0b60e01b1480610c1c57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b610c2d81611dd6565b50565b600082815260656020526040902060010154610c4d81335b6121c9565b610c57838361222d565b505050565b6001600160a01b0381163314610cd15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610cdb82826122b3565b5050565b610ce88161231a565b610c2d81604051806020016040528060008152506000612345565b610d0b6124c6565b6101288054600091908290610d259063ffffffff16614d0f565b91906101000a81548163ffffffff021916908363ffffffff16021790559050816001600160a01b031663edf565cc6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610d7f57600080fd5b505af1158015610d93573d6000803e3d6000fd5b5050505063ffffffff8116600081815261018d6020908152604080832060018452825280832080546001600160a01b03199081166001600160a01b038d811691909117909255848052828520805482168c841617905594845261015d8352818420805486168a831617905561015e83528184208054861688831617905561015f835281842080549095169088169081179094558051630ce74fc560e31b8152905163673a7e2893600480840194938390030190829087803b158015610e5757600080fd5b505af1158015610e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8f9190614494565b61015960008363ffffffff1663ffffffff168152602001908152602001600020819055507f901e73890694712ca72bdc627d356f05f11be45e7ccf490a8d4924c393bcb5658187878761015960008763ffffffff1663ffffffff168152602001908152602001600020548f8f8f8f8c8c604051610f169b9a99989796959493929190614a35565b60405180910390a150505050505050505050565b610f338261231a565b610cdb82826001612345565b610f476124c6565b63ffffffff8216600081815261015f602090815260409182902080546001600160a01b038681166001600160a01b03198316811790935584519586521691840182905291830191909152907ffc4d69f373858d480cfc3f12e7cc7f9b12201291753ffc3babef0e7a8041979f906060015b60405180910390a1505050565b610cdb82826000611032565b8060005b8181101561102c5761101a84848381811061100057634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611015919061461c565b611dd6565b8061102481614cf4565b915050610fd5565b50505050565b338361103d81611dd6565b61104782826124f2565b61104f6125f3565b63ffffffff8516600090815261018d602090815260408083208615158452909152908190205490516323b872dd60e01b8152336004820152306024820152604481018690526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156110c357600080fd5b505af11580156110d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fb9190614409565b61110457600080fd5b63ffffffff851660009081526101c360209081526040808320861515845282528083203384529091528120805486929061113f908490614b5f565b909155505063ffffffff8516600090815261015a6020526040812054611166906001614b5f565b63ffffffff871660008181526101c0602090815260408083203384528252808320859055928252610192815282822088151583529052908120805492935087929091906111b4908490614b5f565b90915550506040517fd850f5d8405edb0730cd72e6bb9e228043c91fd591562543ea553efda14970b6906111f19088908790899033908790614ab9565b60405180910390a1505050505050565b805160005b8181101561102c5761123f8484838151811061123257634e487b7160e01b600052603260045260246000fd5b60200260200101516124f2565b8061124981614cf4565b915050611206565b610cdb82826001612668565b610cdb82826124f2565b610cdb82826000612668565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b63ffffffff8416600090815261018f602090815260408083208515801585528184528285208686528452828520549085529083528184208585529092528220546112e9868383612787565b979650505050505050565b610cdb828260016127a6565b60008281526065602052604090206001015461131c8133610c48565b610c5783836122b3565b61132e6124c6565b6001600160a01b0383161580159061134e57506001600160a01b03821615155b801561136257506001600160a01b03811615155b61136b57600080fd5b61012880546000919082906113859063ffffffff16614d0f565b91906101000a81548163ffffffff021916908363ffffffff16021790559050600061012860049054906101000a90046001600160a01b03169050826001600160a01b031663edf565cc6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156113fa57600080fd5b505af115801561140e573d6000803e3d6000fd5b5050610129546040516001600160a01b03909116925063e6d30467915061143b908c908c90602001614959565b604051602081830303815290604052898960405160200161145d9291906148c6565b604051602081830303815290604052848660016040518663ffffffff1660e01b8152600401611490959493929190614993565b602060405180830381600087803b1580156114aa57600080fd5b505af11580156114be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e29190614140565b63ffffffff8316600090815261018d602090815260408083206001845282529182902080546001600160a01b0319166001600160a01b03948516179055610129549151919092169163e6d304679161153e918d918d910161489e565b6040516020818303038152906040528989604051602001611560929190614880565b604051602081830303815290604052848660006040518663ffffffff1660e01b8152600401611593959493929190614993565b602060405180830381600087803b1580156115ad57600080fd5b505af11580156115c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e59190614140565b63ffffffff8316600081815261018d60209081526040808320838052825280832080546001600160a01b03199081166001600160a01b039788161790915593835261015d8252808320805485168b871617905561015e82528083208054851689871617905561015f825280832080549094169489169485179093558251630ce74fc560e31b8152925163673a7e2893600480820194918390030190829087803b15801561169157600080fd5b505af11580156116a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c99190614494565b61015960008463ffffffff1663ffffffff168152602001908152602001600020819055507f901e73890694712ca72bdc627d356f05f11be45e7ccf490a8d4924c393bcb5658261018d60008563ffffffff1663ffffffff1681526020019081526020016000206000600115151515815260200190815260200160002060009054906101000a90046001600160a01b031661018d60008663ffffffff1663ffffffff16815260200190815260200160002060008015151515815260200190815260200160002060009054906101000a90046001600160a01b03168861015960008863ffffffff1663ffffffff168152602001908152602001600020548e8e8e8e8d8d6040516117e19b9a99989796959493929190614a35565b60405180910390a1505050505050505050565b6117fc6124c6565b63ffffffff909116600090815261015b6020526040902055565b610cdb828260006127a6565b610cdb82826001611032565b60008261183a8161295d565b63ffffffff8416600090815261015a60209081526040808320546101c083528184206001600160a01b038a16855290925290912054801580159061187e5750818111155b156119905763ffffffff861660009081526101c160209081526040808320881515845282528083206001600160a01b038b16845290915290205480156118f85763ffffffff8716600090815261018f60209081526040808320891515845282528083208584529091529020546118f482826129ba565b9550505b63ffffffff871660009081526101c3602090815260408083208915845282528083206001600160a01b038c168452909152902054801561198d5763ffffffff8816600090815261018f602090815260408083208a15808552818452828520888652845282852054901585529083528184208785529092529091205461197e838383612787565b6119889089614b5f565b975050505b50505b5050509392505050565b6119a26124c6565b87158015906119b057508515155b80156119bb57508415155b80156119c657508315155b80156119d157508115155b6119da57600080fd5b63ffffffff89166000908152610158602052604090205460ff1615611a375760405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610cc8565b6101285463ffffffff908116908a161115611a855760405162461bcd60e51b815260206004820152600e60248201526d0d2dcc8caf040e8dede40d0d2ced60931b6044820152606401610cc8565b63ffffffff8916600090815261015860209081526040808320805460ff1916600190811790915561015b835281842086905561015a90925290912055611acb858a6129e0565b63ffffffff8916600081815261015c602090815260408083208590556101285461018d835281842060018552909252808320548380529281902054905163b0956b5f60e01b815260048101949094526001600160a01b03928316602485015282166044840152606483018b9052608483018a905260a4830189905260c4830187905260e483018690526401000000009004169063b0956b5f9061010401600060405180830381600087803b158015611b8257600080fd5b505af1158015611b96573d6000803e3d6000fd5b5050610128546040516317b4d3fb60e31b815263ffffffff8d16600482015260016024820152670de0b6b3a76400006044820181905260648201526084810189905260a481018990526401000000009091046001600160a01b0316925063bda69fd8915060c401600060405180830381600087803b158015611c1757600080fd5b505af1158015611c2b573d6000803e3d6000fd5b50506040805163ffffffff8d168152602081018990529081018490527f95eeb1c33a758f56bd880588063c2f122e39c8885929e5fbbbd57418b97e58d0925060600190506117e1565b600054610100900460ff1680611c8d575060005460ff16155b611ca95760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015611ccb576000805461ffff19166101011790555b6001600160a01b03851615801590611ceb57506001600160a01b03841615155b8015611cff57506001600160a01b03831615155b8015611d1357506001600160a01b03821615155b611d1c57600080fd5b611d2585612c29565b61012980546001600160a01b03199081166001600160a01b038781169182179093556101288054640100000000600160c01b0319166401000000008886169081029190911790915561012a80549093168685161790925560408051938916845260208401919091528201527f48aa6e6153c5dedbe00925ab3c8e28c6ce0c1a80652b3369f176065e797b45079060600160405180910390a18015611dcf576000805461ff00191690555b5050505050565b80611de08161295d565b63ffffffff8216600090815261015f60209081526040808320548151630ce74fc560e31b815291516001600160a01b039091169263673a7e28926004808201939182900301818787803b158015611e3657600080fd5b505af1158015611e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6e9190614494565b63ffffffff8416600090815261015a602090815260408083205461015990925290912054919250908214801590611dcf5763ffffffff8516600090815261018f6020908152604080832060018452808352818420868552835281842054848052908352818420868552909252822054909180611eea8988612cae565b63ffffffff8b16600090815261018d602090815260408083206001845282528083205481516318160ddd60e01b81529151959750939550611f949487946001600160a01b0316936318160ddd93600480850194919392918390030190829087803b158015611f5757600080fd5b505af1158015611f6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8f9190614494565b6129ba565b63ffffffff8a16600090815261018d6020908152604080832083805282528083205481516318160ddd60e01b81529151949850611fff9486946001600160a01b03909216936318160ddd93600480820194929392918390030190829087803b158015611f5757600080fd5b63ffffffff8a1660009081526101596020526040902088905592508561202481614cf4565b63ffffffff8b16600090815261015a6020908152604080832084905561018f82528083206001845280835281842085855283528184208a9055838052825280832084845290915281208690559097509050806120818b8787612ed5565b90925090506120908285614b1e565b935061209c8184614b1e565b63ffffffff8c16600081815261018e6020908152604080832060018452909152808220889055818052908190208390556101285490516317b4d3fb60e31b81526004810192909252602482018b905260448201899052606482018890526084820187905260a482018390529194506401000000009091046001600160a01b03169063bda69fd89060c401600060405180830381600087803b15801561214057600080fd5b505af1158015612154573d6000803e3d6000fd5b50506040805163ffffffff8f168152602081018c90529081018c9052606081018790526080810186905260a0810189905260c081018890527f69e662f95898affac086a5bc1177755bdaf7f4a40a3880364c48012170ee57fe925060e001905060405180910390a15050505050505050505050565b6121d38282611273565b610cdb576121eb816001600160a01b031660146131d4565b6121f68360206131d4565b6040516020016122079291906148e4565b60408051601f198184030181529082905262461bcd60e51b8252610cc891600401614980565b6122378282611273565b610cdb5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561226f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6122bd8282611273565b15610cdb5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610cdb8133610c48565b60006123787f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050612383846133b6565b6000835111806123905750815b156123a15761239f848461345b565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16611dcf57805460ff191660011781556040516001600160a01b038316602482015261242090869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b17905261345b565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146124bd5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610cc8565b611dcf85613546565b6124f07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336121c9565b565b63ffffffff811660009081526101c0602090815260408083206001600160a01b03861684529091529020548015801590612542575063ffffffff8216600090815261015a60205260409020548111155b15610c575761255382846001613586565b61255f82846000613586565b61256b828460016136ea565b612577828460006136ea565b61258382846001613820565b61258f82846000613820565b63ffffffff821660008181526101c0602090815260408083206001600160a01b038816808552908352818420939093558051928352908201929092527fe03aa867e2345cc967d98e4c81f6b0707b5ef082d9d20bac3dcf95540acdeae49101610fb8565b6101285464010000000090046001600160a01b031633146124f05761012a546040516324b4085360e21b81523360048201526001600160a01b03909116906392d0214c90602401600060405180830381600087803b15801561265457600080fd5b505af115801561102c573d6000803e3d6000fd5b338361267381611dd6565b61267d82826124f2565b6126856125f3565b61268f858561396a565b63ffffffff85166000908152610190602090815260408083208615158452909152812080548692906126c2908490614b5f565b909155505063ffffffff851660009081526101c1602090815260408083208615158452825280832033845290915281208054869290612702908490614b5f565b909155505063ffffffff8516600090815261015a6020526040812054612729906001614b5f565b63ffffffff871660009081526101c0602090815260408083203380855292529182902083905590519192507f50b8727b538cf16daeb79894e8bde5c1e975985071be8a8d7620675a5dddfc6b916111f191899188918a918790614ab9565b6000816127948486614c3c565b61279e9190614ba5565b949350505050565b33836127b181611dd6565b6127bb82826124f2565b6127c36125f3565b63ffffffff8516600090815261018d602090815260408083208615158452909152908190205490516323b872dd60e01b8152336004820152306024820152604481018690526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561283757600080fd5b505af115801561284b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286f9190614409565b5063ffffffff851660009081526101c26020908152604080832086151584528252808320338452909152812080548692906128ab908490614b5f565b909155505063ffffffff8516600090815261015a60205260408120546128d2906001614b5f565b63ffffffff871660008181526101c060209081526040808320338452825280832085905592825261019181528282208815158352905290812080549293508792909190612920908490614b5f565b90915550506040517f191d5f0d51691cdc223884e5321013c9663c6b337a07d550c538d9dcbbd66203906111f19088908790899033908790614ab9565b63ffffffff81166000908152610158602052604090205460ff16610c2d5760405162461bcd60e51b81526020600482015260146024820152731b585c9ad95d08191bd95cdb89dd08195e1a5cdd60621b6044820152606401610cc8565b6000816129cf84670de0b6b3a7640000614c3c565b6129d99190614ba5565b9392505050565b670de0b6b3a7640000821015612a385760405162461bcd60e51b815260206004820152601860248201527f496e73756666696369656e74206d61726b6574207365656400000000000000006044820152606401610cc8565b6000612a45836002614c3c565b9050612a51828261396a565b63ffffffff8216600090815261015e6020526040908190205490516304831f7160e51b8152600481018390526001600160a01b0390911690639063ee2090602401600060405180830381600087803b158015612aac57600080fd5b505af1158015612ac0573d6000803e3d6000fd5b5050505063ffffffff8216600090815261018d6020908152604080832060018452909152908190205490516340c10f1960e01b815273f10a7f10a7f10a7f10a7f10a7f10a7f10a7f10a76004820152602481018590526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015612b4557600080fd5b505af1158015612b59573d6000803e3d6000fd5b5050505063ffffffff8216600090815261018d60209081526040808320838052909152908190205490516340c10f1960e01b815273f10a7f10a7f10a7f10a7f10a7f10a7f10a7f10a76004820152602481018590526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015612bdd57600080fd5b505af1158015612bf1573d6000803e3d6000fd5b5050505063ffffffff91909116600090815261018e602090815260408083206001845290915280822084905581805290209190915550565b600054610100900460ff1680612c42575060005460ff16155b612c5e5760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015612c80576000805461ffff19166101011790555b612c886139ab565b612c90613a2e565b612c9982613a8c565b8015610cdb576000805461ff00191690555050565b63ffffffff82166000908152610159602090815260408083205461018e835281842060018552808452828520548580529352908320549192612cf08385614b5f565b9050600080612d0188878786613b55565b63ffffffff8a16600090815261015e602052604080822054905163452accd960e11b81526004810188905260248101849052939550919350916001600160a01b0390911690638a5599b290604401602060405180830381600087803b158015612d6957600080fd5b505af1158015612d7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612da19190614494565b90508015612dcd578215612dc057612db98188614b5f565b9650612dcd565b612dca8187614b5f565b95505b6000612dd98888613bcd565b90506000612def87670de0b6b3a7640000614bb9565b63ffffffff8c16600090815261015c602052604090205483612e118a8e614c5b565b612e1b9190614bb9565b612e259190614bb9565b612e2f9190614b77565b90506000811215612e8857612e4381614d33565b905088811115612e6b57620186a0612e5e8a6201869f614bb9565b612e689190614b77565b90505b612e75818a614c9a565b9850612e818189614b5f565b9750612ec7565b87811115612eae57620186a0612ea1896201869f614bb9565b612eab9190614b77565b90505b612eb8818a614b5f565b9850612ec48189614c9a565b97505b505050505050509250929050565b63ffffffff8316600090815261019060209081526040808320600184529091528120548190819081908015612f375763ffffffff881660009081526101906020908152604080832060018452909152812055935083612f3481886129ba565b92505b5063ffffffff87166000908152610190602090815260408083208380529091529020548015612f925763ffffffff8816600090815261019060209081526040808320838052909152812055925082612f8f81876129ba565b91505b5063ffffffff871660009081526101926020908152604080832060018452909152902054801561302a576000612fc88289613be3565b9050612fd48187614c5b565b9550612fe08186614b1e565b9450612fec8285614c5b565b9350612ff9828989612787565b6130039084614b1e565b63ffffffff8a16600090815261019260209081526040808320600184529091528120559250505b5063ffffffff871660009081526101926020908152604080832083805290915290205480156130c057600061305f8288613be3565b905061306b8186614c5b565b94506130778187614b1e565b95506130838284614c5b565b925061309082888a612787565b61309a9085614b1e565b63ffffffff8a166000908152610192602090815260408083208380529091528120559350505b5063ffffffff8716600090815261019160209081526040808320600184529091529020548015613130576130f48188613be3565b6130fe9086614c5b565b945061310a8184614c5b565b63ffffffff89166000908152610191602090815260408083206001845290915281205592505b5063ffffffff8716600090815261019160209081526040808320838052909152902054801561319e576131638187613be3565b61316d9085614c5b565b93506131798183614c5b565b63ffffffff891660009081526101916020908152604080832083805290915281205591505b6131b1886131ac8688614b1e565b613bf8565b6131bd88600185613cfc565b6131c988600084613cfc565b505050935093915050565b606060006131e3836002614c3c565b6131ee906002614b5f565b67ffffffffffffffff81111561321457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561323e576020820181803683370190505b509050600360fc1b8160008151811061326757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106132a457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006132c8846002614c3c565b6132d3906001614b5f565b90505b6001811115613367576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061331557634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061333957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361336081614cdd565b90506132d6565b5083156129d95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610cc8565b803b61341a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610cc8565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6134ba5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610cc8565b600080846001600160a01b0316846040516134d59190614864565b600060405180830381855af49150503d8060008114613510576040519150601f19603f3d011682016040523d82523d6000602084013e613515565b606091505b509150915061353d8282604051806060016040528060278152602001614db360279139613e29565b95945050505050565b61354f816133b6565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b63ffffffff831660009081526101c160209081526040808320841515845282528083206001600160a01b0386168452909152902054801561102c5763ffffffff841660008181526101c1602090815260408083208615158085529083528184206001600160a01b03891680865290845282852085905585855261018f84528285209185529083528184209484526101c083528184209084528252808320548352929052908120546136389083906129ba565b63ffffffff8616600090815261018d6020908152604080832087151584529091529081902054905163a9059cbb60e01b81526001600160a01b0387811660048301526024820184905292935091169063a9059cbb90604401602060405180830381600087803b1580156136aa57600080fd5b505af11580156136be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136e29190614409565b505050505050565b63ffffffff831660009081526101c260209081526040808320841515845282528083206001600160a01b0386168452909152902054801561102c5763ffffffff841660008181526101c2602090815260408083208615158085529083528184206001600160a01b03891680865290845282852085905585855261018f84528285209185529083528184209484526101c0835281842090845282528083205483529290529081205461379c908390613be3565b63ffffffff8616600090815261015e6020526040908190205490516375b5ffd160e11b81526001600160a01b0387811660048301526024820184905292935091169063eb6bffa290604401600060405180830381600087803b15801561380157600080fd5b505af1158015613815573d6000803e3d6000fd5b505050505050505050565b63ffffffff831660009081526101c360209081526040808320841515845282528083206001600160a01b0386168452909152902054801561102c5763ffffffff841660009081526101c0602090815260408083206001600160a01b03871684529091528120546138959086908490869061129e565b63ffffffff861660008181526101c3602090815260408083208815801585529083528184206001600160a01b038b811680875291855283862086905595855261018d845282852091855292529182902054915163a9059cbb60e01b8152600481019190915260248101849052929350169063a9059cbb90604401602060405180830381600087803b15801561392957600080fd5b505af115801561393d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139619190614409565b611dcf57600080fd5b63ffffffff808316600090815261015e602090815260408083205461015d90925290912054610cdb926001600160a01b0391821692339216908590613e6216565b600054610100900460ff16806139c4575060005460ff16155b6139e05760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613a02576000805461ffff19166101011790555b613a0a613ebc565b613a12613ebc565b613a1a613ebc565b8015610c2d576000805461ff001916905550565b600054610100900460ff1680613a47575060005460ff16155b613a635760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613a0a576000805461ffff1916610101179055613a12613ebc565b600054610100900460ff1680613aa5575060005460ff16155b613ac15760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613ae3576000805461ffff19166101011790555b6001600160a01b038216613af657600080fd5b613b01600083613f26565b613b2b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583613f26565b612c997f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383613f26565b8183106000808215613b6a5750848403613b6f565b508385035b63ffffffff8716600090815261015b60205260408120548590613b929084614c3c565b613b9c9190614ba5565b90506000613bb282670de0b6b3a7640000613bcd565b905080670de0b6b3a764000003935050505094509492505050565b6000818310613bdc57816129d9565b5090919050565b6000670de0b6b3a76400006129cf8385614c3c565b6000811315613c795763ffffffff8216600090815261015e6020526040908190205490516304831f7160e51b8152600481018390526001600160a01b0390911690639063ee2090602401600060405180830381600087803b158015613c5c57600080fd5b505af1158015613c70573d6000803e3d6000fd5b50505050610cdb565b6000811215610cdb5763ffffffff8216600090815261015e60205260409020546001600160a01b0316631c499b55613cb083614d33565b6040518263ffffffff1660e01b8152600401613cce91815260200190565b600060405180830381600087803b158015613ce857600080fd5b505af11580156136e2573d6000803e3d6000fd5b6000811315613d905763ffffffff8316600090815261018d602090815260408083208515158452909152908190205490516340c10f1960e01b8152306004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015613d7357600080fd5b505af1158015613d87573d6000803e3d6000fd5b50505050610c57565b6000811215610c575763ffffffff8316600090815261018d6020908152604080832085151584529091529020546001600160a01b03166342966c68613dd483614d33565b6040518263ffffffff1660e01b8152600401613df291815260200190565b600060405180830381600087803b158015613e0c57600080fd5b505af1158015613e20573d6000803e3d6000fd5b50505050505050565b60608315613e385750816129d9565b825115613e485782518084602001fd5b8160405162461bcd60e51b8152600401610cc89190614980565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261102c908590613f30565b600054610100900460ff1680613ed5575060005460ff16155b613ef15760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613a1a576000805461ffff19166101011790558015610c2d576000805461ff001916905550565b610cdb828261222d565b6000613f85826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166140029092919063ffffffff16565b805190915015610c575780806020019051810190613fa39190614409565b610c575760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610cc8565b606061279e848460008585843b61405b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610cc8565b600080866001600160a01b031685876040516140779190614864565b60006040518083038185875af1925050503d80600081146140b4576040519150601f19603f3d011682016040523d82523d6000602084013e6140b9565b606091505b50915091506112e9828286613e29565b60008083601f8401126140da578182fd5b50813567ffffffffffffffff8111156140f1578182fd5b60208301915083602082850101111561410957600080fd5b9250929050565b803563ffffffff81168114610c1f57600080fd5b600060208284031215614135578081fd5b81356129d981614d8f565b600060208284031215614151578081fd5b81516129d981614d8f565b60008060008060808587031215614171578283fd5b843561417c81614d8f565b9350602085013561418c81614d8f565b9250604085013561419c81614d8f565b915060608501356141ac81614d8f565b939692955090935050565b600080604083850312156141c9578182fd5b82356141d481614d8f565b915060208381013567ffffffffffffffff808211156141f1578384fd5b818601915086601f830112614204578384fd5b81358181111561421657614216614d79565b8060051b9150614227848301614aed565b8181528481019084860184860187018b1015614241578788fd5b8795505b8386101561426a5761425681614110565b835260019590950194918601918601614245565b508096505050505050509250929050565b6000806040838503121561428d578182fd5b823561429881614d8f565b915060208381013567ffffffffffffffff808211156142b5578384fd5b818601915086601f8301126142c8578384fd5b8135818111156142da576142da614d79565b6142ec601f8201601f19168501614aed565b91508082528784828501011115614301578485fd5b8084840185840137810190920192909252919491935090915050565b6000806040838503121561432f578182fd5b823561433a81614d8f565b915061434860208401614110565b90509250929050565b600080600060608486031215614365578283fd5b833561437081614d8f565b925061437e60208501614110565b9150604084013561438e81614da4565b809150509250925092565b600080602083850312156143ab578182fd5b823567ffffffffffffffff808211156143c2578384fd5b818501915085601f8301126143d5578384fd5b8135818111156143e3578485fd5b8660208260051b85010111156143f7578485fd5b60209290920196919550909350505050565b60006020828403121561441a578081fd5b81516129d981614da4565b600060208284031215614436578081fd5b5035919050565b6000806040838503121561444f578182fd5b82359150602083013561446181614d8f565b809150509250929050565b60006020828403121561447d578081fd5b81356001600160e01b0319811681146129d9578182fd5b6000602082840312156144a5578081fd5b5051919050565b600080600080600080600060a0888a0312156144c6578485fd5b873567ffffffffffffffff808211156144dd578687fd5b6144e98b838c016140c9565b909950975060208a0135915080821115614501578687fd5b5061450e8a828b016140c9565b909650945050604088013561452281614d8f565b9250606088013561453281614d8f565b9150608088013561454281614d8f565b8091505092959891949750929550565b600080600080600080600080600060e08a8c03121561456f578283fd5b893567ffffffffffffffff80821115614586578485fd5b6145928d838e016140c9565b909b50995060208c01359150808211156145aa578485fd5b506145b78c828d016140c9565b90985096505060408a01356145cb81614d8f565b945060608a01356145db81614d8f565b935060808a01356145eb81614d8f565b925060a08a01356145fb81614d8f565b915060c08a013561460b81614d8f565b809150509295985092959850929598565b60006020828403121561462d578081fd5b6129d982614110565b60008060408385031215614648578182fd5b61465183614110565b9150602083013561446181614d8f565b60008060408385031215614673578182fd5b61467c83614110565b9150602083013561446181614da4565b6000806000606084860312156146a0578081fd5b6146a984614110565b925060208401356146b981614da4565b9150604084013561438e81614d8f565b6000806000606084860312156146dd578081fd5b6146e684614110565b925060208401356146f681614da4565b929592945050506040919091013590565b60008060408385031215614719578182fd5b61472283614110565b946020939093013593505050565b600080600060608486031215614744578081fd5b61474d84614110565b925060208401359150604084013561438e81614da4565b60008060008060808587031215614779578182fd5b61478285614110565b935060208501359250604085013561479981614da4565b9396929550929360600135925050565b60008060008060008060008060006101208a8c0312156147c7578283fd5b6147d08a614110565b9b60208b01359b5060408b01359a60608101359a506080810135995060a0810135985060c0810135975060e081013596506101000135945092505050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452614850816020860160208601614cb1565b601f01601f19169290920160200192915050565b60008251614876818460208701614cb1565b9190910192915050565b600061667360f01b8252828460028401379101600201908152919050565b60006b0233637b0ba1029b437b93a160a51b82528284600c8401379101600c01908152919050565b600061199b60f21b8252828460028401379101600201908152919050565b60007f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008252835161491c816017850160208801614cb1565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161494d816028840160208801614cb1565b01602801949350505050565b60006a0233637b0ba102637b733960ad1b82528284600b8401379101600b01908152919050565b6000602082526129d96020830184614838565b600060a082526149a660a0830188614838565b82810360208401526149b88188614838565b6001600160a01b03969096166040840152505063ffffffff929092166060830152151560809091015292915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b63ffffffff8c1681526001600160a01b038b811660208301528a8116604083015289811660608301526080820189905261012060a08301819052600091614a7f8483018a8c61480e565b915083820360c0850152614a9482888a61480e565b925080861660e085015280851661010085015250509c9b505050505050505050505050565b63ffffffff959095168552921515602085015260408401919091526001600160a01b03166060830152608082015260a00190565b604051601f8201601f1916810167ffffffffffffffff81118282101715614b1657614b16614d79565b604052919050565b600080821280156001600160ff1b0384900385131615614b4057614b40614d4d565b600160ff1b8390038412811615614b5957614b59614d4d565b50500190565b60008219821115614b7257614b72614d4d565b500190565b600082614b8657614b86614d63565b600160ff1b821460001984141615614ba057614ba0614d4d565b500590565b600082614bb457614bb4614d63565b500490565b60006001600160ff1b0381841382841380821686840486111615614bdf57614bdf614d4d565b600160ff1b84871282811687830589121615614bfd57614bfd614d4d565b858712925087820587128484161615614c1857614c18614d4d565b87850587128184161615614c2e57614c2e614d4d565b505050929093029392505050565b6000816000190483118215151615614c5657614c56614d4d565b500290565b60008083128015600160ff1b850184121615614c7957614c79614d4d565b6001600160ff1b0384018313811615614c9457614c94614d4d565b50500390565b600082821015614cac57614cac614d4d565b500390565b60005b83811015614ccc578181015183820152602001614cb4565b8381111561102c5750506000910152565b600081614cec57614cec614d4d565b506000190190565b6000600019821415614d0857614d08614d4d565b5060010190565b600063ffffffff80831681811415614d2957614d29614d4d565b6001019392505050565b6000600160ff1b821415614d4957614d49614d4d565b0390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c2d57600080fd5b8015158114610c2d57600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212209f07d2605481bcc755f92745274a7201e1fd0d05162284474e854bccfb480f5c64736f6c63430008030033", + "deployedBytecode": "0x60806040526004361061031a5760003560e01c8063867dfc6d116101ab578063c2b80072116100f7578063eeb0235211610095578063f72c0d8b1161006f578063f72c0d8b14610b3e578063f7cbb68714610b72578063f80c9b9214610b92578063f8c8765e14610bcb5761031a565b8063eeb0235214610ac7578063f41cb19514610ae7578063f68a327f14610b1e5761031a565b8063d88905c9116100d1578063d88905c914610a46578063da04ce1414610a66578063e6b604e014610a86578063e77772fe14610aa65761031a565b8063c2b80072146109c7578063c2e1247114610a06578063d547741f14610a265761031a565b80639c5b0ee311610164578063b054c4a11161013e578063b054c4a1146108f3578063b36f537414610935578063b3c7e21814610966578063bb0a45291461099f5761031a565b80639c5b0ee31461086e5780639dc39e0f146108a5578063a217fddf146108de5761031a565b8063867dfc6d146107a05780638900bdfa146107c0578063897a0786146107ee57806391a9fa611461080e57806391d148541461082e57806392f6fe801461084e5761031a565b80634f1ef2861161026a578063682ad286116102235780636f486c5b116101fd5780636f486c5b146106ed57806371fd96231461072c57806375b238fc1461074c5780637a0e94f0146107805761031a565b8063682ad2861461068c5780636c305055146106ac5780636c8d2b97146106cd5761031a565b80634f1ef286146105965780635ebaf1db146105a9578063602aabab146105d2578063636190c81461060057806364d16f531461063357806364e4a81d146106535761031a565b8063248a9ca3116102d757806334daaa25116102b157806334daaa25146104fd57806336568abe146105365780633659cfe6146105565780633d6a2b3f146105765761031a565b8063248a9ca31461046e5780632f2ff15d1461049e57806334898684146104be5761031a565b806301ffc9a71461031f57806305c8146f146103545780630e5140dc1461037657806314c88ffa146103c35780631badf5c0146103f157806321658e4814610440575b600080fd5b34801561032b57600080fd5b5061033f61033a36600461446c565b610beb565b60405190151581526020015b60405180910390f35b34801561036057600080fd5b5061037461036f36600461461c565b610c24565b005b34801561038257600080fd5b506103b561039136600461468c565b6101c360209081526000938452604080852082529284528284209052825290205481565b60405190815260200161034b565b3480156103cf57600080fd5b506103b56103de36600461461c565b61015a6020526000908152604090205481565b3480156103fd57600080fd5b5061042861040c36600461461c565b61015f602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161034b565b34801561044c57600080fd5b506103b561045b36600461461c565b61015b6020526000908152604090205481565b34801561047a57600080fd5b506103b5610489366004614425565b60009081526065602052604090206001015490565b3480156104aa57600080fd5b506103746104b936600461443d565b610c30565b3480156104ca57600080fd5b506103b56104d936600461468c565b6101c260209081526000938452604080852082529284528284209052825290205481565b34801561050957600080fd5b506103b5610518366004614661565b61019160209081526000928352604080842090915290825290205481565b34801561054257600080fd5b5061037461055136600461443d565b610c5c565b34801561056257600080fd5b50610374610571366004614124565b610cdf565b34801561058257600080fd5b50610374610591366004614552565b610d03565b6103746105a436600461427b565b610f2a565b3480156105b557600080fd5b50610128546104289064010000000090046001600160a01b031681565b3480156105de57600080fd5b506103b56105ed36600461461c565b61015c6020526000908152604090205481565b34801561060c57600080fd5b506101285461061e9063ffffffff1681565b60405163ffffffff909116815260200161034b565b34801561063f57600080fd5b5061037461064e366004614636565b610f3f565b34801561065f57600080fd5b506103b561066e366004614661565b61019060209081526000928352604080842090915290825290205481565b34801561069857600080fd5b506103746106a7366004614707565b610fc5565b3480156106b857600080fd5b5061012a54610428906001600160a01b031681565b3480156106d957600080fd5b506103746106e8366004614399565b610fd1565b3480156106f957600080fd5b506103b56107083660046146c9565b61018f60209081526000938452604080852082529284528284209052825290205481565b34801561073857600080fd5b50610374610747366004614730565b611032565b34801561075857600080fd5b506103b57fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561078c57600080fd5b5061037461079b3660046141b7565b611201565b3480156107ac57600080fd5b506103746107bb366004614707565b611251565b3480156107cc57600080fd5b506103b56107db36600461461c565b6101596020526000908152604090205481565b3480156107fa57600080fd5b5061037461080936600461431d565b61125d565b34801561081a57600080fd5b50610374610829366004614707565b611267565b34801561083a57600080fd5b5061033f61084936600461443d565b611273565b34801561085a57600080fd5b506103b5610869366004614764565b61129e565b34801561087a57600080fd5b5061042861088936600461461c565b61015e602052600090815260409020546001600160a01b031681565b3480156108b157600080fd5b506103b56108c0366004614636565b6101c060209081526000928352604080842090915290825290205481565b3480156108ea57600080fd5b506103b5600081565b3480156108ff57600080fd5b5061042861090e366004614661565b61018d6020908152600092835260408084209091529082529020546001600160a01b031681565b34801561094157600080fd5b5061033f61095036600461461c565b6101586020526000908152604090205460ff1681565b34801561097257600080fd5b506103b5610981366004614661565b61018e60209081526000928352604080842090915290825290205481565b3480156109ab57600080fd5b5061042873f10a7f10a7f10a7f10a7f10a7f10a7f10a7f10a781565b3480156109d357600080fd5b506103b56109e236600461468c565b6101c160209081526000938452604080852082529284528284209052825290205481565b348015610a1257600080fd5b50610374610a21366004614707565b6112f4565b348015610a3257600080fd5b50610374610a4136600461443d565b611300565b348015610a5257600080fd5b50610374610a613660046144ac565b611326565b348015610a7257600080fd5b50610374610a81366004614707565b6117f4565b348015610a9257600080fd5b50610374610aa1366004614707565b611816565b348015610ab257600080fd5b5061012954610428906001600160a01b031681565b348015610ad357600080fd5b50610374610ae2366004614707565b611822565b348015610af357600080fd5b50610428610b0236600461461c565b61015d602052600090815260409020546001600160a01b031681565b348015610b2a57600080fd5b506103b5610b39366004614351565b61182e565b348015610b4a57600080fd5b506103b57f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b348015610b7e57600080fd5b50610374610b8d3660046147a9565b61199a565b348015610b9e57600080fd5b506103b5610bad366004614661565b61019260209081526000928352604080842090915290825290205481565b348015610bd757600080fd5b50610374610be636600461415c565b611c74565b60006001600160e01b03198216637965db0b60e01b1480610c1c57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b610c2d81611dd6565b50565b600082815260656020526040902060010154610c4d81335b6121c9565b610c57838361222d565b505050565b6001600160a01b0381163314610cd15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610cdb82826122b3565b5050565b610ce88161231a565b610c2d81604051806020016040528060008152506000612345565b610d0b6124c6565b6101288054600091908290610d259063ffffffff16614d0f565b91906101000a81548163ffffffff021916908363ffffffff16021790559050816001600160a01b031663edf565cc6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610d7f57600080fd5b505af1158015610d93573d6000803e3d6000fd5b5050505063ffffffff8116600081815261018d6020908152604080832060018452825280832080546001600160a01b03199081166001600160a01b038d811691909117909255848052828520805482168c841617905594845261015d8352818420805486168a831617905561015e83528184208054861688831617905561015f835281842080549095169088169081179094558051630ce74fc560e31b8152905163673a7e2893600480840194938390030190829087803b158015610e5757600080fd5b505af1158015610e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8f9190614494565b61015960008363ffffffff1663ffffffff168152602001908152602001600020819055507f901e73890694712ca72bdc627d356f05f11be45e7ccf490a8d4924c393bcb5658187878761015960008763ffffffff1663ffffffff168152602001908152602001600020548f8f8f8f8c8c604051610f169b9a99989796959493929190614a35565b60405180910390a150505050505050505050565b610f338261231a565b610cdb82826001612345565b610f476124c6565b63ffffffff8216600081815261015f602090815260409182902080546001600160a01b038681166001600160a01b03198316811790935584519586521691840182905291830191909152907ffc4d69f373858d480cfc3f12e7cc7f9b12201291753ffc3babef0e7a8041979f906060015b60405180910390a1505050565b610cdb82826000611032565b8060005b8181101561102c5761101a84848381811061100057634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611015919061461c565b611dd6565b8061102481614cf4565b915050610fd5565b50505050565b338361103d81611dd6565b61104782826124f2565b61104f6125f3565b63ffffffff8516600090815261018d602090815260408083208615158452909152908190205490516323b872dd60e01b8152336004820152306024820152604481018690526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156110c357600080fd5b505af11580156110d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fb9190614409565b61110457600080fd5b63ffffffff851660009081526101c360209081526040808320861515845282528083203384529091528120805486929061113f908490614b5f565b909155505063ffffffff8516600090815261015a6020526040812054611166906001614b5f565b63ffffffff871660008181526101c0602090815260408083203384528252808320859055928252610192815282822088151583529052908120805492935087929091906111b4908490614b5f565b90915550506040517fd850f5d8405edb0730cd72e6bb9e228043c91fd591562543ea553efda14970b6906111f19088908790899033908790614ab9565b60405180910390a1505050505050565b805160005b8181101561102c5761123f8484838151811061123257634e487b7160e01b600052603260045260246000fd5b60200260200101516124f2565b8061124981614cf4565b915050611206565b610cdb82826001612668565b610cdb82826124f2565b610cdb82826000612668565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b63ffffffff8416600090815261018f602090815260408083208515801585528184528285208686528452828520549085529083528184208585529092528220546112e9868383612787565b979650505050505050565b610cdb828260016127a6565b60008281526065602052604090206001015461131c8133610c48565b610c5783836122b3565b61132e6124c6565b6001600160a01b0383161580159061134e57506001600160a01b03821615155b801561136257506001600160a01b03811615155b61136b57600080fd5b61012880546000919082906113859063ffffffff16614d0f565b91906101000a81548163ffffffff021916908363ffffffff16021790559050600061012860049054906101000a90046001600160a01b03169050826001600160a01b031663edf565cc6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156113fa57600080fd5b505af115801561140e573d6000803e3d6000fd5b5050610129546040516001600160a01b03909116925063e6d30467915061143b908c908c90602001614959565b604051602081830303815290604052898960405160200161145d9291906148c6565b604051602081830303815290604052848660016040518663ffffffff1660e01b8152600401611490959493929190614993565b602060405180830381600087803b1580156114aa57600080fd5b505af11580156114be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e29190614140565b63ffffffff8316600090815261018d602090815260408083206001845282529182902080546001600160a01b0319166001600160a01b03948516179055610129549151919092169163e6d304679161153e918d918d910161489e565b6040516020818303038152906040528989604051602001611560929190614880565b604051602081830303815290604052848660006040518663ffffffff1660e01b8152600401611593959493929190614993565b602060405180830381600087803b1580156115ad57600080fd5b505af11580156115c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e59190614140565b63ffffffff8316600081815261018d60209081526040808320838052825280832080546001600160a01b03199081166001600160a01b039788161790915593835261015d8252808320805485168b871617905561015e82528083208054851689871617905561015f825280832080549094169489169485179093558251630ce74fc560e31b8152925163673a7e2893600480820194918390030190829087803b15801561169157600080fd5b505af11580156116a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c99190614494565b61015960008463ffffffff1663ffffffff168152602001908152602001600020819055507f901e73890694712ca72bdc627d356f05f11be45e7ccf490a8d4924c393bcb5658261018d60008563ffffffff1663ffffffff1681526020019081526020016000206000600115151515815260200190815260200160002060009054906101000a90046001600160a01b031661018d60008663ffffffff1663ffffffff16815260200190815260200160002060008015151515815260200190815260200160002060009054906101000a90046001600160a01b03168861015960008863ffffffff1663ffffffff168152602001908152602001600020548e8e8e8e8d8d6040516117e19b9a99989796959493929190614a35565b60405180910390a1505050505050505050565b6117fc6124c6565b63ffffffff909116600090815261015b6020526040902055565b610cdb828260006127a6565b610cdb82826001611032565b60008261183a8161295d565b63ffffffff8416600090815261015a60209081526040808320546101c083528184206001600160a01b038a16855290925290912054801580159061187e5750818111155b156119905763ffffffff861660009081526101c160209081526040808320881515845282528083206001600160a01b038b16845290915290205480156118f85763ffffffff8716600090815261018f60209081526040808320891515845282528083208584529091529020546118f482826129ba565b9550505b63ffffffff871660009081526101c3602090815260408083208915845282528083206001600160a01b038c168452909152902054801561198d5763ffffffff8816600090815261018f602090815260408083208a15808552818452828520888652845282852054901585529083528184208785529092529091205461197e838383612787565b6119889089614b5f565b975050505b50505b5050509392505050565b6119a26124c6565b87158015906119b057508515155b80156119bb57508415155b80156119c657508315155b80156119d157508115155b6119da57600080fd5b63ffffffff89166000908152610158602052604090205460ff1615611a375760405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610cc8565b6101285463ffffffff908116908a161115611a855760405162461bcd60e51b815260206004820152600e60248201526d0d2dcc8caf040e8dede40d0d2ced60931b6044820152606401610cc8565b63ffffffff8916600090815261015860209081526040808320805460ff1916600190811790915561015b835281842086905561015a90925290912055611acb858a6129e0565b63ffffffff8916600081815261015c602090815260408083208590556101285461018d835281842060018552909252808320548380529281902054905163b0956b5f60e01b815260048101949094526001600160a01b03928316602485015282166044840152606483018b9052608483018a905260a4830189905260c4830187905260e483018690526401000000009004169063b0956b5f9061010401600060405180830381600087803b158015611b8257600080fd5b505af1158015611b96573d6000803e3d6000fd5b5050610128546040516317b4d3fb60e31b815263ffffffff8d16600482015260016024820152670de0b6b3a76400006044820181905260648201526084810189905260a481018990526401000000009091046001600160a01b0316925063bda69fd8915060c401600060405180830381600087803b158015611c1757600080fd5b505af1158015611c2b573d6000803e3d6000fd5b50506040805163ffffffff8d168152602081018990529081018490527f95eeb1c33a758f56bd880588063c2f122e39c8885929e5fbbbd57418b97e58d0925060600190506117e1565b600054610100900460ff1680611c8d575060005460ff16155b611ca95760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015611ccb576000805461ffff19166101011790555b6001600160a01b03851615801590611ceb57506001600160a01b03841615155b8015611cff57506001600160a01b03831615155b8015611d1357506001600160a01b03821615155b611d1c57600080fd5b611d2585612c29565b61012980546001600160a01b03199081166001600160a01b038781169182179093556101288054640100000000600160c01b0319166401000000008886169081029190911790915561012a80549093168685161790925560408051938916845260208401919091528201527f48aa6e6153c5dedbe00925ab3c8e28c6ce0c1a80652b3369f176065e797b45079060600160405180910390a18015611dcf576000805461ff00191690555b5050505050565b80611de08161295d565b63ffffffff8216600090815261015f60209081526040808320548151630ce74fc560e31b815291516001600160a01b039091169263673a7e28926004808201939182900301818787803b158015611e3657600080fd5b505af1158015611e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6e9190614494565b63ffffffff8416600090815261015a602090815260408083205461015990925290912054919250908214801590611dcf5763ffffffff8516600090815261018f6020908152604080832060018452808352818420868552835281842054848052908352818420868552909252822054909180611eea8988612cae565b63ffffffff8b16600090815261018d602090815260408083206001845282528083205481516318160ddd60e01b81529151959750939550611f949487946001600160a01b0316936318160ddd93600480850194919392918390030190829087803b158015611f5757600080fd5b505af1158015611f6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8f9190614494565b6129ba565b63ffffffff8a16600090815261018d6020908152604080832083805282528083205481516318160ddd60e01b81529151949850611fff9486946001600160a01b03909216936318160ddd93600480820194929392918390030190829087803b158015611f5757600080fd5b63ffffffff8a1660009081526101596020526040902088905592508561202481614cf4565b63ffffffff8b16600090815261015a6020908152604080832084905561018f82528083206001845280835281842085855283528184208a9055838052825280832084845290915281208690559097509050806120818b8787612ed5565b90925090506120908285614b1e565b935061209c8184614b1e565b63ffffffff8c16600081815261018e6020908152604080832060018452909152808220889055818052908190208390556101285490516317b4d3fb60e31b81526004810192909252602482018b905260448201899052606482018890526084820187905260a482018390529194506401000000009091046001600160a01b03169063bda69fd89060c401600060405180830381600087803b15801561214057600080fd5b505af1158015612154573d6000803e3d6000fd5b50506040805163ffffffff8f168152602081018c90529081018c9052606081018790526080810186905260a0810189905260c081018890527f69e662f95898affac086a5bc1177755bdaf7f4a40a3880364c48012170ee57fe925060e001905060405180910390a15050505050505050505050565b6121d38282611273565b610cdb576121eb816001600160a01b031660146131d4565b6121f68360206131d4565b6040516020016122079291906148e4565b60408051601f198184030181529082905262461bcd60e51b8252610cc891600401614980565b6122378282611273565b610cdb5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561226f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6122bd8282611273565b15610cdb5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610cdb8133610c48565b60006123787f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050612383846133b6565b6000835111806123905750815b156123a15761239f848461345b565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16611dcf57805460ff191660011781556040516001600160a01b038316602482015261242090869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b17905261345b565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146124bd5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610cc8565b611dcf85613546565b6124f07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336121c9565b565b63ffffffff811660009081526101c0602090815260408083206001600160a01b03861684529091529020548015801590612542575063ffffffff8216600090815261015a60205260409020548111155b15610c575761255382846001613586565b61255f82846000613586565b61256b828460016136ea565b612577828460006136ea565b61258382846001613820565b61258f82846000613820565b63ffffffff821660008181526101c0602090815260408083206001600160a01b038816808552908352818420939093558051928352908201929092527fe03aa867e2345cc967d98e4c81f6b0707b5ef082d9d20bac3dcf95540acdeae49101610fb8565b6101285464010000000090046001600160a01b031633146124f05761012a546040516324b4085360e21b81523360048201526001600160a01b03909116906392d0214c90602401600060405180830381600087803b15801561265457600080fd5b505af115801561102c573d6000803e3d6000fd5b338361267381611dd6565b61267d82826124f2565b6126856125f3565b61268f858561396a565b63ffffffff85166000908152610190602090815260408083208615158452909152812080548692906126c2908490614b5f565b909155505063ffffffff851660009081526101c1602090815260408083208615158452825280832033845290915281208054869290612702908490614b5f565b909155505063ffffffff8516600090815261015a6020526040812054612729906001614b5f565b63ffffffff871660009081526101c0602090815260408083203380855292529182902083905590519192507f50b8727b538cf16daeb79894e8bde5c1e975985071be8a8d7620675a5dddfc6b916111f191899188918a918790614ab9565b6000816127948486614c3c565b61279e9190614ba5565b949350505050565b33836127b181611dd6565b6127bb82826124f2565b6127c36125f3565b63ffffffff8516600090815261018d602090815260408083208615158452909152908190205490516323b872dd60e01b8152336004820152306024820152604481018690526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561283757600080fd5b505af115801561284b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286f9190614409565b5063ffffffff851660009081526101c26020908152604080832086151584528252808320338452909152812080548692906128ab908490614b5f565b909155505063ffffffff8516600090815261015a60205260408120546128d2906001614b5f565b63ffffffff871660008181526101c060209081526040808320338452825280832085905592825261019181528282208815158352905290812080549293508792909190612920908490614b5f565b90915550506040517f191d5f0d51691cdc223884e5321013c9663c6b337a07d550c538d9dcbbd66203906111f19088908790899033908790614ab9565b63ffffffff81166000908152610158602052604090205460ff16610c2d5760405162461bcd60e51b81526020600482015260146024820152731b585c9ad95d08191bd95cdb89dd08195e1a5cdd60621b6044820152606401610cc8565b6000816129cf84670de0b6b3a7640000614c3c565b6129d99190614ba5565b9392505050565b670de0b6b3a7640000821015612a385760405162461bcd60e51b815260206004820152601860248201527f496e73756666696369656e74206d61726b6574207365656400000000000000006044820152606401610cc8565b6000612a45836002614c3c565b9050612a51828261396a565b63ffffffff8216600090815261015e6020526040908190205490516304831f7160e51b8152600481018390526001600160a01b0390911690639063ee2090602401600060405180830381600087803b158015612aac57600080fd5b505af1158015612ac0573d6000803e3d6000fd5b5050505063ffffffff8216600090815261018d6020908152604080832060018452909152908190205490516340c10f1960e01b815273f10a7f10a7f10a7f10a7f10a7f10a7f10a7f10a76004820152602481018590526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015612b4557600080fd5b505af1158015612b59573d6000803e3d6000fd5b5050505063ffffffff8216600090815261018d60209081526040808320838052909152908190205490516340c10f1960e01b815273f10a7f10a7f10a7f10a7f10a7f10a7f10a7f10a76004820152602481018590526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015612bdd57600080fd5b505af1158015612bf1573d6000803e3d6000fd5b5050505063ffffffff91909116600090815261018e602090815260408083206001845290915280822084905581805290209190915550565b600054610100900460ff1680612c42575060005460ff16155b612c5e5760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015612c80576000805461ffff19166101011790555b612c886139ab565b612c90613a2e565b612c9982613a8c565b8015610cdb576000805461ff00191690555050565b63ffffffff82166000908152610159602090815260408083205461018e835281842060018552808452828520548580529352908320549192612cf08385614b5f565b9050600080612d0188878786613b55565b63ffffffff8a16600090815261015e602052604080822054905163452accd960e11b81526004810188905260248101849052939550919350916001600160a01b0390911690638a5599b290604401602060405180830381600087803b158015612d6957600080fd5b505af1158015612d7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612da19190614494565b90508015612dcd578215612dc057612db98188614b5f565b9650612dcd565b612dca8187614b5f565b95505b6000612dd98888613bcd565b90506000612def87670de0b6b3a7640000614bb9565b63ffffffff8c16600090815261015c602052604090205483612e118a8e614c5b565b612e1b9190614bb9565b612e259190614bb9565b612e2f9190614b77565b90506000811215612e8857612e4381614d33565b905088811115612e6b57620186a0612e5e8a6201869f614bb9565b612e689190614b77565b90505b612e75818a614c9a565b9850612e818189614b5f565b9750612ec7565b87811115612eae57620186a0612ea1896201869f614bb9565b612eab9190614b77565b90505b612eb8818a614b5f565b9850612ec48189614c9a565b97505b505050505050509250929050565b63ffffffff8316600090815261019060209081526040808320600184529091528120548190819081908015612f375763ffffffff881660009081526101906020908152604080832060018452909152812055935083612f3481886129ba565b92505b5063ffffffff87166000908152610190602090815260408083208380529091529020548015612f925763ffffffff8816600090815261019060209081526040808320838052909152812055925082612f8f81876129ba565b91505b5063ffffffff871660009081526101926020908152604080832060018452909152902054801561302a576000612fc88289613be3565b9050612fd48187614c5b565b9550612fe08186614b1e565b9450612fec8285614c5b565b9350612ff9828989612787565b6130039084614b1e565b63ffffffff8a16600090815261019260209081526040808320600184529091528120559250505b5063ffffffff871660009081526101926020908152604080832083805290915290205480156130c057600061305f8288613be3565b905061306b8186614c5b565b94506130778187614b1e565b95506130838284614c5b565b925061309082888a612787565b61309a9085614b1e565b63ffffffff8a166000908152610192602090815260408083208380529091528120559350505b5063ffffffff8716600090815261019160209081526040808320600184529091529020548015613130576130f48188613be3565b6130fe9086614c5b565b945061310a8184614c5b565b63ffffffff89166000908152610191602090815260408083206001845290915281205592505b5063ffffffff8716600090815261019160209081526040808320838052909152902054801561319e576131638187613be3565b61316d9085614c5b565b93506131798183614c5b565b63ffffffff891660009081526101916020908152604080832083805290915281205591505b6131b1886131ac8688614b1e565b613bf8565b6131bd88600185613cfc565b6131c988600084613cfc565b505050935093915050565b606060006131e3836002614c3c565b6131ee906002614b5f565b67ffffffffffffffff81111561321457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561323e576020820181803683370190505b509050600360fc1b8160008151811061326757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106132a457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006132c8846002614c3c565b6132d3906001614b5f565b90505b6001811115613367576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061331557634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061333957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361336081614cdd565b90506132d6565b5083156129d95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610cc8565b803b61341a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610cc8565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6134ba5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610cc8565b600080846001600160a01b0316846040516134d59190614864565b600060405180830381855af49150503d8060008114613510576040519150601f19603f3d011682016040523d82523d6000602084013e613515565b606091505b509150915061353d8282604051806060016040528060278152602001614db360279139613e29565b95945050505050565b61354f816133b6565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b63ffffffff831660009081526101c160209081526040808320841515845282528083206001600160a01b0386168452909152902054801561102c5763ffffffff841660008181526101c1602090815260408083208615158085529083528184206001600160a01b03891680865290845282852085905585855261018f84528285209185529083528184209484526101c083528184209084528252808320548352929052908120546136389083906129ba565b63ffffffff8616600090815261018d6020908152604080832087151584529091529081902054905163a9059cbb60e01b81526001600160a01b0387811660048301526024820184905292935091169063a9059cbb90604401602060405180830381600087803b1580156136aa57600080fd5b505af11580156136be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136e29190614409565b505050505050565b63ffffffff831660009081526101c260209081526040808320841515845282528083206001600160a01b0386168452909152902054801561102c5763ffffffff841660008181526101c2602090815260408083208615158085529083528184206001600160a01b03891680865290845282852085905585855261018f84528285209185529083528184209484526101c0835281842090845282528083205483529290529081205461379c908390613be3565b63ffffffff8616600090815261015e6020526040908190205490516375b5ffd160e11b81526001600160a01b0387811660048301526024820184905292935091169063eb6bffa290604401600060405180830381600087803b15801561380157600080fd5b505af1158015613815573d6000803e3d6000fd5b505050505050505050565b63ffffffff831660009081526101c360209081526040808320841515845282528083206001600160a01b0386168452909152902054801561102c5763ffffffff841660009081526101c0602090815260408083206001600160a01b03871684529091528120546138959086908490869061129e565b63ffffffff861660008181526101c3602090815260408083208815801585529083528184206001600160a01b038b811680875291855283862086905595855261018d845282852091855292529182902054915163a9059cbb60e01b8152600481019190915260248101849052929350169063a9059cbb90604401602060405180830381600087803b15801561392957600080fd5b505af115801561393d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139619190614409565b611dcf57600080fd5b63ffffffff808316600090815261015e602090815260408083205461015d90925290912054610cdb926001600160a01b0391821692339216908590613e6216565b600054610100900460ff16806139c4575060005460ff16155b6139e05760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613a02576000805461ffff19166101011790555b613a0a613ebc565b613a12613ebc565b613a1a613ebc565b8015610c2d576000805461ff001916905550565b600054610100900460ff1680613a47575060005460ff16155b613a635760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613a0a576000805461ffff1916610101179055613a12613ebc565b600054610100900460ff1680613aa5575060005460ff16155b613ac15760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613ae3576000805461ffff19166101011790555b6001600160a01b038216613af657600080fd5b613b01600083613f26565b613b2b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583613f26565b612c997f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383613f26565b8183106000808215613b6a5750848403613b6f565b508385035b63ffffffff8716600090815261015b60205260408120548590613b929084614c3c565b613b9c9190614ba5565b90506000613bb282670de0b6b3a7640000613bcd565b905080670de0b6b3a764000003935050505094509492505050565b6000818310613bdc57816129d9565b5090919050565b6000670de0b6b3a76400006129cf8385614c3c565b6000811315613c795763ffffffff8216600090815261015e6020526040908190205490516304831f7160e51b8152600481018390526001600160a01b0390911690639063ee2090602401600060405180830381600087803b158015613c5c57600080fd5b505af1158015613c70573d6000803e3d6000fd5b50505050610cdb565b6000811215610cdb5763ffffffff8216600090815261015e60205260409020546001600160a01b0316631c499b55613cb083614d33565b6040518263ffffffff1660e01b8152600401613cce91815260200190565b600060405180830381600087803b158015613ce857600080fd5b505af11580156136e2573d6000803e3d6000fd5b6000811315613d905763ffffffff8316600090815261018d602090815260408083208515158452909152908190205490516340c10f1960e01b8152306004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015613d7357600080fd5b505af1158015613d87573d6000803e3d6000fd5b50505050610c57565b6000811215610c575763ffffffff8316600090815261018d6020908152604080832085151584529091529020546001600160a01b03166342966c68613dd483614d33565b6040518263ffffffff1660e01b8152600401613df291815260200190565b600060405180830381600087803b158015613e0c57600080fd5b505af1158015613e20573d6000803e3d6000fd5b50505050505050565b60608315613e385750816129d9565b825115613e485782518084602001fd5b8160405162461bcd60e51b8152600401610cc89190614980565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261102c908590613f30565b600054610100900460ff1680613ed5575060005460ff16155b613ef15760405162461bcd60e51b8152600401610cc8906149e7565b600054610100900460ff16158015613a1a576000805461ffff19166101011790558015610c2d576000805461ff001916905550565b610cdb828261222d565b6000613f85826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166140029092919063ffffffff16565b805190915015610c575780806020019051810190613fa39190614409565b610c575760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610cc8565b606061279e848460008585843b61405b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610cc8565b600080866001600160a01b031685876040516140779190614864565b60006040518083038185875af1925050503d80600081146140b4576040519150601f19603f3d011682016040523d82523d6000602084013e6140b9565b606091505b50915091506112e9828286613e29565b60008083601f8401126140da578182fd5b50813567ffffffffffffffff8111156140f1578182fd5b60208301915083602082850101111561410957600080fd5b9250929050565b803563ffffffff81168114610c1f57600080fd5b600060208284031215614135578081fd5b81356129d981614d8f565b600060208284031215614151578081fd5b81516129d981614d8f565b60008060008060808587031215614171578283fd5b843561417c81614d8f565b9350602085013561418c81614d8f565b9250604085013561419c81614d8f565b915060608501356141ac81614d8f565b939692955090935050565b600080604083850312156141c9578182fd5b82356141d481614d8f565b915060208381013567ffffffffffffffff808211156141f1578384fd5b818601915086601f830112614204578384fd5b81358181111561421657614216614d79565b8060051b9150614227848301614aed565b8181528481019084860184860187018b1015614241578788fd5b8795505b8386101561426a5761425681614110565b835260019590950194918601918601614245565b508096505050505050509250929050565b6000806040838503121561428d578182fd5b823561429881614d8f565b915060208381013567ffffffffffffffff808211156142b5578384fd5b818601915086601f8301126142c8578384fd5b8135818111156142da576142da614d79565b6142ec601f8201601f19168501614aed565b91508082528784828501011115614301578485fd5b8084840185840137810190920192909252919491935090915050565b6000806040838503121561432f578182fd5b823561433a81614d8f565b915061434860208401614110565b90509250929050565b600080600060608486031215614365578283fd5b833561437081614d8f565b925061437e60208501614110565b9150604084013561438e81614da4565b809150509250925092565b600080602083850312156143ab578182fd5b823567ffffffffffffffff808211156143c2578384fd5b818501915085601f8301126143d5578384fd5b8135818111156143e3578485fd5b8660208260051b85010111156143f7578485fd5b60209290920196919550909350505050565b60006020828403121561441a578081fd5b81516129d981614da4565b600060208284031215614436578081fd5b5035919050565b6000806040838503121561444f578182fd5b82359150602083013561446181614d8f565b809150509250929050565b60006020828403121561447d578081fd5b81356001600160e01b0319811681146129d9578182fd5b6000602082840312156144a5578081fd5b5051919050565b600080600080600080600060a0888a0312156144c6578485fd5b873567ffffffffffffffff808211156144dd578687fd5b6144e98b838c016140c9565b909950975060208a0135915080821115614501578687fd5b5061450e8a828b016140c9565b909650945050604088013561452281614d8f565b9250606088013561453281614d8f565b9150608088013561454281614d8f565b8091505092959891949750929550565b600080600080600080600080600060e08a8c03121561456f578283fd5b893567ffffffffffffffff80821115614586578485fd5b6145928d838e016140c9565b909b50995060208c01359150808211156145aa578485fd5b506145b78c828d016140c9565b90985096505060408a01356145cb81614d8f565b945060608a01356145db81614d8f565b935060808a01356145eb81614d8f565b925060a08a01356145fb81614d8f565b915060c08a013561460b81614d8f565b809150509295985092959850929598565b60006020828403121561462d578081fd5b6129d982614110565b60008060408385031215614648578182fd5b61465183614110565b9150602083013561446181614d8f565b60008060408385031215614673578182fd5b61467c83614110565b9150602083013561446181614da4565b6000806000606084860312156146a0578081fd5b6146a984614110565b925060208401356146b981614da4565b9150604084013561438e81614d8f565b6000806000606084860312156146dd578081fd5b6146e684614110565b925060208401356146f681614da4565b929592945050506040919091013590565b60008060408385031215614719578182fd5b61472283614110565b946020939093013593505050565b600080600060608486031215614744578081fd5b61474d84614110565b925060208401359150604084013561438e81614da4565b60008060008060808587031215614779578182fd5b61478285614110565b935060208501359250604085013561479981614da4565b9396929550929360600135925050565b60008060008060008060008060006101208a8c0312156147c7578283fd5b6147d08a614110565b9b60208b01359b5060408b01359a60608101359a506080810135995060a0810135985060c0810135975060e081013596506101000135945092505050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452614850816020860160208601614cb1565b601f01601f19169290920160200192915050565b60008251614876818460208701614cb1565b9190910192915050565b600061667360f01b8252828460028401379101600201908152919050565b60006b0233637b0ba1029b437b93a160a51b82528284600c8401379101600c01908152919050565b600061199b60f21b8252828460028401379101600201908152919050565b60007f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008252835161491c816017850160208801614cb1565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161494d816028840160208801614cb1565b01602801949350505050565b60006a0233637b0ba102637b733960ad1b82528284600b8401379101600b01908152919050565b6000602082526129d96020830184614838565b600060a082526149a660a0830188614838565b82810360208401526149b88188614838565b6001600160a01b03969096166040840152505063ffffffff929092166060830152151560809091015292915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b63ffffffff8c1681526001600160a01b038b811660208301528a8116604083015289811660608301526080820189905261012060a08301819052600091614a7f8483018a8c61480e565b915083820360c0850152614a9482888a61480e565b925080861660e085015280851661010085015250509c9b505050505050505050505050565b63ffffffff959095168552921515602085015260408401919091526001600160a01b03166060830152608082015260a00190565b604051601f8201601f1916810167ffffffffffffffff81118282101715614b1657614b16614d79565b604052919050565b600080821280156001600160ff1b0384900385131615614b4057614b40614d4d565b600160ff1b8390038412811615614b5957614b59614d4d565b50500190565b60008219821115614b7257614b72614d4d565b500190565b600082614b8657614b86614d63565b600160ff1b821460001984141615614ba057614ba0614d4d565b500590565b600082614bb457614bb4614d63565b500490565b60006001600160ff1b0381841382841380821686840486111615614bdf57614bdf614d4d565b600160ff1b84871282811687830589121615614bfd57614bfd614d4d565b858712925087820587128484161615614c1857614c18614d4d565b87850587128184161615614c2e57614c2e614d4d565b505050929093029392505050565b6000816000190483118215151615614c5657614c56614d4d565b500290565b60008083128015600160ff1b850184121615614c7957614c79614d4d565b6001600160ff1b0384018313811615614c9457614c94614d4d565b50500390565b600082821015614cac57614cac614d4d565b500390565b60005b83811015614ccc578181015183820152602001614cb4565b8381111561102c5750506000910152565b600081614cec57614cec614d4d565b506000190190565b6000600019821415614d0857614d08614d4d565b5060010190565b600063ffffffff80831681811415614d2957614d29614d4d565b6001019392505050565b6000600160ff1b821415614d4957614d49614d4d565b0390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c2d57600080fd5b8015158114610c2d57600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212209f07d2605481bcc755f92745274a7201e1fd0d05162284474e854bccfb480f5c64736f6c63430008030033", + "devdoc": { + "author": "float.capital", + "custom:auditors": "This contract balances long and short sides.", + "details": "All functions in this file are currently `virtual`. This is NOT to encourage inheritance. It is merely for convenince when unit testing.", + "kind": "dev", + "methods": { + "createNewSyntheticMarket(string,string,address,address,address)": { + "details": "This does not make the market active. The `initializeMarket` function was split out separately to this function to reduce costs.", + "params": { + "_oracleManager": "The address of the oracle manager that provides the price feed for this market", + "_paymentToken": "The address of the erc20 token used to buy this synthetic asset this will likely always be DAI", + "_yieldManager": "The contract that manages depositing the paymentToken into a yield bearing protocol", + "syntheticName": "Name of the synthetic asset", + "syntheticSymbol": "Symbol for the synthetic asset" + } + }, + "createNewSyntheticMarketExternalSyntheticTokens(string,string,address,address,address,address,address)": { + "details": "This does not make the market active. The `initializeMarket` function was split out separately to this function to reduce costs.", + "params": { + "_longToken": "Address for the long token.", + "_oracleManager": "The address of the oracle manager that provides the price feed for this market", + "_paymentToken": "The address of the erc20 token used to buy this synthetic asset this will likely always be DAI", + "_shortToken": "Address for the short token.", + "_yieldManager": "The contract that manages depositing the paymentToken into a yield bearing protocol", + "syntheticName": "Name of the synthetic asset", + "syntheticSymbol": "Symbol for the synthetic asset" + } + }, + "executeOutstandingNextPriceSettlementsUser(address,uint32)": { + "params": { + "marketIndex": "An uint32 which uniquely identifies a market.", + "user": "The address of the user for whom to execute the function." + } + }, + "executeOutstandingNextPriceSettlementsUserMulti(address,uint32[])": { + "params": { + "marketIndexes": "An array of int32s which each uniquely identify a market.", + "user": "The address of the user for whom to execute the function." + } + }, + "getAmountSyntheticTokenToMintOnTargetSide(uint32,uint256,bool,uint256)": { + "details": "Intended for use primarily by Staker.sol", + "params": { + "amountSyntheticToken_redeemOnOriginSide": "Amount of synth token in wei.", + "isShiftFromLong": "Whether the token shift is from long to short (true), or short to long (false).", + "marketIndex": "An uint32 which uniquely identifies a market.", + "priceSnapshotIndex": "Index which identifies which synth prices to use." + }, + "returns": { + "amountSyntheticTokensToMintOnTargetSide": "The amount in wei of tokens for the other side that the shift was worth." + } + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "getUsersConfirmedButNotSettledSynthBalance(address,uint32,bool)": { + "details": "Used in SyntheticToken.sol balanceOf to allow for automatic reflection of next price actions.", + "params": { + "isLong": "Whether it is for the long synthetic asset or the short synthetic asset.", + "marketIndex": "An uint32 which uniquely identifies a market.", + "user": "The address of the user for whom to execute the function for." + }, + "returns": { + "confirmedButNotSettledBalance": "The amount in wei of tokens that the user is owed." + } + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,address,address,address)": { + "details": "Calls OpenZeppelin's initializer modifier.", + "params": { + "_admin": "Address of the admin role.", + "_staker": "Address of the contract which handles synthetic asset stakes.", + "_tokenFactory": "Address of the contract which creates synthetic asset tokens." + } + }, + "initializeMarket(uint32,uint256,uint256,uint256,uint256,uint256,int256,uint256,uint256)": { + "details": "Seperated from createNewSyntheticMarket due to gas considerations.", + "params": { + "balanceIncentiveCurve_equilibriumOffset": "An offset to account for naturally imbalanced markets when Float token issuance should differ for market sides. See Staker.sol", + "balanceIncentiveCurve_exponent": "Sets the degree to which Float token issuance differs for market sides in unbalanced markets. See Staker.sol", + "initialMarketSeedForEachMarketSide": "Amount of payment token that will be deposited in each market side to seed the market.", + "kInitialMultiplier": "Linearly decreasing multiplier for Float token issuance for the market when staking synths.", + "kPeriod": "Time which kInitialMultiplier will last", + "marketIndex": "An int32 which uniquely identifies the market.", + "unstakeFee_e18": "Base 1e18 percentage fee levied when unstaking for the market." + } + }, + "mintLongNextPrice(uint32,uint256)": { + "params": { + "amount": "Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.", + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "mintShortNextPrice(uint32,uint256)": { + "params": { + "amount": "Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.", + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "redeemLongNextPrice(uint32,uint256)": { + "params": { + "marketIndex": "An uint32 which uniquely identifies a market.", + "tokens_redeem": "Amount in wei of synth tokens to redeem at the next oracle price." + } + }, + "redeemShortNextPrice(uint32,uint256)": { + "params": { + "marketIndex": "An uint32 which uniquely identifies a market.", + "tokens_redeem": "Amount in wei of synth tokens to redeem at the next oracle price." + } + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "shiftPositionFromLongNextPrice(uint32,uint256)": { + "params": { + "amountSyntheticTokensToShift": "Amount in wei of synthetic tokens to shift from long to short the next oracle price update.", + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "shiftPositionFromShortNextPrice(uint32,uint256)": { + "params": { + "amountSyntheticTokensToShift": "Amount in wei of synthetic tokens to shift from the short to long at the next oracle price update.", + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "shiftPositionNextPrice(uint32,uint256,bool)": { + "details": "Called by external functions to shift either way. Intended for primary use by Staker.sol", + "params": { + "amountSyntheticTokensToShift": "Amount in wei of synthetic tokens to shift from the one side to the other at the next oracle price update.", + "isShiftFromLong": "Whether the token shift is from long to short (true), or short to long (false).", + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "updateMarketOracle(uint32,address)": { + "details": "Can only be called by the current admin.", + "params": { + "_newOracleManager": "Address of the replacement oracle manager.", + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "updateSystemState(uint32)": { + "params": { + "marketIndex": "An uint32 which uniquely identifies a market." + } + }, + "updateSystemStateMulti(uint32[])": { + "params": { + "marketIndexes": "An array of int32s which uniquely identify markets." + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "stateVariables": { + "PERMANENT_INITIAL_LIQUIDITY_HOLDER": { + "details": "f10a7 spells float in hex - for fun - important part is that the private key for this address in not known." + }, + "__constantsGap": { + "details": "an empty allocation of storage for use in future upgrades - inspiration from OZ: https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/10f0f1a95b1b0fd5520351886bae7a03490f1056/contracts/token/ERC20/ERC20Upgradeable.sol#L361" + } + }, + "title": "Core logic of Float Protocal markets", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "PERMANENT_INITIAL_LIQUIDITY_HOLDER()": { + "notice": "this is the address that permanently locked initial liquidity for markets is held by. These tokens will never move so market can never have zero liquidity on a side." + }, + "changeMarketTreasurySplitGradient(uint32,uint256)": { + "notice": "changes the gradient of the line for determining the yield split between market and treasury." + }, + "createNewSyntheticMarket(string,string,address,address,address)": { + "notice": "Creates an entirely new long/short market tracking an underlying oracle price. Make sure the synthetic names/symbols are unique." + }, + "createNewSyntheticMarketExternalSyntheticTokens(string,string,address,address,address,address,address)": { + "notice": "Creates an entirely new long/short market tracking an underlying oracle price. Uses already created synthetic tokens." + }, + "executeOutstandingNextPriceSettlementsUser(address,uint32)": { + "notice": "After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user." + }, + "executeOutstandingNextPriceSettlementsUserMulti(address,uint32[])": { + "notice": "Executes outstanding next price settlements for a user for multiple markets." + }, + "getAmountSyntheticTokenToMintOnTargetSide(uint32,uint256,bool,uint256)": { + "notice": "Given an executed next price shift from tokens on one market side to the other, determines how many other side tokens the shift was worth." + }, + "getUsersConfirmedButNotSettledSynthBalance(address,uint32,bool)": { + "notice": "The amount of a synth token a user is owed following a batch execution. 4 possible states for next price actions: - \"Pending\" - means the next price update hasn't happened or been enacted on by the updateSystemState function. - \"Confirmed\" - means the next price has been updated by the updateSystemState function. There is still - outstanding (lazy) computation that needs to be executed per user in the batch. - \"Settled\" - there is no more computation left for the user. - \"Non-existent\" - user has no next price actions. This function returns a calculated value only in the case of 'confirmed' next price actions. It should return zero for all other types of next price actions." + }, + "initialize(address,address,address,address)": { + "notice": "Initializes the contract." + }, + "initializeMarket(uint32,uint256,uint256,uint256,uint256,uint256,int256,uint256,uint256)": { + "notice": "Sets a market as active once it has already been setup by createNewSyntheticMarket." + }, + "mintLongNextPrice(uint32,uint256)": { + "notice": "Allows users to mint long synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle." + }, + "mintShortNextPrice(uint32,uint256)": { + "notice": "Allows users to mint short synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle." + }, + "redeemLongNextPrice(uint32,uint256)": { + "notice": "Allows users to redeem long synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle." + }, + "redeemShortNextPrice(uint32,uint256)": { + "notice": "Allows users to redeem short synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle." + }, + "shiftPositionFromLongNextPrice(uint32,uint256)": { + "notice": "Allows users to shift their position from long to short in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle." + }, + "shiftPositionFromShortNextPrice(uint32,uint256)": { + "notice": "Allows users to shift their position from short to long in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle." + }, + "shiftPositionNextPrice(uint32,uint256,bool)": { + "notice": "Allows users to shift their position from one side of the market to the other in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle." + }, + "syntheticToken_priceSnapshot(uint32,bool,uint256)": { + "notice": "synthetic token prices of a given market of a (long/short) at every previous price update" + }, + "updateMarketOracle(uint32,address)": { + "notice": "Update oracle for a market" + }, + "updateSystemState(uint32)": { + "notice": "Updates the state of a market to account for the latest oracle price update." + }, + "updateSystemStateMulti(uint32[])": { + "notice": "Updates the state of multiples markets to account for their latest oracle price updates." + } + }, + "notice": "visit https://float.capital for more info", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/LongShort.sol:LongShort", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/LongShort.sol:LongShort", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/LongShort.sol:LongShort", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 10689, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__constantsGap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 10691, + "contract": "contracts/LongShort.sol:LongShort", + "label": "latestMarket", + "offset": 0, + "slot": "296", + "type": "t_uint32" + }, + { + "astId": 10693, + "contract": "contracts/LongShort.sol:LongShort", + "label": "staker", + "offset": 4, + "slot": "296", + "type": "t_address" + }, + { + "astId": 10695, + "contract": "contracts/LongShort.sol:LongShort", + "label": "tokenFactory", + "offset": 0, + "slot": "297", + "type": "t_address" + }, + { + "astId": 10697, + "contract": "contracts/LongShort.sol:LongShort", + "label": "gems", + "offset": 0, + "slot": "298", + "type": "t_address" + }, + { + "astId": 10701, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__globalStateGap", + "offset": 0, + "slot": "299", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 10705, + "contract": "contracts/LongShort.sol:LongShort", + "label": "marketExists", + "offset": 0, + "slot": "344", + "type": "t_mapping(t_uint32,t_bool)" + }, + { + "astId": 10709, + "contract": "contracts/LongShort.sol:LongShort", + "label": "assetPrice", + "offset": 0, + "slot": "345", + "type": "t_mapping(t_uint32,t_int256)" + }, + { + "astId": 10714, + "contract": "contracts/LongShort.sol:LongShort", + "label": "marketUpdateIndex", + "offset": 0, + "slot": "346", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 10718, + "contract": "contracts/LongShort.sol:LongShort", + "label": "marketTreasurySplitGradient_e18", + "offset": 0, + "slot": "347", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 10722, + "contract": "contracts/LongShort.sol:LongShort", + "label": "marketLeverage_e18", + "offset": 0, + "slot": "348", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 10726, + "contract": "contracts/LongShort.sol:LongShort", + "label": "paymentTokens", + "offset": 0, + "slot": "349", + "type": "t_mapping(t_uint32,t_address)" + }, + { + "astId": 10730, + "contract": "contracts/LongShort.sol:LongShort", + "label": "yieldManagers", + "offset": 0, + "slot": "350", + "type": "t_mapping(t_uint32,t_address)" + }, + { + "astId": 10734, + "contract": "contracts/LongShort.sol:LongShort", + "label": "oracleManagers", + "offset": 0, + "slot": "351", + "type": "t_mapping(t_uint32,t_address)" + }, + { + "astId": 10738, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__marketStateGap", + "offset": 0, + "slot": "352", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 10745, + "contract": "contracts/LongShort.sol:LongShort", + "label": "syntheticTokens", + "offset": 0, + "slot": "397", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_address))" + }, + { + "astId": 10752, + "contract": "contracts/LongShort.sol:LongShort", + "label": "marketSideValueInPaymentToken", + "offset": 0, + "slot": "398", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_uint256))" + }, + { + "astId": 10762, + "contract": "contracts/LongShort.sol:LongShort", + "label": "syntheticToken_priceSnapshot", + "offset": 0, + "slot": "399", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_uint256,t_uint256)))" + }, + { + "astId": 10768, + "contract": "contracts/LongShort.sol:LongShort", + "label": "batched_amountPaymentToken_deposit", + "offset": 0, + "slot": "400", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_uint256))" + }, + { + "astId": 10774, + "contract": "contracts/LongShort.sol:LongShort", + "label": "batched_amountSyntheticToken_redeem", + "offset": 0, + "slot": "401", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_uint256))" + }, + { + "astId": 10780, + "contract": "contracts/LongShort.sol:LongShort", + "label": "batched_amountSyntheticToken_toShiftAwayFrom_marketSide", + "offset": 0, + "slot": "402", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_uint256))" + }, + { + "astId": 10784, + "contract": "contracts/LongShort.sol:LongShort", + "label": "__marketPositonStateGap", + "offset": 0, + "slot": "403", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 10790, + "contract": "contracts/LongShort.sol:LongShort", + "label": "userNextPrice_currentUpdateIndex", + "offset": 0, + "slot": "448", + "type": "t_mapping(t_uint32,t_mapping(t_address,t_uint256))" + }, + { + "astId": 10798, + "contract": "contracts/LongShort.sol:LongShort", + "label": "userNextPrice_paymentToken_depositAmount", + "offset": 0, + "slot": "449", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))" + }, + { + "astId": 10806, + "contract": "contracts/LongShort.sol:LongShort", + "label": "userNextPrice_syntheticToken_redeemAmount", + "offset": 0, + "slot": "450", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))" + }, + { + "astId": 10814, + "contract": "contracts/LongShort.sol:LongShort", + "label": "userNextPrice_syntheticToken_toShiftAwayFrom_marketSide", + "offset": 0, + "slot": "451", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_int256": { + "encoding": "inplace", + "label": "int256", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bool,t_address)": { + "encoding": "mapping", + "key": "t_bool", + "label": "mapping(bool => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bool,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_bool", + "label": "mapping(bool => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_bool,t_mapping(t_uint256,t_uint256))": { + "encoding": "mapping", + "key": "t_bool", + "label": "mapping(bool => mapping(uint256 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_uint256)" + }, + "t_mapping(t_bool,t_uint256)": { + "encoding": "mapping", + "key": "t_bool", + "label": "mapping(bool => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint32,t_address)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint32,t_bool)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint32,t_int256)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => int256)", + "numberOfBytes": "32", + "value": "t_int256" + }, + "t_mapping(t_uint32,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_uint32,t_mapping(t_bool,t_address))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(bool => address))", + "numberOfBytes": "32", + "value": "t_mapping(t_bool,t_address)" + }, + "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(bool => mapping(address => uint256)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bool,t_mapping(t_address,t_uint256))" + }, + "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_uint256,t_uint256)))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(bool => mapping(uint256 => uint256)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bool,t_mapping(t_uint256,t_uint256))" + }, + "t_mapping(t_uint32,t_mapping(t_bool,t_uint256))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(bool => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_bool,t_uint256)" + }, + "t_mapping(t_uint32,t_uint256)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/LongShort.sol:LongShort", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/LongShort.sol:LongShort", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/polygon/LongShort_Proxy.json b/deployments/polygon/LongShort_Proxy.json new file mode 100644 index 0000000..b766f55 --- /dev/null +++ b/deployments/polygon/LongShort_Proxy.json @@ -0,0 +1,147 @@ +{ + "address": "0x168a5d1217AEcd258b03018d5bF1A1677A07b733", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x5d1cfda7d535fc9639b0d951ae06259ca24960b5215cae527e1c4a450cae2506", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x168a5d1217AEcd258b03018d5bF1A1677A07b733", + "transactionIndex": 34, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000400000000020000000000000400000000000000000001000020000000000000000008000000000000000000000000000000004000000000000000000000002800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000200000000000000800000000000000000000000000000000000000000000000200000000000000000000000000000000000200000000000000000000000004000000020000008000001000000000000000000000000000000100000000001000000000000000200000000000000000000000000008000000000000000100000", + "blockHash": "0x764f3a89dd5e52dfb935fe21694a33679747edf2e197d1fdf2d3ea7f52343e82", + "transactionHash": "0x5d1cfda7d535fc9639b0d951ae06259ca24960b5215cae527e1c4a450cae2506", + "logs": [ + { + "transactionIndex": 34, + "blockNumber": 19059206, + "transactionHash": "0x5d1cfda7d535fc9639b0d951ae06259ca24960b5215cae527e1c4a450cae2506", + "address": "0x168a5d1217AEcd258b03018d5bF1A1677A07b733", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000045bdab6840929937619d44fd2e8def962d8d2882" + ], + "data": "0x", + "logIndex": 55, + "blockHash": "0x764f3a89dd5e52dfb935fe21694a33679747edf2e197d1fdf2d3ea7f52343e82" + }, + { + "transactionIndex": 34, + "blockNumber": 19059206, + "transactionHash": "0x5d1cfda7d535fc9639b0d951ae06259ca24960b5215cae527e1c4a450cae2506", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x0000000000000000000000000000000000000000000000000008cdb3599d34000000000000000000000000000000000000000000000000000cfca7c2de2d2b42000000000000000000000000000000000000000000006e1fe683a5e6be422bb90000000000000000000000000000000000000000000000000cf3da0f848ff742000000000000000000000000000000000000000000006e1fe68c739a17df5fb9", + "logIndex": 56, + "blockHash": "0x764f3a89dd5e52dfb935fe21694a33679747edf2e197d1fdf2d3ea7f52343e82" + } + ], + "blockNumber": 19059206, + "cumulativeGasUsed": "2063735", + "status": 1, + "byzantium": true + }, + "args": [ + "0x45BdAB6840929937619d44Fd2E8DEf962D8D2882", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0x" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/OracleManagerF3.json b/deployments/polygon/OracleManagerF3.json new file mode 100644 index 0000000..521ab1e --- /dev/null +++ b/deployments/polygon/OracleManagerF3.json @@ -0,0 +1,222 @@ +{ + "address": "0x70a760ACD5503A8D6746BC7F00571F570ae0aD44", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ethMarketCapFeed", + "type": "address" + }, + { + "internalType": "address", + "name": "_btcMarketCapFeed", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "btcMarketCapFeed", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ethMarketCapFeed", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLatestPrice", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "priceData", + "outputs": [ + { + "internalType": "uint80", + "name": "lastRoundEth", + "type": "uint80" + }, + { + "internalType": "uint80", + "name": "lastRoundBtc", + "type": "uint80" + }, + { + "internalType": "uint128", + "name": "price", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updatePrice", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x2a878bf4795e4e985a158e7070021ef684ea0a43d08dead63e143f23799a7f5b", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x70a760ACD5503A8D6746BC7F00571F570ae0aD44", + "transactionIndex": 282, + "gasUsed": "463622", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000002000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000010000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000008000001000000000000000000000000000000100000000000000000000000000200000000000000000000000000000000000000040000100000", + "blockHash": "0xe75ec9e27bf82efb65304f80ff211e5c5fe12da001aa9d0302e9a9e1c9516239", + "transactionHash": "0x2a878bf4795e4e985a158e7070021ef684ea0a43d08dead63e143f23799a7f5b", + "logs": [ + { + "transactionIndex": 282, + "blockNumber": 19059803, + "transactionHash": "0x2a878bf4795e4e985a158e7070021ef684ea0a43d08dead63e143f23799a7f5b", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000b79fad4ca981472442f53d16365fdf0305ffd8e9" + ], + "data": "0x0000000000000000000000000000000000000000000000000010789e163358000000000000000000000000000000000000000000000000000bb9d9891a08e742000000000000000000000000000000000000000000004300cb311e28b796bebd0000000000000000000000000000000000000000000000000ba960eb03d58f42000000000000000000000000000000000000000000004300cb4196c6cdca16bd", + "logIndex": 420, + "blockHash": "0xe75ec9e27bf82efb65304f80ff211e5c5fe12da001aa9d0302e9a9e1c9516239" + } + ], + "blockNumber": 19059803, + "cumulativeGasUsed": "19770275", + "status": 1, + "byzantium": true + }, + "args": [ + "0x67935f65D1577ced9f4929D3679A157E95C1c02c", + "0x18E4058491C3F58bC2f747A9E64cA256Ed6B318d" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ethMarketCapFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_btcMarketCapFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"btcMarketCapFeed\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ethMarketCapFeed\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestPrice\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceData\",\"outputs\":[{\"internalType\":\"uint80\",\"name\":\"lastRoundEth\",\"type\":\"uint80\"},{\"internalType\":\"uint80\",\"name\":\"lastRoundBtc\",\"type\":\"uint80\"},{\"internalType\":\"uint128\",\"name\":\"price\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatePrice\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/oracles/OracleManagerFlipp3ning.sol\":\"OracleManagerFlipp3ning\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface AggregatorV3Interface {\\n\\n function decimals()\\n external\\n view\\n returns (\\n uint8\\n );\\n\\n function description()\\n external\\n view\\n returns (\\n string memory\\n );\\n\\n function version()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(\\n uint80 _roundId\\n )\\n external\\n view\\n returns (\\n uint80 roundId,\\n int256 answer,\\n uint256 startedAt,\\n uint256 updatedAt,\\n uint80 answeredInRound\\n );\\n\\n function latestRoundData()\\n external\\n view\\n returns (\\n uint80 roundId,\\n int256 answer,\\n uint256 startedAt,\\n uint256 updatedAt,\\n uint80 answeredInRound\\n );\\n\\n}\\n\",\"keccak256\":\"0xe6f5ac8c47f3b9b6135051efb9216f9ba5b312a6ecc20209b4f66a780443c328\",\"license\":\"MIT\"},\"contracts/interfaces/IOracleManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/*\\n * Manages price feeds from different oracle implementations.\\n */\\ninterface IOracleManager {\\n function updatePrice() external returns (int256);\\n\\n /*\\n *Returns the latest price from the oracle feed.\\n */\\n function getLatestPrice() external view returns (int256);\\n}\\n\",\"keccak256\":\"0x257b71cc5a9394ba0ea022556bf1f38012046c5ca568ff0d73ce6cf95c278376\",\"license\":\"BUSL-1.1\"},\"contracts/oracles/OracleManagerFlipp3ning.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\\\";\\nimport \\\"../interfaces/IOracleManager.sol\\\";\\n\\ncontract OracleManagerFlipp3ning is IOracleManager {\\n address public ethMarketCapFeed;\\n address public btcMarketCapFeed;\\n\\n struct PriceData {\\n uint80 lastRoundEth;\\n uint80 lastRoundBtc;\\n uint128 price;\\n }\\n\\n PriceData public priceData;\\n\\n constructor(address _ethMarketCapFeed, address _btcMarketCapFeed) {\\n ethMarketCapFeed = _ethMarketCapFeed;\\n btcMarketCapFeed = _btcMarketCapFeed;\\n\\n require(\\n AggregatorV3Interface(ethMarketCapFeed).decimals() ==\\n AggregatorV3Interface(btcMarketCapFeed).decimals(),\\n \\\"Decimals for feeds are different!\\\"\\n );\\n\\n (uint80 _ethRound, uint80 _btcRound, int256 _ethMarketCap, int256 _btcMarketCap) = _feedData();\\n\\n priceData.price = _dominance(_ethMarketCap, _btcMarketCap);\\n priceData.lastRoundEth = _ethRound;\\n priceData.lastRoundBtc = _btcRound;\\n }\\n\\n function _feedData()\\n internal\\n view\\n returns (\\n uint80 ethRound,\\n uint80 btcRound,\\n int256 ethPrice,\\n int256 btcPrice\\n )\\n {\\n (ethRound, ethPrice, , , ) = AggregatorV3Interface(ethMarketCapFeed).latestRoundData();\\n (btcRound, btcPrice, , , ) = AggregatorV3Interface(btcMarketCapFeed).latestRoundData();\\n }\\n\\n function _dominance(int256 _ethMarketCap, int256 _btcMarketCap) internal view returns (uint128) {\\n // reverts if btc market cap == 0\\n return uint128(uint256((_ethMarketCap * 1e20) / _btcMarketCap));\\n }\\n\\n function getLatestPrice() external view override returns (int256) {\\n return int256(uint256(priceData.price));\\n }\\n\\n function updatePrice() external override returns (int256) {\\n (uint80 _ethRound, uint80 _btcRound, int256 _ethMarketCap, int256 _btcMarketCap) = _feedData();\\n\\n if (_ethRound == priceData.lastRoundEth || _btcRound == priceData.lastRoundBtc) {\\n return int256(uint256(priceData.price));\\n }\\n\\n uint128 price = _dominance(_ethMarketCap, _btcMarketCap);\\n priceData.price = price;\\n priceData.lastRoundEth = _ethRound;\\n priceData.lastRoundBtc = _btcRound;\\n\\n return int256(uint256(price));\\n }\\n}\\n\",\"keccak256\":\"0x35cc780040d4605e9c5f64d25f10fb94cad7439c6c0af75b37d8294379ccec41\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000a1738038062000a178339810160408190526200003491620003ca565b600080546001600160a01b038085166001600160a01b0319928316179092556001805492841692909116821790556040805163313ce56760e01b8152905163313ce56791600480820192602092909190829003018186803b1580156200009957600080fd5b505afa158015620000ae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d4919062000455565b60ff1660008054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200012457600080fd5b505afa15801562000139573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200015f919062000455565b60ff1614620001be5760405162461bcd60e51b815260206004820152602160248201527f446563696d616c7320666f722066656564732061726520646966666572656e746044820152602160f81b606482015260840160405180910390fd5b6000808080620001cd62000247565b9350935093509350620001e782826200036a60201b60201c565b600380546001600160801b03929092166001600160801b03199092169190911790555050600280546001600160501b039283166a0100000000000000000000026001600160a01b03199091169390921692909217179055506200055b9050565b60008060008060008054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156200029a57600080fd5b505afa158015620002af573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002d5919062000401565b505060015460408051633fabe5a360e21b815290519498509295506001600160a01b03169263feaf968c926004808201935060a09291829003018186803b1580156200032057600080fd5b505afa15801562000335573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200035b919062000401565b50969792965093945092509050565b600081620003828468056bc75e2d63100000620004b6565b6200038e919062000478565b9392505050565b80516001600160a01b0381168114620003ad57600080fd5b919050565b80516001600160501b0381168114620003ad57600080fd5b60008060408385031215620003dd578182fd5b620003e88362000395565b9150620003f86020840162000395565b90509250929050565b600080600080600060a0868803121562000419578081fd5b6200042486620003b2565b94506020860151935060408601519250606086015191506200044960808701620003b2565b90509295509295909350565b60006020828403121562000467578081fd5b815160ff811681146200038e578182fd5b6000826200049457634e487b7160e01b81526012600452602481fd5b600160ff1b821460001984141615620004b157620004b162000545565b500590565b60006001600160ff1b0381841382841380821686840486111615620004df57620004df62000545565b600160ff1b8487128281168783058912161562000500576200050062000545565b8587129250878205871284841616156200051e576200051e62000545565b8785058712818416161562000537576200053762000545565b505050929093029392505050565b634e487b7160e01b600052601160045260246000fd5b6104ac806200056b6000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063646d87d81461005c578063673a7e281461008c57806376b33c9e146100a25780638e15f473146100b5578063e61a5fe4146100c6575b600080fd5b60005461006f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b610094610121565b604051908152602001610083565b60015461006f906001600160a01b031681565b6003546001600160801b0316610094565b6002546003546100f2916001600160501b0380821692600160501b90920416906001600160801b031683565b604080516001600160501b0394851681529390921660208401526001600160801b031690820152606001610083565b60008060008060006101316101f6565b600254939750919550935091506001600160501b038086169116148061016b57506002546001600160501b03848116600160501b90920416145b156101885750506003546001600160801b031692506101f3915050565b60006101948383610311565b600380546001600160801b039092166fffffffffffffffffffffffffffffffff1990921682179055600280546001600160501b03968716600160501b026001600160a01b03199091169690971695909517959095179093555091925050505b90565b60008060008060008054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561024857600080fd5b505afa15801561025c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102809190610354565b505060015460408051633fabe5a360e21b815290519498509295506001600160a01b03169263feaf968c926004808201935060a09291829003018186803b1580156102ca57600080fd5b505afa1580156102de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103029190610354565b50969792965093945092509050565b6000816103278468056bc75e2d631000006103dd565b61033191906103a3565b9392505050565b80516001600160501b038116811461034f57600080fd5b919050565b600080600080600060a0868803121561036b578081fd5b61037486610338565b945060208601519350604086015192506060860151915061039760808701610338565b90509295509295909350565b6000826103be57634e487b7160e01b81526012600452602481fd5b600160ff1b8214600019841416156103d8576103d8610460565b500590565b60006001600160ff1b038184138284138082168684048611161561040357610403610460565b600160ff1b8487128281168783058912161561042157610421610460565b85871292508782058712848416161561043c5761043c610460565b8785058712818416161561045257610452610460565b505050929093029392505050565b634e487b7160e01b600052601160045260246000fdfea26469706673582212206d649eef03961841b6e2b580f0c4238dbe2c55935138b5cffc5b4fea515cfb4464736f6c63430008030033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063646d87d81461005c578063673a7e281461008c57806376b33c9e146100a25780638e15f473146100b5578063e61a5fe4146100c6575b600080fd5b60005461006f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b610094610121565b604051908152602001610083565b60015461006f906001600160a01b031681565b6003546001600160801b0316610094565b6002546003546100f2916001600160501b0380821692600160501b90920416906001600160801b031683565b604080516001600160501b0394851681529390921660208401526001600160801b031690820152606001610083565b60008060008060006101316101f6565b600254939750919550935091506001600160501b038086169116148061016b57506002546001600160501b03848116600160501b90920416145b156101885750506003546001600160801b031692506101f3915050565b60006101948383610311565b600380546001600160801b039092166fffffffffffffffffffffffffffffffff1990921682179055600280546001600160501b03968716600160501b026001600160a01b03199091169690971695909517959095179093555091925050505b90565b60008060008060008054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561024857600080fd5b505afa15801561025c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102809190610354565b505060015460408051633fabe5a360e21b815290519498509295506001600160a01b03169263feaf968c926004808201935060a09291829003018186803b1580156102ca57600080fd5b505afa1580156102de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103029190610354565b50969792965093945092509050565b6000816103278468056bc75e2d631000006103dd565b61033191906103a3565b9392505050565b80516001600160501b038116811461034f57600080fd5b919050565b600080600080600060a0868803121561036b578081fd5b61037486610338565b945060208601519350604086015192506060860151915061039760808701610338565b90509295509295909350565b6000826103be57634e487b7160e01b81526012600452602481fd5b600160ff1b8214600019841416156103d8576103d8610460565b500590565b60006001600160ff1b038184138284138082168684048611161561040357610403610460565b600160ff1b8487128281168783058912161561042157610421610460565b85871292508782058712848416161561043c5761043c610460565b8785058712818416161561045257610452610460565b505050929093029392505050565b634e487b7160e01b600052601160045260246000fdfea26469706673582212206d649eef03961841b6e2b580f0c4238dbe2c55935138b5cffc5b4fea515cfb4464736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 20260, + "contract": "contracts/oracles/OracleManagerFlipp3ning.sol:OracleManagerFlipp3ning", + "label": "ethMarketCapFeed", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 20262, + "contract": "contracts/oracles/OracleManagerFlipp3ning.sol:OracleManagerFlipp3ning", + "label": "btcMarketCapFeed", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 20272, + "contract": "contracts/oracles/OracleManagerFlipp3ning.sol:OracleManagerFlipp3ning", + "label": "priceData", + "offset": 0, + "slot": "2", + "type": "t_struct(PriceData)20269_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_struct(PriceData)20269_storage": { + "encoding": "inplace", + "label": "struct OracleManagerFlipp3ning.PriceData", + "members": [ + { + "astId": 20264, + "contract": "contracts/oracles/OracleManagerFlipp3ning.sol:OracleManagerFlipp3ning", + "label": "lastRoundEth", + "offset": 0, + "slot": "0", + "type": "t_uint80" + }, + { + "astId": 20266, + "contract": "contracts/oracles/OracleManagerFlipp3ning.sol:OracleManagerFlipp3ning", + "label": "lastRoundBtc", + "offset": 10, + "slot": "0", + "type": "t_uint80" + }, + { + "astId": 20268, + "contract": "contracts/oracles/OracleManagerFlipp3ning.sol:OracleManagerFlipp3ning", + "label": "price", + "offset": 0, + "slot": "1", + "type": "t_uint128" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint80": { + "encoding": "inplace", + "label": "uint80", + "numberOfBytes": "10" + } + } + } +} \ No newline at end of file diff --git a/deployments/polygon/SLF3.json b/deployments/polygon/SLF3.json new file mode 100644 index 0000000..229fcfc --- /dev/null +++ b/deployments/polygon/SLF3.json @@ -0,0 +1,962 @@ +{ + "address": "0xb10ffC060cc7659f0726c8452a586e30338145cF", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xb10ffC060cc7659f0726c8452a586e30338145cF", + "transactionIndex": 21, + "gasUsed": "517306", + "logsBloom": "0x00008004000002000000000000000000400000000400020000000000400000000000000000000000000000008000044000008000000000000000000000000000000000000000000000000041000002800000000000000000000100000000000000000000020002000000000000000800000000000000000080010000001000000000000000000000000000000000000000000000000010000000000000000000200000000000000000000000000000008000000000000000001000000000004000000020000008000001000000000000001000001000000100100000000020000080000000000200000000000000000000000000000000000000040000100000", + "blockHash": "0x0689111fe3813d00b996933d5b1f6a5f18d5b29a33f03bcdce5c10c1dbd6c340", + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "logs": [ + { + "transactionIndex": 21, + "blockNumber": 19059796, + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "address": "0xb10ffC060cc7659f0726c8452a586e30338145cF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000f8908ac067d1764281d482b0e278ad2ec431b4a9" + ], + "data": "0x", + "logIndex": 148, + "blockHash": "0x0689111fe3813d00b996933d5b1f6a5f18d5b29a33f03bcdce5c10c1dbd6c340" + }, + { + "transactionIndex": 21, + "blockNumber": 19059796, + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "address": "0xb10ffC060cc7659f0726c8452a586e30338145cF", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 149, + "blockHash": "0x0689111fe3813d00b996933d5b1f6a5f18d5b29a33f03bcdce5c10c1dbd6c340" + }, + { + "transactionIndex": 21, + "blockNumber": 19059796, + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "address": "0xb10ffC060cc7659f0726c8452a586e30338145cF", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 150, + "blockHash": "0x0689111fe3813d00b996933d5b1f6a5f18d5b29a33f03bcdce5c10c1dbd6c340" + }, + { + "transactionIndex": 21, + "blockNumber": 19059796, + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "address": "0xb10ffC060cc7659f0726c8452a586e30338145cF", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 151, + "blockHash": "0x0689111fe3813d00b996933d5b1f6a5f18d5b29a33f03bcdce5c10c1dbd6c340" + }, + { + "transactionIndex": 21, + "blockNumber": 19059796, + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000b79fad4ca981472442f53d16365fdf0305ffd8e9" + ], + "data": "0x000000000000000000000000000000000000000000000000001260dee3b3a8000000000000000000000000000000000000000000000000000bcc3a67fdbc8f420000000000000000000000000000000000000000000043007d48d7ec2b3980c20000000000000000000000000000000000000000000000000bb9d9891a08e7420000000000000000000000000000000000000000000043007d5b38cb0eed28c2", + "logIndex": 152, + "blockHash": "0x0689111fe3813d00b996933d5b1f6a5f18d5b29a33f03bcdce5c10c1dbd6c340" + } + ], + "blockNumber": 19059796, + "cumulativeGasUsed": "4980539", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf8908aC067D1764281d482b0E278ad2eC431b4A9", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733000000000000000000000000e7c89eb987c415b4233789e5cec0ee7407d2c47f000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000015466c6f6174204c6f6e6720466c697070336e696e6700000000000000000000000000000000000000000000000000000000000000000000000000000000000004666c463300000000000000000000000000000000000000000000000000000000" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "Float Long Flipp3ning", + "flF3", + "0x168a5d1217AEcd258b03018d5bF1A1677A07b733", + "0xe7C89eb987c415B4233789E5ceC0eE7407d2C47F", + 1, + true + ] + }, + "implementation": "0xf8908aC067D1764281d482b0E278ad2eC431b4A9", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/SLF3_Implementation.json b/deployments/polygon/SLF3_Implementation.json new file mode 100644 index 0000000..f99420d --- /dev/null +++ b/deployments/polygon/SLF3_Implementation.json @@ -0,0 +1,1318 @@ +{ + "address": "0xf8908aC067D1764281d482b0E278ad2eC431b4A9", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x5103710b650fd3f743e9726d7266aa908e3c826fb5e736a14f51f2c6b36feff7", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xf8908aC067D1764281d482b0E278ad2eC431b4A9", + "transactionIndex": 25, + "gasUsed": "2450492", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000002000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000010000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000008000001000000000000000000000000000000100000000000000000000000000200000000000000000000000000000000000000040000100000", + "blockHash": "0x2d83ea4c884c87344b4fc83ebeddccf28c69c87e810b7d7719c8539add53d823", + "transactionHash": "0x5103710b650fd3f743e9726d7266aa908e3c826fb5e736a14f51f2c6b36feff7", + "logs": [ + { + "transactionIndex": 25, + "blockNumber": 19059791, + "transactionHash": "0x5103710b650fd3f743e9726d7266aa908e3c826fb5e736a14f51f2c6b36feff7", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000b79fad4ca981472442f53d16365fdf0305ffd8e9" + ], + "data": "0x00000000000000000000000000000000000000000000000000570f184bd970000000000000000000000000000000000000000000000000000c2349804995ff420000000000000000000000000000000000000000000043006aa5004c68087f1d0000000000000000000000000000000000000000000000000bcc3a67fdbc8f420000000000000000000000000000000000000000000043006afc0f64b3e1ef1d", + "logIndex": 132, + "blockHash": "0x2d83ea4c884c87344b4fc83ebeddccf28c69c87e810b7d7719c8539add53d823" + } + ], + "blockNumber": 19059791, + "cumulativeGasUsed": "6545850", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staker\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"_isLong\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isLong\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staker\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.\",\"params\":{\"account\":\"The address for which to get the balance of.\"}},\"burn(uint256)\":{\"details\":\"Modified to only allow Long Short to burn tokens on redeem.\",\"params\":{\"amount\":\"The amount of tokens to burn in wei.\"}},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"details\":\"Should only be called by TokenFactory.sol for our system.\",\"params\":{\"_isLong\":\"Whether the token is long or short for its market.\",\"_longShort\":\"Address of the core LongShort contract.\",\"_marketIndex\":\"Which market the token is for.\",\"_staker\":\"Address of the staker contract.\",\"name\":\"The name of the token.\",\"symbol\":\"The symbol for the token.\"}},\"mint(address,uint256)\":{\"details\":\"Can only be called by addresses with a minter role. This should correspond to the Long Short contract.\",\"params\":{\"amount\":\"Amount of synthetic tokens to mint in wei.\",\"to\":\"The address for which to mint the tokens for.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"stake(uint256)\":{\"details\":\"Core staking logic contained in Staker.sol\",\"params\":{\"amount\":\"Amount to stake in wei.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.\",\"params\":{\"amount\":\"Amount of tokens to transfer in wei.\",\"recipient\":\"Recipient of the transferred tokens.\",\"sender\":\"User for which to transfer tokens.\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"SyntheticTokenUpgradeable\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"balanceOf(address)\":{\"notice\":\"Gets the synthetic token balance of the user in wei.\"},\"burn(uint256)\":{\"notice\":\"Burns or destroys a number of held synthetic tokens for an address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"notice\":\"Creates an instance of the contract.\"},\"isLong()\":{\"notice\":\"Whether the token is a long token or short token for its market.\"},\"longShort()\":{\"notice\":\"Address of the LongShort contract, a deployed LongShort.sol\"},\"marketIndex()\":{\"notice\":\"Identifies which market in longShort the token is for.\"},\"mint(address,uint256)\":{\"notice\":\"Mints a number of synthetic tokens for an address.\"},\"stake(uint256)\":{\"notice\":\"Allows users to stake their synthetic tokens to earn Float.\"},\"staker()\":{\"notice\":\"Address of the Staker contract, a deployed Staker.sol\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Overrides the default ERC20 transferFrom.\"}},\"notice\":\"An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SyntheticTokenUpgradeable.sol\":\"SyntheticTokenUpgradeable\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\\n function __ERC20Burnable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC20Burnable_init_unchained();\\n }\\n\\n function __ERC20Burnable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5321bbe08dd6e82e85222024dc300d4959ff8615742ad63135759883a19e02a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation 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 *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal initializer {\\n __Context_init_unchained();\\n __EIP712_init_unchained(name, \\\"1\\\");\\n __ERC20Permit_init_unchained(name);\\n }\\n\\n function __ERC20Permit_init_unchained(string memory name) internal initializer {\\n _PERMIT_TYPEHASH = keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\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 ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xf07c1013d0ecf7a80ff5bf8f59105fc0acc5bf83aa4196b409d9ac3666d37cc6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e321ee7110594e92c1c834d7de2fbdfd01fbed6c06127fe75c5836fe80a24a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x00c96e792d367a436015f12ce2665aa8e2a0d61d2c6045a82cbb37da20e5a042\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x07411372282794f7ecde69a1065e5d20441abe7c9f8861437b4d45c9a4712fa6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal initializer {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal initializer {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x30f3940c119b4d93578bac394f43ee9b0b8465ea1e60b316244183be2983a5ed\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"contracts/SyntheticTokenUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\n/**\\n@title SyntheticTokenUpgradeable\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n@dev Logic for price tracking contained in LongShort.sol. \\n The contract inherits from ERC20PresetMinterPauser.sol\\n*/\\ncontract SyntheticTokenUpgradeable is\\n ISyntheticToken,\\n Initializable,\\n ERC20Upgradeable,\\n ERC20BurnableUpgradeable,\\n AccessControlUpgradeable,\\n ERC20PermitUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n\\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\\n address public longShort;\\n /// @notice Address of the Staker contract, a deployed Staker.sol\\n address public staker;\\n /// @notice Identifies which market in longShort the token is for.\\n uint32 public marketIndex;\\n /// @notice Whether the token is a long token or short token for its market.\\n bool public isLong;\\n\\n /// @notice Creates an instance of the contract.\\n /// @dev Should only be called by TokenFactory.sol for our system.\\n /// @param name The name of the token.\\n /// @param symbol The symbol for the token.\\n /// @param _longShort Address of the core LongShort contract.\\n /// @param _staker Address of the staker contract.\\n /// @param _marketIndex Which market the token is for.\\n /// @param _isLong Whether the token is long or short for its market.\\n function initialize(\\n string memory name,\\n string memory symbol,\\n address _longShort,\\n address _staker,\\n uint32 _marketIndex,\\n bool _isLong\\n ) external initializer {\\n __ERC20_init(name, symbol);\\n __ERC20Burnable_init();\\n __AccessControl_init();\\n __ERC20Permit_init(name);\\n __UUPSUpgradeable_init();\\n\\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n renounceRole(MINTER_ROLE, msg.sender);\\n\\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\\n _setupRole(MINTER_ROLE, _longShort);\\n _setupRole(UPGRADER_ROLE, msg.sender);\\n\\n longShort = _longShort;\\n staker = _staker;\\n marketIndex = _marketIndex;\\n isLong = _isLong;\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by the current admin.\\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\\n\\n // TODO - look at some way of not duplicating implementation logic between this and SyntheticToken.sol\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n /// @dev Core staking logic contained in Staker.sol\\n /// @param amount Amount to stake in wei.\\n function stake(uint256 amount) external override {\\n // NOTE: this is safe, this function will throw \\\"ERC20: transfer\\n // amount exceeds balance\\\" if amount exceeds users balance.\\n super._transfer(msg.sender, address(staker), amount);\\n\\n IStaker(staker).stakeFromUser(msg.sender, amount);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 FUNCTIONS INHERITED BY ERC20PresetMinterPauser \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function totalSupply()\\n public\\n view\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (uint256)\\n {\\n return ERC20Upgradeable.totalSupply();\\n }\\n\\n /** \\n @notice Mints a number of synthetic tokens for an address.\\n @dev Can only be called by addresses with a minter role. \\n This should correspond to the Long Short contract.\\n @param to The address for which to mint the tokens for.\\n @param amount Amount of synthetic tokens to mint in wei.\\n */\\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\\n /// @param amount The amount of tokens to burn in wei.\\n function burn(uint256 amount) public override(ERC20BurnableUpgradeable, ISyntheticToken) {\\n require(msg.sender == longShort, \\\"Only LongShort contract\\\");\\n super._burn(_msgSender(), amount);\\n }\\n\\n /** \\n @notice Overrides the default ERC20 transferFrom.\\n @dev To allow users to avoid approving LongShort when redeeming tokens,\\n longShort has a virtual infinite allowance.\\n @param sender User for which to transfer tokens.\\n @param recipient Recipient of the transferred tokens.\\n @param amount Amount of tokens to transfer in wei.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public override(ERC20Upgradeable, ISyntheticToken) returns (bool) {\\n if (recipient == longShort && msg.sender == longShort) {\\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\\n ERC20Upgradeable._transfer(sender, recipient, amount);\\n return true;\\n } else {\\n return ERC20Upgradeable.transferFrom(sender, recipient, amount);\\n }\\n }\\n\\n function transfer(address recipient, uint256 amount)\\n public\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (bool)\\n {\\n return ERC20Upgradeable.transfer(recipient, amount);\\n }\\n\\n /** \\n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\\n tokens from next price actions before any token transfer occurs.\\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\\n @param sender User for which tokens are to be transferred for.\\n */\\n function _beforeTokenTransfer(\\n address sender,\\n address to,\\n uint256 amount\\n ) internal override {\\n if (sender != longShort) {\\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\\n }\\n super._beforeTokenTransfer(sender, to, amount);\\n }\\n\\n /** \\n @notice Gets the synthetic token balance of the user in wei.\\n @dev To automatically account for next price actions which have been confirmed but not settled,\\n includes any outstanding tokens owed by longShort.\\n @param account The address for which to get the balance of.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return\\n ERC20Upgradeable.balanceOf(account) +\\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\\n account,\\n marketIndex,\\n isLong\\n );\\n }\\n}\\n\",\"keccak256\":\"0x9c9c854d549d24c0e0915a2083fa5da69f3227d98469a0c8516e309b23b361ce\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612b5f806100206000396000f3fe6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "devdoc": { + "details": "Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol", + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.", + "params": { + "account": "The address for which to get the balance of." + } + }, + "burn(uint256)": { + "details": "Modified to only allow Long Short to burn tokens on redeem.", + "params": { + "amount": "The amount of tokens to burn in wei." + } + }, + "burnFrom(address,uint256)": { + "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "details": "Should only be called by TokenFactory.sol for our system.", + "params": { + "_isLong": "Whether the token is long or short for its market.", + "_longShort": "Address of the core LongShort contract.", + "_marketIndex": "Which market the token is for.", + "_staker": "Address of the staker contract.", + "name": "The name of the token.", + "symbol": "The symbol for the token." + } + }, + "mint(address,uint256)": { + "details": "Can only be called by addresses with a minter role. This should correspond to the Long Short contract.", + "params": { + "amount": "Amount of synthetic tokens to mint in wei.", + "to": "The address for which to mint the tokens for." + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "stake(uint256)": { + "details": "Core staking logic contained in Staker.sol", + "params": { + "amount": "Amount to stake in wei." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "transferFrom(address,address,uint256)": { + "details": "To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.", + "params": { + "amount": "Amount of tokens to transfer in wei.", + "recipient": "Recipient of the transferred tokens.", + "sender": "User for which to transfer tokens." + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "SyntheticTokenUpgradeable", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "balanceOf(address)": { + "notice": "Gets the synthetic token balance of the user in wei." + }, + "burn(uint256)": { + "notice": "Burns or destroys a number of held synthetic tokens for an address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "notice": "Creates an instance of the contract." + }, + "isLong()": { + "notice": "Whether the token is a long token or short token for its market." + }, + "longShort()": { + "notice": "Address of the LongShort contract, a deployed LongShort.sol" + }, + "marketIndex()": { + "notice": "Identifies which market in longShort the token is for." + }, + "mint(address,uint256)": { + "notice": "Mints a number of synthetic tokens for an address." + }, + "stake(uint256)": { + "notice": "Allows users to stake their synthetic tokens to earn Float." + }, + "staker()": { + "notice": "Address of the Staker contract, a deployed Staker.sol" + }, + "transferFrom(address,address,uint256)": { + "notice": "Overrides the default ERC20 transferFrom." + } + }, + "notice": "An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1351, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1357, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1359, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 1361, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 1363, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 1904, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 2069, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_roles", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4251, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "251", + "type": "t_bytes32" + }, + { + "astId": 4253, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "252", + "type": "t_bytes32" + }, + { + "astId": 4390, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "253", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2845, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_nonces", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_address,t_struct(Counter)3544_storage)" + }, + { + "astId": 2847, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_PERMIT_TYPEHASH", + "offset": 0, + "slot": "304", + "type": "t_bytes32" + }, + { + "astId": 3015, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "354", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "404", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 16538, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "longShort", + "offset": 0, + "slot": "454", + "type": "t_address" + }, + { + "astId": 16541, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "staker", + "offset": 0, + "slot": "455", + "type": "t_address" + }, + { + "astId": 16544, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "marketIndex", + "offset": 20, + "slot": "455", + "type": "t_uint32" + }, + { + "astId": 16547, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "isLong", + "offset": 24, + "slot": "455", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)3544_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)3544_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3544_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 3543, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/polygon/SLF3_Proxy.json b/deployments/polygon/SLF3_Proxy.json new file mode 100644 index 0000000..86ea2e9 --- /dev/null +++ b/deployments/polygon/SLF3_Proxy.json @@ -0,0 +1,192 @@ +{ + "address": "0xb10ffC060cc7659f0726c8452a586e30338145cF", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xb10ffC060cc7659f0726c8452a586e30338145cF", + "transactionIndex": 21, + "gasUsed": "517306", + "logsBloom": "0x00008004000002000000000000000000400000000400020000000000400000000000000000000000000000008000044000008000000000000000000000000000000000000000000000000041000002800000000000000000000100000000000000000000020002000000000000000800000000000000000080010000001000000000000000000000000000000000000000000000000010000000000000000000200000000000000000000000000000008000000000000000001000000000004000000020000008000001000000000000001000001000000100100000000020000080000000000200000000000000000000000000000000000000040000100000", + "blockHash": "0x0689111fe3813d00b996933d5b1f6a5f18d5b29a33f03bcdce5c10c1dbd6c340", + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "logs": [ + { + "transactionIndex": 21, + "blockNumber": 19059796, + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "address": "0xb10ffC060cc7659f0726c8452a586e30338145cF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000f8908ac067d1764281d482b0e278ad2ec431b4a9" + ], + "data": "0x", + "logIndex": 148, + "blockHash": "0x0689111fe3813d00b996933d5b1f6a5f18d5b29a33f03bcdce5c10c1dbd6c340" + }, + { + "transactionIndex": 21, + "blockNumber": 19059796, + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "address": "0xb10ffC060cc7659f0726c8452a586e30338145cF", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 149, + "blockHash": "0x0689111fe3813d00b996933d5b1f6a5f18d5b29a33f03bcdce5c10c1dbd6c340" + }, + { + "transactionIndex": 21, + "blockNumber": 19059796, + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "address": "0xb10ffC060cc7659f0726c8452a586e30338145cF", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 150, + "blockHash": "0x0689111fe3813d00b996933d5b1f6a5f18d5b29a33f03bcdce5c10c1dbd6c340" + }, + { + "transactionIndex": 21, + "blockNumber": 19059796, + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "address": "0xb10ffC060cc7659f0726c8452a586e30338145cF", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 151, + "blockHash": "0x0689111fe3813d00b996933d5b1f6a5f18d5b29a33f03bcdce5c10c1dbd6c340" + }, + { + "transactionIndex": 21, + "blockNumber": 19059796, + "transactionHash": "0x09cfd079697f672b911601a541436b477dc697232b6bdd085491e8e26050e892", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000b79fad4ca981472442f53d16365fdf0305ffd8e9" + ], + "data": "0x000000000000000000000000000000000000000000000000001260dee3b3a8000000000000000000000000000000000000000000000000000bcc3a67fdbc8f420000000000000000000000000000000000000000000043007d48d7ec2b3980c20000000000000000000000000000000000000000000000000bb9d9891a08e7420000000000000000000000000000000000000000000043007d5b38cb0eed28c2", + "logIndex": 152, + "blockHash": "0x0689111fe3813d00b996933d5b1f6a5f18d5b29a33f03bcdce5c10c1dbd6c340" + } + ], + "blockNumber": 19059796, + "cumulativeGasUsed": "4980539", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf8908aC067D1764281d482b0E278ad2eC431b4A9", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733000000000000000000000000e7c89eb987c415b4233789e5cec0ee7407d2c47f000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000015466c6f6174204c6f6e6720466c697070336e696e6700000000000000000000000000000000000000000000000000000000000000000000000000000000000004666c463300000000000000000000000000000000000000000000000000000000" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/SSF3.json b/deployments/polygon/SSF3.json new file mode 100644 index 0000000..582bd74 --- /dev/null +++ b/deployments/polygon/SSF3.json @@ -0,0 +1,962 @@ +{ + "address": "0x7AD3a979D45E1636558A5c3d8BD8a4dA4cB30349", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x7AD3a979D45E1636558A5c3d8BD8a4dA4cB30349", + "transactionIndex": 29, + "gasUsed": "517306", + "logsBloom": "0x00000004040000000000000000000000400000000400000000000000418000000000000000000000000000008000044000008000000000000000000000000000000000000000000000000000000002800000000000000000000100000000000000000000020002000000000000000800000000000000000080010000001000000000000000000000000000000000000000000000000010000000000000000000208000000000000000000000000000008000000000000000001000000000004000000020000008000001000000000001001000000000000100100000000020000088000000000200000000000000000000000000000000000000040000100000", + "blockHash": "0xdf534f4d4c37a12be0f079ff45213c5de2a1c3963ff0b73f634bca39feb307ba", + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "logs": [ + { + "transactionIndex": 29, + "blockNumber": 19059787, + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "address": "0x7AD3a979D45E1636558A5c3d8BD8a4dA4cB30349", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000003e76b81bb69bdcb4e34e12a9e77fd4f9e41aa17" + ], + "data": "0x", + "logIndex": 195, + "blockHash": "0xdf534f4d4c37a12be0f079ff45213c5de2a1c3963ff0b73f634bca39feb307ba" + }, + { + "transactionIndex": 29, + "blockNumber": 19059787, + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "address": "0x7AD3a979D45E1636558A5c3d8BD8a4dA4cB30349", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 196, + "blockHash": "0xdf534f4d4c37a12be0f079ff45213c5de2a1c3963ff0b73f634bca39feb307ba" + }, + { + "transactionIndex": 29, + "blockNumber": 19059787, + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "address": "0x7AD3a979D45E1636558A5c3d8BD8a4dA4cB30349", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 197, + "blockHash": "0xdf534f4d4c37a12be0f079ff45213c5de2a1c3963ff0b73f634bca39feb307ba" + }, + { + "transactionIndex": 29, + "blockNumber": 19059787, + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "address": "0x7AD3a979D45E1636558A5c3d8BD8a4dA4cB30349", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 198, + "blockHash": "0xdf534f4d4c37a12be0f079ff45213c5de2a1c3963ff0b73f634bca39feb307ba" + }, + { + "transactionIndex": 29, + "blockNumber": 19059787, + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000b79fad4ca981472442f53d16365fdf0305ffd8e9" + ], + "data": "0x000000000000000000000000000000000000000000000000001260dee3b3a8000000000000000000000000000000000000000000000000000c35aa5f2d49a74200000000000000000000000000000000000000000000430027ec300b098128130000000000000000000000000000000000000000000000000c2349804995ff4200000000000000000000000000000000000000000000430027fe90e9ed34d013", + "logIndex": 199, + "blockHash": "0xdf534f4d4c37a12be0f079ff45213c5de2a1c3963ff0b73f634bca39feb307ba" + } + ], + "blockNumber": 19059787, + "cumulativeGasUsed": "4675949", + "status": 1, + "byzantium": true + }, + "args": [ + "0x03E76B81bb69BdCB4e34e12A9e77FD4F9e41AA17", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733000000000000000000000000e7c89eb987c415b4233789e5cec0ee7407d2c47f000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016466c6f61742053686f727420466c697070336e696e670000000000000000000000000000000000000000000000000000000000000000000000000000000000046673463300000000000000000000000000000000000000000000000000000000" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "Float Short Flipp3ning", + "fsF3", + "0x168a5d1217AEcd258b03018d5bF1A1677A07b733", + "0xe7C89eb987c415B4233789E5ceC0eE7407d2C47F", + 1, + false + ] + }, + "implementation": "0x03E76B81bb69BdCB4e34e12A9e77FD4F9e41AA17", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/SSF3_Implementation.json b/deployments/polygon/SSF3_Implementation.json new file mode 100644 index 0000000..6636cb7 --- /dev/null +++ b/deployments/polygon/SSF3_Implementation.json @@ -0,0 +1,1318 @@ +{ + "address": "0x03E76B81bb69BdCB4e34e12A9e77FD4F9e41AA17", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "_isLong", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "staker", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x83c013aeb11af2ab63252cc101a8044222bc626fefa4606154d8701ee37a7ffd", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x03E76B81bb69BdCB4e34e12A9e77FD4F9e41AA17", + "transactionIndex": 16, + "gasUsed": "2450492", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000002000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000010000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000008000001000000000000000000000000000000100000000000000000000000000200000000000000000000000000000000000000040000100000", + "blockHash": "0xcc06cb3f0d7e03f8b668fe961779509bbd5144089f83020fd1fe97133ecd2eea", + "transactionHash": "0x83c013aeb11af2ab63252cc101a8044222bc626fefa4606154d8701ee37a7ffd", + "logs": [ + { + "transactionIndex": 16, + "blockNumber": 19059782, + "transactionHash": "0x83c013aeb11af2ab63252cc101a8044222bc626fefa4606154d8701ee37a7ffd", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000b79fad4ca981472442f53d16365fdf0305ffd8e9" + ], + "data": "0x00000000000000000000000000000000000000000000000000570f184bd970000000000000000000000000000000000000000000000000000c8cb9777923174200000000000000000000000000000000000000000000430016d6d99b39763afd0000000000000000000000000000000000000000000000000c35aa5f2d49a742000000000000000000000000000000000000000000004300172de8b3854faafd", + "logIndex": 118, + "blockHash": "0xcc06cb3f0d7e03f8b668fe961779509bbd5144089f83020fd1fe97133ecd2eea" + } + ], + "blockNumber": 19059782, + "cumulativeGasUsed": "6205332", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staker\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"_isLong\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isLong\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staker\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.\",\"params\":{\"account\":\"The address for which to get the balance of.\"}},\"burn(uint256)\":{\"details\":\"Modified to only allow Long Short to burn tokens on redeem.\",\"params\":{\"amount\":\"The amount of tokens to burn in wei.\"}},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"details\":\"Should only be called by TokenFactory.sol for our system.\",\"params\":{\"_isLong\":\"Whether the token is long or short for its market.\",\"_longShort\":\"Address of the core LongShort contract.\",\"_marketIndex\":\"Which market the token is for.\",\"_staker\":\"Address of the staker contract.\",\"name\":\"The name of the token.\",\"symbol\":\"The symbol for the token.\"}},\"mint(address,uint256)\":{\"details\":\"Can only be called by addresses with a minter role. This should correspond to the Long Short contract.\",\"params\":{\"amount\":\"Amount of synthetic tokens to mint in wei.\",\"to\":\"The address for which to mint the tokens for.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"stake(uint256)\":{\"details\":\"Core staking logic contained in Staker.sol\",\"params\":{\"amount\":\"Amount to stake in wei.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.\",\"params\":{\"amount\":\"Amount of tokens to transfer in wei.\",\"recipient\":\"Recipient of the transferred tokens.\",\"sender\":\"User for which to transfer tokens.\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"SyntheticTokenUpgradeable\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"balanceOf(address)\":{\"notice\":\"Gets the synthetic token balance of the user in wei.\"},\"burn(uint256)\":{\"notice\":\"Burns or destroys a number of held synthetic tokens for an address.\"},\"initialize(string,string,address,address,uint32,bool)\":{\"notice\":\"Creates an instance of the contract.\"},\"isLong()\":{\"notice\":\"Whether the token is a long token or short token for its market.\"},\"longShort()\":{\"notice\":\"Address of the LongShort contract, a deployed LongShort.sol\"},\"marketIndex()\":{\"notice\":\"Identifies which market in longShort the token is for.\"},\"mint(address,uint256)\":{\"notice\":\"Mints a number of synthetic tokens for an address.\"},\"stake(uint256)\":{\"notice\":\"Allows users to stake their synthetic tokens to earn Float.\"},\"staker()\":{\"notice\":\"Address of the Staker contract, a deployed Staker.sol\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Overrides the default ERC20 transferFrom.\"}},\"notice\":\"An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SyntheticTokenUpgradeable.sol\":\"SyntheticTokenUpgradeable\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\\n function __ERC20Burnable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC20Burnable_init_unchained();\\n }\\n\\n function __ERC20Burnable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5321bbe08dd6e82e85222024dc300d4959ff8615742ad63135759883a19e02a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation 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 *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal initializer {\\n __Context_init_unchained();\\n __EIP712_init_unchained(name, \\\"1\\\");\\n __ERC20Permit_init_unchained(name);\\n }\\n\\n function __ERC20Permit_init_unchained(string memory name) internal initializer {\\n _PERMIT_TYPEHASH = keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\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 ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xf07c1013d0ecf7a80ff5bf8f59105fc0acc5bf83aa4196b409d9ac3666d37cc6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e321ee7110594e92c1c834d7de2fbdfd01fbed6c06127fe75c5836fe80a24a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x00c96e792d367a436015f12ce2665aa8e2a0d61d2c6045a82cbb37da20e5a042\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x07411372282794f7ecde69a1065e5d20441abe7c9f8861437b4d45c9a4712fa6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal initializer {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal initializer {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x30f3940c119b4d93578bac394f43ee9b0b8465ea1e60b316244183be2983a5ed\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"contracts/SyntheticTokenUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\n/**\\n@title SyntheticTokenUpgradeable\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n@dev Logic for price tracking contained in LongShort.sol. \\n The contract inherits from ERC20PresetMinterPauser.sol\\n*/\\ncontract SyntheticTokenUpgradeable is\\n ISyntheticToken,\\n Initializable,\\n ERC20Upgradeable,\\n ERC20BurnableUpgradeable,\\n AccessControlUpgradeable,\\n ERC20PermitUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n\\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\\n address public longShort;\\n /// @notice Address of the Staker contract, a deployed Staker.sol\\n address public staker;\\n /// @notice Identifies which market in longShort the token is for.\\n uint32 public marketIndex;\\n /// @notice Whether the token is a long token or short token for its market.\\n bool public isLong;\\n\\n /// @notice Creates an instance of the contract.\\n /// @dev Should only be called by TokenFactory.sol for our system.\\n /// @param name The name of the token.\\n /// @param symbol The symbol for the token.\\n /// @param _longShort Address of the core LongShort contract.\\n /// @param _staker Address of the staker contract.\\n /// @param _marketIndex Which market the token is for.\\n /// @param _isLong Whether the token is long or short for its market.\\n function initialize(\\n string memory name,\\n string memory symbol,\\n address _longShort,\\n address _staker,\\n uint32 _marketIndex,\\n bool _isLong\\n ) external initializer {\\n __ERC20_init(name, symbol);\\n __ERC20Burnable_init();\\n __AccessControl_init();\\n __ERC20Permit_init(name);\\n __UUPSUpgradeable_init();\\n\\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n renounceRole(MINTER_ROLE, msg.sender);\\n\\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\\n _setupRole(MINTER_ROLE, _longShort);\\n _setupRole(UPGRADER_ROLE, msg.sender);\\n\\n longShort = _longShort;\\n staker = _staker;\\n marketIndex = _marketIndex;\\n isLong = _isLong;\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by the current admin.\\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\\n\\n // TODO - look at some way of not duplicating implementation logic between this and SyntheticToken.sol\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n /// @dev Core staking logic contained in Staker.sol\\n /// @param amount Amount to stake in wei.\\n function stake(uint256 amount) external override {\\n // NOTE: this is safe, this function will throw \\\"ERC20: transfer\\n // amount exceeds balance\\\" if amount exceeds users balance.\\n super._transfer(msg.sender, address(staker), amount);\\n\\n IStaker(staker).stakeFromUser(msg.sender, amount);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 FUNCTIONS INHERITED BY ERC20PresetMinterPauser \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function totalSupply()\\n public\\n view\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (uint256)\\n {\\n return ERC20Upgradeable.totalSupply();\\n }\\n\\n /** \\n @notice Mints a number of synthetic tokens for an address.\\n @dev Can only be called by addresses with a minter role. \\n This should correspond to the Long Short contract.\\n @param to The address for which to mint the tokens for.\\n @param amount Amount of synthetic tokens to mint in wei.\\n */\\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\\n /// @param amount The amount of tokens to burn in wei.\\n function burn(uint256 amount) public override(ERC20BurnableUpgradeable, ISyntheticToken) {\\n require(msg.sender == longShort, \\\"Only LongShort contract\\\");\\n super._burn(_msgSender(), amount);\\n }\\n\\n /** \\n @notice Overrides the default ERC20 transferFrom.\\n @dev To allow users to avoid approving LongShort when redeeming tokens,\\n longShort has a virtual infinite allowance.\\n @param sender User for which to transfer tokens.\\n @param recipient Recipient of the transferred tokens.\\n @param amount Amount of tokens to transfer in wei.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public override(ERC20Upgradeable, ISyntheticToken) returns (bool) {\\n if (recipient == longShort && msg.sender == longShort) {\\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\\n ERC20Upgradeable._transfer(sender, recipient, amount);\\n return true;\\n } else {\\n return ERC20Upgradeable.transferFrom(sender, recipient, amount);\\n }\\n }\\n\\n function transfer(address recipient, uint256 amount)\\n public\\n virtual\\n override(ERC20Upgradeable, ISyntheticToken)\\n returns (bool)\\n {\\n return ERC20Upgradeable.transfer(recipient, amount);\\n }\\n\\n /** \\n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\\n tokens from next price actions before any token transfer occurs.\\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\\n @param sender User for which tokens are to be transferred for.\\n */\\n function _beforeTokenTransfer(\\n address sender,\\n address to,\\n uint256 amount\\n ) internal override {\\n if (sender != longShort) {\\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\\n }\\n super._beforeTokenTransfer(sender, to, amount);\\n }\\n\\n /** \\n @notice Gets the synthetic token balance of the user in wei.\\n @dev To automatically account for next price actions which have been confirmed but not settled,\\n includes any outstanding tokens owed by longShort.\\n @param account The address for which to get the balance of.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return\\n ERC20Upgradeable.balanceOf(account) +\\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\\n account,\\n marketIndex,\\n isLong\\n );\\n }\\n}\\n\",\"keccak256\":\"0x9c9c854d549d24c0e0915a2083fa5da69f3227d98469a0c8516e309b23b361ce\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612b5f806100206000396000f3fe6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101f95760003560e01c80635ebaf1db1161010d578063a457c2d7116100a0578063d505accf1161006f578063d505accf146105ce578063d5391393146105ee578063d547741f14610610578063dd62ed3e14610630578063f72c0d8b14610676576101f9565b8063a457c2d71461054e578063a694fc3a1461056e578063a9059cbb1461058e578063aa432dad146105ae576101f9565b80638c7adc15116100dc5780638c7adc15146104ca57806391d148541461050457806395d89b4114610524578063a217fddf14610539576101f9565b80635ebaf1db1461044957806370a082311461046a57806379cc67901461048a5780637ecebe00146104aa576101f9565b80632f2ff15d116101905780633659cfe61161015f5780633659cfe6146103b657806339509351146103d657806340c10f19146103f657806342966c68146104165780634f1ef28614610436576101f9565b80632f2ff15d14610343578063313ce567146103655780633644e5151461038157806336568abe14610396576101f9565b8063202a61a1116101cc578063202a61a11461029857806323b872dd146102ba578063248a9ca3146102da578063299498721461030a576101f9565b806301ffc9a7146101fe57806306fdde0314610233578063095ea7b31461025557806318160ddd14610275575b600080fd5b34801561020a57600080fd5b5061021e6102193660046127ea565b6106aa565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b506102486106e3565b60405161022a919061296f565b34801561026157600080fd5b5061021e610270366004612787565b610775565b34801561028157600080fd5b5061028a61078b565b60405190815260200161022a565b3480156102a457600080fd5b506101c75461021e90600160c01b900460ff1681565b3480156102c657600080fd5b5061021e6102d536600461267c565b61079b565b3480156102e657600080fd5b5061028a6102f53660046127b0565b600090815260c9602052604090206001015490565b34801561031657600080fd5b506101c65461032b906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b34801561034f57600080fd5b5061036361035e3660046127c8565b6107f4565b005b34801561037157600080fd5b506040516012815260200161022a565b34801561038d57600080fd5b5061028a610820565b3480156103a257600080fd5b506103636103b13660046127c8565b61082a565b3480156103c257600080fd5b506103636103d1366004612630565b6108ad565b3480156103e257600080fd5b5061021e6103f1366004612787565b6108d4565b34801561040257600080fd5b50610363610411366004612787565b610910565b34801561042257600080fd5b506103636104313660046127b0565b610933565b610363610444366004612728565b610998565b34801561045557600080fd5b506101c75461032b906001600160a01b031681565b34801561047657600080fd5b5061028a610485366004612630565b6109ad565b34801561049657600080fd5b506103636104a5366004612787565b610a7a565b3480156104b657600080fd5b5061028a6104c5366004612630565b610afb565b3480156104d657600080fd5b506101c7546104ef90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161022a565b34801561051057600080fd5b5061021e61051f3660046127c8565b610b1a565b34801561053057600080fd5b50610248610b45565b34801561054557600080fd5b5061028a600081565b34801561055a57600080fd5b5061021e610569366004612787565b610b54565b34801561057a57600080fd5b506103636105893660046127b0565b610bed565b34801561059a57600080fd5b5061021e6105a9366004612787565b610c6e565b3480156105ba57600080fd5b506103636105c9366004612812565b610c7a565b3480156105da57600080fd5b506103636105e93660046126b7565b610de1565b3480156105fa57600080fd5b5061028a600080516020612b0a83398151915281565b34801561061c57600080fd5b5061036361062b3660046127c8565b610f28565b34801561063c57600080fd5b5061028a61064b36600461264a565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561068257600080fd5b5061028a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806106db57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060603680546106f290612a81565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90612a81565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610782338484610f4e565b50600192915050565b600061079660355490565b905090565b6101c6546000906001600160a01b0384811691161480156107c757506101c6546001600160a01b031633145b156107df576107d7848484611072565b5060016107ed565b6107ea84848461124d565b90505b9392505050565b600082815260c9602052604090206001015461081181335b6112f7565b61081b838361135b565b505050565b60006107966113e1565b6001600160a01b038116331461089f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108a9828261145c565b5050565b6108b6816114c3565b6108d1816040518060200160405280600081525060006114ee565b50565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909161078291859061090b9086906129f0565b610f4e565b600080516020612b0a833981519152610929813361080c565b61081b838361166f565b6101c6546001600160a01b0316331461098e5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610896565b6108d1338261175b565b6109a1826114c3565b6108a9828260016114ee565b6101c6546101c75460405163f68a327f60e01b81526001600160a01b038481166004830152600160a01b830463ffffffff166024830152600160c01b90920460ff1615156044820152600092919091169063f68a327f9060640160206040518083038186803b158015610a1f57600080fd5b505afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906128c6565b6001600160a01b0383166000908152603360205260409020546106db91906129f0565b6000610a86833361064b565b905081811015610ae45760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610896565b610af18333848403610f4e565b61081b838361175b565b6001600160a01b038116600090815261012f60205260408120546106db565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546106f290612a81565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610bd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610896565b610be33385858403610f4e565b5060019392505050565b6101c754610c069033906001600160a01b031683611072565b6101c7546040516373479edf60e11b8152336004820152602481018390526001600160a01b039091169063e68f3dbe90604401600060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b5050505050565b60006107ed83836118b5565b600054610100900460ff1680610c93575060005460ff16155b610caf5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015610cd1576000805461ffff19166101011790555b610cdb87876118c2565b610ce3611941565b610ceb6119bc565b610cf487611a1b565b610cfc611941565b610d0760003361082a565b610d1f600080516020612b0a8339815191523361082a565b610d2a600086611abb565b610d42600080516020612b0a83398151915286611abb565b610d6c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611abb565b6101c680546001600160a01b0319166001600160a01b03878116919091179091556101c780549186166001600160c01b031990921691909117600160a01b63ffffffff8616021760ff60c01b1916600160c01b841515021790558015610dd8576000805461ff00191690555b50505050505050565b83421115610e315760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610896565b600061013054888888610e438c611ac5565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610e9e82611aee565b90506000610eae82878787611b3c565b9050896001600160a01b0316816001600160a01b031614610f115760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610896565b610f1c8a8a8a610f4e565b50505050505050505050565b600082815260c96020526040902060010154610f44813361080c565b61081b838361145c565b6001600160a01b038316610fb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610896565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610896565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610896565b6001600160a01b0382166111385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610896565b611143838383611b64565b6001600160a01b038316600090815260336020526040902054818110156111bb5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610896565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906111f29084906129f0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123e91815260200190565b60405180910390a35b50505050565b600061125a848484611072565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156112df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610896565b6112ec8533858403610f4e565b506001949350505050565b6113018282610b1a565b6108a957611319816001600160a01b03166014611bf6565b611324836020611bf6565b6040516020016113359291906128fa565b60408051601f198184030181529082905262461bcd60e51b82526108969160040161296f565b6113658282610b1a565b6108a957600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561139d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61141060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6114668282610b1a565b156108a957600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108a9813361080c565b60006115217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061152c84611dd8565b6000835111806115395750815b1561154a576115488484611e7d565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610c6757805460ff191660011781556040516001600160a01b03831660248201526115c990869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611e7d565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146116665760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610896565b610c6785611f68565b6001600160a01b0382166116c55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610896565b6116d160008383611b64565b80603560008282546116e391906129f0565b90915550506001600160a01b038216600090815260336020526040812080548392906117109084906129f0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36108a9565b6001600160a01b0382166117bb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610896565b6117c782600083611b64565b6001600160a01b0382166000908152603360205260409020548181101561183b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610896565b6001600160a01b038316600090815260336020526040812083830390556035805484929061186a908490612a27565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361081b565b6000610782338484611072565b600054610100900460ff16806118db575060005460ff16155b6118f75760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611919576000805461ffff19166101011790555b611921611fa8565b61192b8383612012565b801561081b576000805461ff0019169055505050565b600054610100900460ff168061195a575060005460ff16155b6119765760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611998576000805461ffff19166101011790555b6119a0611fa8565b6119a8611fa8565b80156108d1576000805461ff001916905550565b600054610100900460ff16806119d5575060005460ff16155b6119f15760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a13576000805461ffff19166101011790555b611998611fa8565b600054610100900460ff1680611a34575060005460ff16155b611a505760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015611a72576000805461ffff19166101011790555b611a7a611fa8565b611a9d82604051806040016040528060018152602001603160f81b8152506120a7565b611aa682612131565b80156108a9576000805461ff00191690555050565b6108a9828261135b565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b60006106db611afb6113e1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611b4d878787876121c2565b91509150611b5a816122af565b5095945050505050565b6101c6546001600160a01b03848116911614611bf1576101c6546101c7546040516344bd03c360e11b81526001600160a01b038681166004830152600160a01b90920463ffffffff16602482015291169063897a078690604401600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505b61081b565b60606000611c05836002612a08565b611c109060026129f0565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050600360fc1b81600081518110611c8957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cc657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cea846002612a08565b611cf59060016129f0565b90505b6001811115611d89576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612a6a565b9050611cf8565b5083156107ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610896565b803b611e3c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610896565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611edc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610896565b600080846001600160a01b031684604051611ef791906128de565b600060405180830381855af49150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150611f5f8282604051806060016040528060278152602001612ae3602791396124b2565b95945050505050565b611f7181611dd8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611fc1575060005460ff16155b611fdd5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156119a8576000805461ffff191661010117905580156108d1576000805461ff001916905550565b600054610100900460ff168061202b575060005460ff16155b6120475760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612069576000805461ffff19166101011790555b825161207c9060369060208601906124eb565b5081516120909060379060208501906124eb565b50801561081b576000805461ff0019169055505050565b600054610100900460ff16806120c0575060005460ff16155b6120dc5760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff161580156120fe576000805461ffff19166101011790555b825160208085019190912083519184019190912060fb9190915560fc55801561081b576000805461ff0019169055505050565b600054610100900460ff168061214a575060005460ff16155b6121665760405162461bcd60e51b8152600401610896906129a2565b600054610100900460ff16158015612188576000805461ffff19166101011790555b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96101305580156108a9576000805461ff00191690555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121f957506000905060036122a6565b8460ff16601b1415801561221157508460ff16601c14155b1561222257506000905060046122a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612276573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229f576000600192509250506122a6565b9150600090505b94509492505050565b60008160048111156122d157634e487b7160e01b600052602160045260246000fd5b14156122dc576108d1565b60018160048111156122fe57634e487b7160e01b600052602160045260246000fd5b141561234c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610896565b600281600481111561236e57634e487b7160e01b600052602160045260246000fd5b14156123bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610896565b60038160048111156123de57634e487b7160e01b600052602160045260246000fd5b14156124375760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610896565b600481600481111561245957634e487b7160e01b600052602160045260246000fd5b14156108d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610896565b606083156124c15750816107ed565b8251156124d15782518084602001fd5b8160405162461bcd60e51b8152600401610896919061296f565b8280546124f790612a81565b90600052602060002090601f016020900481019282612519576000855561255f565b82601f1061253257805160ff191683800117855561255f565b8280016001018555821561255f579182015b8281111561255f578251825591602001919060010190612544565b5061256b92915061256f565b5090565b5b8082111561256b5760008155600101612570565b600067ffffffffffffffff8084111561259f5761259f612acc565b604051601f8501601f19908116603f011681019082821181831017156125c7576125c7612acc565b816040528093508581528686860111156125e057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146106de57600080fd5b600082601f830112612621578081fd5b6107ed83833560208501612584565b600060208284031215612641578081fd5b6107ed826125fa565b6000806040838503121561265c578081fd5b612665836125fa565b9150612673602084016125fa565b90509250929050565b600080600060608486031215612690578081fd5b612699846125fa565b92506126a7602085016125fa565b9150604084013590509250925092565b600080600080600080600060e0888a0312156126d1578283fd5b6126da886125fa565b96506126e8602089016125fa565b95506040880135945060608801359350608088013560ff8116811461270b578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561273a578182fd5b612743836125fa565b9150602083013567ffffffffffffffff81111561275e578182fd5b8301601f8101851361276e578182fd5b61277d85823560208401612584565b9150509250929050565b60008060408385031215612799578182fd5b6127a2836125fa565b946020939093013593505050565b6000602082840312156127c1578081fd5b5035919050565b600080604083850312156127da578182fd5b82359150612673602084016125fa565b6000602082840312156127fb578081fd5b81356001600160e01b0319811681146107ed578182fd5b60008060008060008060c0878903121561282a578182fd5b863567ffffffffffffffff80821115612841578384fd5b61284d8a838b01612611565b97506020890135915080821115612862578384fd5b5061286f89828a01612611565b95505061287e604088016125fa565b935061288c606088016125fa565b9250608087013563ffffffff811681146128a4578283fd5b915060a087013580151581146128b8578182fd5b809150509295509295509295565b6000602082840312156128d7578081fd5b5051919050565b600082516128f0818460208701612a3e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612932816017850160208801612a3e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612963816028840160208801612a3e565b01602801949350505050565b600060208252825180602084015261298e816040850160208701612a3e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115612a0357612a03612ab6565b500190565b6000816000190483118215151615612a2257612a22612ab6565b500290565b600082821015612a3957612a39612ab6565b500390565b60005b83811015612a59578181015183820152602001612a41565b838111156112475750506000910152565b600081612a7957612a79612ab6565b506000190190565b600181811c90821680612a9557607f821691505b60208210811415611ae857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122078f05f461fc68df4fceda4f1f6156eefed213a05c19ca9f3a9c52d279e54416864736f6c63430008030033", + "devdoc": { + "details": "Logic for price tracking contained in LongShort.sol. The contract inherits from ERC20PresetMinterPauser.sol", + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "To automatically account for next price actions which have been confirmed but not settled, includes any outstanding tokens owed by longShort.", + "params": { + "account": "The address for which to get the balance of." + } + }, + "burn(uint256)": { + "details": "Modified to only allow Long Short to burn tokens on redeem.", + "params": { + "amount": "The amount of tokens to burn in wei." + } + }, + "burnFrom(address,uint256)": { + "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "details": "Should only be called by TokenFactory.sol for our system.", + "params": { + "_isLong": "Whether the token is long or short for its market.", + "_longShort": "Address of the core LongShort contract.", + "_marketIndex": "Which market the token is for.", + "_staker": "Address of the staker contract.", + "name": "The name of the token.", + "symbol": "The symbol for the token." + } + }, + "mint(address,uint256)": { + "details": "Can only be called by addresses with a minter role. This should correspond to the Long Short contract.", + "params": { + "amount": "Amount of synthetic tokens to mint in wei.", + "to": "The address for which to mint the tokens for." + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "stake(uint256)": { + "details": "Core staking logic contained in Staker.sol", + "params": { + "amount": "Amount to stake in wei." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "transferFrom(address,address,uint256)": { + "details": "To allow users to avoid approving LongShort when redeeming tokens, longShort has a virtual infinite allowance.", + "params": { + "amount": "Amount of tokens to transfer in wei.", + "recipient": "Recipient of the transferred tokens.", + "sender": "User for which to transfer tokens." + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "SyntheticTokenUpgradeable", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "balanceOf(address)": { + "notice": "Gets the synthetic token balance of the user in wei." + }, + "burn(uint256)": { + "notice": "Burns or destroys a number of held synthetic tokens for an address." + }, + "initialize(string,string,address,address,uint32,bool)": { + "notice": "Creates an instance of the contract." + }, + "isLong()": { + "notice": "Whether the token is a long token or short token for its market." + }, + "longShort()": { + "notice": "Address of the LongShort contract, a deployed LongShort.sol" + }, + "marketIndex()": { + "notice": "Identifies which market in longShort the token is for." + }, + "mint(address,uint256)": { + "notice": "Mints a number of synthetic tokens for an address." + }, + "stake(uint256)": { + "notice": "Allows users to stake their synthetic tokens to earn Float." + }, + "staker()": { + "notice": "Address of the Staker contract, a deployed Staker.sol" + }, + "transferFrom(address,address,uint256)": { + "notice": "Overrides the default ERC20 transferFrom." + } + }, + "notice": "An ERC20 token that tracks or inversely tracks the price of an underlying asset with floating exposure.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1351, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1357, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1359, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 1361, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 1363, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 1904, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 2069, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_roles", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4251, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "251", + "type": "t_bytes32" + }, + { + "astId": 4253, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "252", + "type": "t_bytes32" + }, + { + "astId": 4390, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "253", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2845, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_nonces", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_address,t_struct(Counter)3544_storage)" + }, + { + "astId": 2847, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_PERMIT_TYPEHASH", + "offset": 0, + "slot": "304", + "type": "t_bytes32" + }, + { + "astId": 3015, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "354", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "__gap", + "offset": 0, + "slot": "404", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 16538, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "longShort", + "offset": 0, + "slot": "454", + "type": "t_address" + }, + { + "astId": 16541, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "staker", + "offset": 0, + "slot": "455", + "type": "t_address" + }, + { + "astId": 16544, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "marketIndex", + "offset": 20, + "slot": "455", + "type": "t_uint32" + }, + { + "astId": 16547, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "isLong", + "offset": 24, + "slot": "455", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)3544_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)3544_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3544_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 3543, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/SyntheticTokenUpgradeable.sol:SyntheticTokenUpgradeable", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/polygon/SSF3_Proxy.json b/deployments/polygon/SSF3_Proxy.json new file mode 100644 index 0000000..ff39fff --- /dev/null +++ b/deployments/polygon/SSF3_Proxy.json @@ -0,0 +1,192 @@ +{ + "address": "0x7AD3a979D45E1636558A5c3d8BD8a4dA4cB30349", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x7AD3a979D45E1636558A5c3d8BD8a4dA4cB30349", + "transactionIndex": 29, + "gasUsed": "517306", + "logsBloom": "0x00000004040000000000000000000000400000000400000000000000418000000000000000000000000000008000044000008000000000000000000000000000000000000000000000000000000002800000000000000000000100000000000000000000020002000000000000000800000000000000000080010000001000000000000000000000000000000000000000000000000010000000000000000000208000000000000000000000000000008000000000000000001000000000004000000020000008000001000000000001001000000000000100100000000020000088000000000200000000000000000000000000000000000000040000100000", + "blockHash": "0xdf534f4d4c37a12be0f079ff45213c5de2a1c3963ff0b73f634bca39feb307ba", + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "logs": [ + { + "transactionIndex": 29, + "blockNumber": 19059787, + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "address": "0x7AD3a979D45E1636558A5c3d8BD8a4dA4cB30349", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000003e76b81bb69bdcb4e34e12a9e77fd4f9e41aa17" + ], + "data": "0x", + "logIndex": 195, + "blockHash": "0xdf534f4d4c37a12be0f079ff45213c5de2a1c3963ff0b73f634bca39feb307ba" + }, + { + "transactionIndex": 29, + "blockNumber": 19059787, + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "address": "0x7AD3a979D45E1636558A5c3d8BD8a4dA4cB30349", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 196, + "blockHash": "0xdf534f4d4c37a12be0f079ff45213c5de2a1c3963ff0b73f634bca39feb307ba" + }, + { + "transactionIndex": 29, + "blockNumber": 19059787, + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "address": "0x7AD3a979D45E1636558A5c3d8BD8a4dA4cB30349", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 197, + "blockHash": "0xdf534f4d4c37a12be0f079ff45213c5de2a1c3963ff0b73f634bca39feb307ba" + }, + { + "transactionIndex": 29, + "blockNumber": 19059787, + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "address": "0x7AD3a979D45E1636558A5c3d8BD8a4dA4cB30349", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 198, + "blockHash": "0xdf534f4d4c37a12be0f079ff45213c5de2a1c3963ff0b73f634bca39feb307ba" + }, + { + "transactionIndex": 29, + "blockNumber": 19059787, + "transactionHash": "0xdd7e2bff643981e38c89ed893aa3af54e93bad5fe511692d90ef85daf8d8c580", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000b79fad4ca981472442f53d16365fdf0305ffd8e9" + ], + "data": "0x000000000000000000000000000000000000000000000000001260dee3b3a8000000000000000000000000000000000000000000000000000c35aa5f2d49a74200000000000000000000000000000000000000000000430027ec300b098128130000000000000000000000000000000000000000000000000c2349804995ff4200000000000000000000000000000000000000000000430027fe90e9ed34d013", + "logIndex": 199, + "blockHash": "0xdf534f4d4c37a12be0f079ff45213c5de2a1c3963ff0b73f634bca39feb307ba" + } + ], + "blockNumber": 19059787, + "cumulativeGasUsed": "4675949", + "status": 1, + "byzantium": true + }, + "args": [ + "0x03E76B81bb69BdCB4e34e12A9e77FD4F9e41AA17", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0xaa432dad00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733000000000000000000000000e7c89eb987c415b4233789e5cec0ee7407d2c47f000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016466c6f61742053686f727420466c697070336e696e670000000000000000000000000000000000000000000000000000000000000000000000000000000000046673463300000000000000000000000000000000000000000000000000000000" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/Staker.json b/deployments/polygon/Staker.json new file mode 100644 index 0000000..608251b --- /dev/null +++ b/deployments/polygon/Staker.json @@ -0,0 +1,1585 @@ +{ + "address": "0xe7C89eb987c415B4233789E5ceC0eE7407d2C47F", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accumulativeFloatIssuanceSnapshotIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accumulativeLong", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accumulativeShort", + "type": "uint256" + } + ], + "name": "AccumulativeIssuancePerStakedSynthSnapshotCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balanceIncentiveExponent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "safeExponentBitShifting", + "type": "uint256" + } + ], + "name": "BalanceIncentiveParamsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountFloatMinted", + "type": "uint256" + } + ], + "name": "FloatMinted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "floatPercentage", + "type": "uint256" + } + ], + "name": "FloatPercentageUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "exitFee_e18", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "period", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balanceIncentiveExponent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "balanceIncentiveEquilibriumOffset", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "safeExponentBitShifting", + "type": "uint256" + } + ], + "name": "MarketAddedToStaker", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "period", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplier", + "type": "uint256" + } + ], + "name": "MarketLaunchIncentiveParametersChanges", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "userShiftIndex", + "type": "uint256" + } + ], + "name": "NextPriceStakeShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastMintIndex", + "type": "uint256" + } + ], + "name": "StakeAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAmountStakedLong", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAmountStakedShort", + "type": "uint256" + } + ], + "name": "StakeShifted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "stakeWithdralFee", + "type": "uint256" + } + ], + "name": "StakeWithdrawalFeeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "StakeWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "floatTreasury", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "floatCapital", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "floatToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "floatPercentage", + "type": "uint256" + } + ], + "name": "StakerV1", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DISCOUNT_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FLOAT_ISSUANCE_FIXED_DECIMAL", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "accumulativeFloatPerSyntheticTokenSnapshots", + "outputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulativeFloatPerSyntheticToken_long", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulativeFloatPerSyntheticToken_short", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "address", + "name": "longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "shortToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "kInitialMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "unstakeFee_e18", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_balanceIncentiveCurve_exponent", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "_balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + } + ], + "name": "addNewStakingFund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "balanceIncentiveCurve_equilibriumOffset", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "balanceIncentiveCurve_exponent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_balanceIncentiveCurve_exponent", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "_balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "_safeExponentBitShifting", + "type": "uint256" + } + ], + "name": "changeBalanceIncentiveParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newFloatPercentage", + "type": "uint256" + } + ], + "name": "changeFloatPercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "newMarketUnstakeFee_e18", + "type": "uint256" + } + ], + "name": "changeUnstakeFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + } + ], + "name": "claimFloatCustom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimFloatCustomFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "floatCapital", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "floatPercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "floatToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "floatTreasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gems", + "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": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatTreasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatCapital", + "type": "address" + }, + { + "internalType": "address", + "name": "_discountSigner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_floatPercentage", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_gems", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "latestRewardIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "marketIndexOfToken", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketLaunchIncentive_multipliers", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketLaunchIncentive_period", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketUnstakeFee_e18", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "marketUpdateIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "longPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shortPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "longValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shortValue", + "type": "uint256" + } + ], + "name": "pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "safeExponentBitShifting", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + } + ], + "name": "shiftTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stakeFromUser", + "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": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "syntheticTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userAmountStaked", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userIndexOfLastClaimedReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_paymentToken_depositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_stakedActionIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNonce", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isWithdrawFromLong", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isWithdrawFromLong", + "type": "bool" + } + ], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isWithdrawFromLong", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "discountWithdrawFee", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "withdrawWithVoucher", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x1b33ad1e5d9f2dca681bdc2e0ea967b0de8bd060fd1cbfdb57c91f53090b6e26", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xe7C89eb987c415B4233789E5ceC0eE7407d2C47F", + "transactionIndex": 48, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000400000000020000000000000400000000000000000000000000000000000000000008000000000000000000000000000000004000000000000000000000002800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000800000000000000000000000000000000000000000000000200000040002000000000002000000000000000000000000000000000000004000000020000008000001001000000000000000000000000000100000000001000000000000000200000000000000000001000000000000000000000000100000", + "blockHash": "0x8e52848a928c66e26b980994a91b5592bffeea05ebc52a0445c397bf47e93ea5", + "transactionHash": "0x1b33ad1e5d9f2dca681bdc2e0ea967b0de8bd060fd1cbfdb57c91f53090b6e26", + "logs": [ + { + "transactionIndex": 48, + "blockNumber": 19058654, + "transactionHash": "0x1b33ad1e5d9f2dca681bdc2e0ea967b0de8bd060fd1cbfdb57c91f53090b6e26", + "address": "0xe7C89eb987c415B4233789E5ceC0eE7407d2C47F", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000011bf56dee7f3627985552a8b7aa6845a6636e3b7" + ], + "data": "0x", + "logIndex": 248, + "blockHash": "0x8e52848a928c66e26b980994a91b5592bffeea05ebc52a0445c397bf47e93ea5" + }, + { + "transactionIndex": 48, + "blockNumber": 19058654, + "transactionHash": "0x1b33ad1e5d9f2dca681bdc2e0ea967b0de8bd060fd1cbfdb57c91f53090b6e26", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x0000000000000000000000000000000000000000000000000002265a8afa68800000000000000000000000000000000000000000000000000d9c546d73f4622a000000000000000000000000000000000000000000006e187fdb88c9e33f11b90000000000000000000000000000000000000000000000000d9a2e12e8f9f9aa000000000000000000000000000000000000000000006e187fddaf246e397a39", + "logIndex": 249, + "blockHash": "0x8e52848a928c66e26b980994a91b5592bffeea05ebc52a0445c397bf47e93ea5" + } + ], + "blockNumber": 19058654, + "cumulativeGasUsed": "9548099", + "status": 1, + "byzantium": true + }, + "args": [ + "0x11BF56dEE7F3627985552A8B7Aa6845a6636E3B7", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0x" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "implementation": "0x11BF56dEE7F3627985552A8B7Aa6845a6636E3B7", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/Staker_Implementation.json b/deployments/polygon/Staker_Implementation.json new file mode 100644 index 0000000..9513573 --- /dev/null +++ b/deployments/polygon/Staker_Implementation.json @@ -0,0 +1,2182 @@ +{ + "address": "0x11BF56dEE7F3627985552A8B7Aa6845a6636E3B7", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accumulativeFloatIssuanceSnapshotIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accumulativeLong", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accumulativeShort", + "type": "uint256" + } + ], + "name": "AccumulativeIssuancePerStakedSynthSnapshotCreated", + "type": "event" + }, + { + "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": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balanceIncentiveExponent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "safeExponentBitShifting", + "type": "uint256" + } + ], + "name": "BalanceIncentiveParamsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountFloatMinted", + "type": "uint256" + } + ], + "name": "FloatMinted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "floatPercentage", + "type": "uint256" + } + ], + "name": "FloatPercentageUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "exitFee_e18", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "period", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balanceIncentiveExponent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "balanceIncentiveEquilibriumOffset", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "safeExponentBitShifting", + "type": "uint256" + } + ], + "name": "MarketAddedToStaker", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "period", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplier", + "type": "uint256" + } + ], + "name": "MarketLaunchIncentiveParametersChanges", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "userShiftIndex", + "type": "uint256" + } + ], + "name": "NextPriceStakeShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastMintIndex", + "type": "uint256" + } + ], + "name": "StakeAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAmountStakedLong", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAmountStakedShort", + "type": "uint256" + } + ], + "name": "StakeShifted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "stakeWithdralFee", + "type": "uint256" + } + ], + "name": "StakeWithdrawalFeeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "StakeWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "floatTreasury", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "floatCapital", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "floatToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "floatPercentage", + "type": "uint256" + } + ], + "name": "StakerV1", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DISCOUNT_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FLOAT_ISSUANCE_FIXED_DECIMAL", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "accumulativeFloatPerSyntheticTokenSnapshots", + "outputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulativeFloatPerSyntheticToken_long", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulativeFloatPerSyntheticToken_short", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "address", + "name": "longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "shortToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "kInitialMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "unstakeFee_e18", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_balanceIncentiveCurve_exponent", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "_balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + } + ], + "name": "addNewStakingFund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "balanceIncentiveCurve_equilibriumOffset", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "balanceIncentiveCurve_exponent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_balanceIncentiveCurve_exponent", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "_balanceIncentiveCurve_equilibriumOffset", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "_safeExponentBitShifting", + "type": "uint256" + } + ], + "name": "changeBalanceIncentiveParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newFloatPercentage", + "type": "uint256" + } + ], + "name": "changeFloatPercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "newMarketUnstakeFee_e18", + "type": "uint256" + } + ], + "name": "changeUnstakeFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + } + ], + "name": "claimFloatCustom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "marketIndexes", + "type": "uint32[]" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimFloatCustomFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "floatCapital", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "floatPercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "floatToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "floatTreasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gems", + "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": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatTreasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatCapital", + "type": "address" + }, + { + "internalType": "address", + "name": "_discountSigner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_floatPercentage", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_gems", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "latestRewardIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "marketIndexOfToken", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketLaunchIncentive_multipliers", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketLaunchIncentive_period", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "marketUnstakeFee_e18", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "marketUpdateIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "longPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shortPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "longValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shortValue", + "type": "uint256" + } + ], + "name": "pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "safeExponentBitShifting", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountSyntheticTokensToShift", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isShiftFromLong", + "type": "bool" + } + ], + "name": "shiftTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stakeFromUser", + "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": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "syntheticTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userAmountStaked", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userIndexOfLastClaimedReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_paymentToken_depositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNextPrice_stakedActionIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userNonce", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isWithdrawFromLong", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isWithdrawFromLong", + "type": "bool" + } + ], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isWithdrawFromLong", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "discountWithdrawFee", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "withdrawWithVoucher", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x79458ea43bcbce6d9415a1e5a3f8beeace51f6d52699369e986a03d00ffb0c33", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x11BF56dEE7F3627985552A8B7Aa6845a6636E3B7", + "transactionIndex": 49, + "gasUsed": "3968596", + "logsBloom": "0x00000000000000000000000000000000000000000020000000000000400000000000000000000000000000000000000000008000000000000000000000000000000004000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000800000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000008000001000000000000000000000000000000100000000000000000000000000200000000000000000000000000000000000000000000100000", + "blockHash": "0xbe66ff2b66f05ce457e6554076d26deb5abc9df92f27e6c866ea3af71ddce285", + "transactionHash": "0x79458ea43bcbce6d9415a1e5a3f8beeace51f6d52699369e986a03d00ffb0c33", + "logs": [ + { + "transactionIndex": 49, + "blockNumber": 19058651, + "transactionHash": "0x79458ea43bcbce6d9415a1e5a3f8beeace51f6d52699369e986a03d00ffb0c33", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x00000000000000000000000000000000000000000000000000226e32474fe2000000000000000000000000000000000000000000000000000dbec29fbb44442a000000000000000000000000000000000000000000006e1873c7802fffc1d2800000000000000000000000000000000000000000000000000d9c546d73f4622a000000000000000000000000000000000000000000006e1873e9ee624711b480", + "logIndex": 304, + "blockHash": "0xbe66ff2b66f05ce457e6554076d26deb5abc9df92f27e6c866ea3af71ddce285" + } + ], + "blockNumber": 19058651, + "cumulativeGasUsed": "18185897", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accumulativeFloatIssuanceSnapshotIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accumulativeLong\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accumulativeShort\",\"type\":\"uint256\"}],\"name\":\"AccumulativeIssuancePerStakedSynthSnapshotCreated\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceIncentiveExponent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"balanceIncentiveCurve_equilibriumOffset\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"safeExponentBitShifting\",\"type\":\"uint256\"}],\"name\":\"BalanceIncentiveParamsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountFloatMinted\",\"type\":\"uint256\"}],\"name\":\"FloatMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatPercentage\",\"type\":\"uint256\"}],\"name\":\"FloatPercentageUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"exitFee_e18\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceIncentiveExponent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"balanceIncentiveEquilibriumOffset\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"safeExponentBitShifting\",\"type\":\"uint256\"}],\"name\":\"MarketAddedToStaker\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplier\",\"type\":\"uint256\"}],\"name\":\"MarketLaunchIncentiveParametersChanges\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isShiftFromLong\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"userShiftIndex\",\"type\":\"uint256\"}],\"name\":\"NextPriceStakeShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastMintIndex\",\"type\":\"uint256\"}],\"name\":\"StakeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAmountStakedLong\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAmountStakedShort\",\"type\":\"uint256\"}],\"name\":\"StakeShifted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"stakeWithdralFee\",\"type\":\"uint256\"}],\"name\":\"StakeWithdrawalFeeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"StakeWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"floatTreasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"floatCapital\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"floatToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatPercentage\",\"type\":\"uint256\"}],\"name\":\"StakerV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DISCOUNT_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FLOAT_ISSUANCE_FIXED_DECIMAL\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"accumulativeFloatPerSyntheticTokenSnapshots\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accumulativeFloatPerSyntheticToken_long\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accumulativeFloatPerSyntheticToken_short\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"longToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"shortToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"kInitialMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeFee_e18\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_balanceIncentiveCurve_exponent\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"_balanceIncentiveCurve_equilibriumOffset\",\"type\":\"int256\"}],\"name\":\"addNewStakingFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"balanceIncentiveCurve_equilibriumOffset\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"balanceIncentiveCurve_exponent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_balanceIncentiveCurve_exponent\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"_balanceIncentiveCurve_equilibriumOffset\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"_safeExponentBitShifting\",\"type\":\"uint256\"}],\"name\":\"changeBalanceIncentiveParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newFloatPercentage\",\"type\":\"uint256\"}],\"name\":\"changeFloatPercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"newMarketUnstakeFee_e18\",\"type\":\"uint256\"}],\"name\":\"changeUnstakeFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"marketIndexes\",\"type\":\"uint32[]\"}],\"name\":\"claimFloatCustom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"marketIndexes\",\"type\":\"uint32[]\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"claimFloatCustomFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatCapital\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatTreasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gems\",\"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\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_floatToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_floatTreasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_floatCapital\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_discountSigner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_floatPercentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_gems\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"latestRewardIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"marketIndexOfToken\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketLaunchIncentive_multipliers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketLaunchIncentive_period\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketUnstakeFee_e18\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"marketUpdateIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"longPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shortPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"longValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shortValue\",\"type\":\"uint256\"}],\"name\":\"pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"safeExponentBitShifting\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountSyntheticTokensToShift\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isShiftFromLong\",\"type\":\"bool\"}],\"name\":\"shiftTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stakeFromUser\",\"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\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"syntheticTokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userAmountStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userIndexOfLastClaimedReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_paymentToken_depositAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNextPrice_stakedActionIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userNonce\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isWithdrawFromLong\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isWithdrawFromLong\",\"type\":\"bool\"}],\"name\":\"withdrawAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isWithdrawFromLong\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"withdrawAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"discountWithdrawFee\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"withdrawWithVoucher\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addNewStakingFund(uint32,address,address,uint256,uint256,uint256,uint256,int256)\":{\"params\":{\"_balanceIncentiveCurve_equilibriumOffset\":\"Offset for balance curve (see _calculateFloatPerSecond)\",\"_balanceIncentiveCurve_exponent\":\"Exponent for balance curve (see _calculateFloatPerSecond)\",\"kInitialMultiplier\":\"Initial boost on float generation for the market.\",\"kPeriod\":\"Period which the boost should last.\",\"longToken\":\"Address of the long token for the market.\",\"marketIndex\":\"Identifies the market.\",\"shortToken\":\"Address of the short token for the market.\",\"unstakeFee_e18\":\"Percentage of tokens that are levied on unstaking in base 1e18.\"}},\"changeBalanceIncentiveParameters(uint32,uint256,int256,uint256)\":{\"params\":{\"_balanceIncentiveCurve_equilibriumOffset\":\"The new offset.\",\"_balanceIncentiveCurve_exponent\":\"The new exponent for the curve.\",\"_safeExponentBitShifting\":\"The new bitshifting applied to the curve.\",\"marketIndex\":\"Identifies the market.\"}},\"changeFloatPercentage(uint256)\":{\"params\":{\"newFloatPercentage\":\"The new float percentage in base 1e18.\"}},\"changeUnstakeFee(uint32,uint256)\":{\"params\":{\"marketIndex\":\"Identifies the market.\",\"newMarketUnstakeFee_e18\":\"The new unstake fee.\"}},\"claimFloatCustom(uint32[])\":{\"params\":{\"marketIndexes\":\"Identifiers for the markets for which to mint float.\"}},\"claimFloatCustomFor(uint32[],address)\":{\"params\":{\"marketIndexes\":\"Identifiers for the markets for which to mint float.\",\"user\":\"The address of the user.\"}},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address,address,address,address,uint256,address)\":{\"details\":\"Calls OpenZeppelin's initializer modifier.\",\"params\":{\"_admin\":\"Address of the admin role.\",\"_floatCapital\":\"Address of the contract which earns a fixed percentage of Float.\",\"_floatPercentage\":\"Determines the float percentage that gets minted for Float Capital, base 1e18.\",\"_floatToken\":\"Address of the Float token earned by staking.\",\"_floatTreasury\":\"Address of the treasury contract for managing fees.\",\"_longShort\":\"Address of the LongShort contract, a deployed LongShort.sol\"}},\"pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(uint32,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"longPrice\":\"The price of the long token as defined in LongShort.sol\",\"longValue\":\"The value locked in the long side of the market.\",\"marketIndex\":\"An identifier for the market.\",\"marketUpdateIndex\":\"Current update index in the LongShort contract for this market.\",\"shortPrice\":\"The price of the short token as defined in LongShort.sol\",\"shortValue\":\"The value locked in the short side of the market.\"}},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"shiftTokens(uint256,uint32,bool)\":{\"params\":{\"amountSyntheticTokensToShift\":\"Amount of tokens to shift.\",\"isShiftFromLong\":\"Whether the shift is from long to short or short to long.\",\"marketIndex\":\"Identifier for the market.\"}},\"stakeFromUser(address,uint256)\":{\"params\":{\"amount\":\"Amount to stake.\",\"from\":\"Address to stake for.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"withdraw(uint32,bool,uint256)\":{\"params\":{\"amount\":\"Amount to withdraw.\",\"isWithdrawFromLong\":\"is synthetic token to be withdrawn long or short\",\"marketIndex\":\"Market index of staked synthetic token\"}},\"withdrawAll(uint32,bool)\":{\"params\":{\"isWithdrawFromLong\":\"is synthetic token to be withdrawn long or short\",\"marketIndex\":\"Market index of staked synthetic token\"}}},\"stateVariables\":{\"userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom\":{\"details\":\"marketIndex => usersAddress => amountUserRequestedToShiftAwayFromLongOnNextUpdate\"},\"userNextPrice_paymentToken_depositAmount\":{\"details\":\"marketIndex => usersAddress => stakedActionIndex\"},\"userNextPrice_stakedActionIndex\":{\"details\":\"marketIndex => usersAddress => stakedActionIndex\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addNewStakingFund(uint32,address,address,uint256,uint256,uint256,uint256,int256)\":{\"notice\":\"Sets this contract to track staking for a market in LongShort.sol\"},\"changeBalanceIncentiveParameters(uint32,uint256,int256,uint256)\":{\"notice\":\"Changes the balance incentive exponent for a market\"},\"changeFloatPercentage(uint256)\":{\"notice\":\"Changes percentage of float that is minted for float capital.\"},\"changeUnstakeFee(uint32,uint256)\":{\"notice\":\"Changes unstake fee for a market\"},\"claimFloatCustom(uint32[])\":{\"notice\":\"Mints outstanding float for msg.sender.\"},\"claimFloatCustomFor(uint32[],address)\":{\"notice\":\"Mints outstanding float on behalf of another user.\"},\"initialize(address,address,address,address,address,address,uint256,address)\":{\"notice\":\"Initializes the contract.\"},\"pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(uint32,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Adds new accumulativeIssuancePerStakedSynthSnapshots for the given long/short tokens. Called by the ILongShort contract whenever there is a state change for a market.\"},\"shiftTokens(uint256,uint32,bool)\":{\"notice\":\"Allows users to shift their staked tokens from one side of the market to the other at the next price.\"},\"stakeFromUser(address,uint256)\":{\"notice\":\"A user with synthetic tokens stakes by calling stake on the token contract which calls this function. We need to first update the state of the LongShort contract for this market before staking to correctly calculate user rewards.\"},\"withdraw(uint32,bool,uint256)\":{\"notice\":\"Withdraw function. Allows users to unstake.\"},\"withdrawAll(uint32,bool)\":{\"notice\":\"Allows users to withdraw their entire stake for a token.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Staker.sol\":\"Staker\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n __AccessControlEnumerable_init_unchained();\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {grantRole} to track enumerable memberships\\n */\\n function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\\n super.grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {revokeRole} to track enumerable memberships\\n */\\n function revokeRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\\n super.revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev Overload {renounceRole} to track enumerable memberships\\n */\\n function renounceRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\\n super.renounceRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev Overload {_setupRole} to track enumerable memberships\\n */\\n function _setupRole(bytes32 role, address account) internal virtual override {\\n super._setupRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2d8b1825d587f3384d6d87655f3cb66f0d71fe8dda7d98f2f9267a4bb842927d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf87bd7a150c81aad67bb354413fe55cb005e922c6e48d3580a63e32efa913c74\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x742c0fbab73bf595ca40025f6e81cb48dbd5e133950717f7befd062a925c0148\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\\n function __ERC20Burnable_init() internal initializer {\\n __Context_init_unchained();\\n __ERC20Burnable_init_unchained();\\n }\\n\\n function __ERC20Burnable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5321bbe08dd6e82e85222024dc300d4959ff8615742ad63135759883a19e02a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../security/PausableUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev ERC20 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n */\\nabstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable {\\n function __ERC20Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n __ERC20Pausable_init_unchained();\\n }\\n\\n function __ERC20Pausable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev See {ERC20-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n require(!paused(), \\\"ERC20Pausable: token transfer while paused\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x84f8ee06b780f3294755a13a74e7d4f11599b2c42a09d920f0a191a5f3c6f2dc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../extensions/ERC20BurnableUpgradeable.sol\\\";\\nimport \\\"../extensions/ERC20PausableUpgradeable.sol\\\";\\nimport \\\"../../../access/AccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev {ERC20} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n */\\ncontract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlEnumerableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable {\\n function initialize(string memory name, string memory symbol) public virtual initializer {\\n __ERC20PresetMinterPauser_init(name, symbol);\\n }\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\n * account that deploys the contract.\\n *\\n * See {ERC20-constructor}.\\n */\\n function __ERC20PresetMinterPauser_init(string memory name, string memory symbol) internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n __AccessControlEnumerable_init_unchained();\\n __ERC20_init_unchained(name, symbol);\\n __ERC20Burnable_init_unchained();\\n __Pausable_init_unchained();\\n __ERC20Pausable_init_unchained();\\n __ERC20PresetMinterPauser_init_unchained(name, symbol);\\n }\\n\\n function __ERC20PresetMinterPauser_init_unchained(string memory name, string memory symbol) internal initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n }\\n\\n /**\\n * @dev Creates `amount` new tokens for `to`.\\n *\\n * See {ERC20-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(address to, uint256 amount) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC20PresetMinterPauser: must have minter role to mint\\\");\\n _mint(to, amount);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC20Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC20PresetMinterPauser: must have pauser role to pause\\\");\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC20Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC20PresetMinterPauser: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override(ERC20Upgradeable, ERC20PausableUpgradeable) {\\n super._beforeTokenTransfer(from, to, amount);\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xdf3ba47b3559c6760157d0ec93be6d3aec6b5eb785b85acb20ac2bb0cb003b74\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9dc1ad66ada6a503bef1ffde62ac688c58eac660fe50c054f6e49e3b27ae295d\",\"license\":\"MIT\"},\"contracts/GEMS.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\n/** Contract giving user GEMS*/\\n\\n// Inspired by https://github.com/andrecronje/rarity/blob/main/rarity.sol\\n\\n/** @title GEMS */\\ncontract GEMS is AccessControlledAndUpgradeable {\\n bytes32 public constant GEM_ROLE = keccak256(\\\"GEM_ROLE\\\");\\n\\n uint256 constant gems_per_day = 250e18;\\n uint256 constant DAY = 1 days;\\n\\n mapping(address => uint256) public gems;\\n mapping(address => uint256) public streak;\\n mapping(address => uint256) public lastAction;\\n\\n event GemsCollected(address user, uint256 gems, uint256 streak);\\n\\n function initialize(\\n address _admin,\\n address _longShort,\\n address _staker\\n ) external initializer {\\n _AccessControlledAndUpgradeable_init(_admin);\\n _setupRole(GEM_ROLE, _longShort);\\n _setupRole(GEM_ROLE, _staker);\\n }\\n\\n // Say gm and get gems by performing an action in LongShort or Staker\\n function gm(address user) external {\\n if (hasRole(GEM_ROLE, msg.sender)) {\\n uint256 usersLastAction = lastAction[user];\\n uint256 blocktimestamp = block.timestamp;\\n\\n if (blocktimestamp - usersLastAction >= DAY) {\\n // Award gems\\n gems[user] += gems_per_day;\\n\\n // Increment streak\\n if (blocktimestamp - usersLastAction < 2 * DAY) {\\n streak[user] += 1;\\n } else {\\n streak[user] = 1; // reset streak to 1\\n }\\n\\n lastAction[user] = blocktimestamp;\\n }\\n emit GemsCollected(user, gems[user], streak[user]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0335305655aa936242355a082737ca1d3e819d38601a0bf3b1672158591e2abd\",\"license\":\"BUSL-1.1\"},\"contracts/Staker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\\\";\\n\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\nimport \\\"./interfaces/IFloatToken.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\nimport \\\"./GEMS.sol\\\";\\n\\ncontract Staker is IStaker, AccessControlledAndUpgradeable {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 VARIABLES \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n bytes32 public constant DISCOUNT_ROLE = keccak256(\\\"DISCOUNT_ROLE\\\");\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Fixed-precision constants \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n uint256 public constant FLOAT_ISSUANCE_FIXED_DECIMAL = 3e44;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Global state \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n address public floatCapital;\\n address public floatTreasury;\\n uint256 public floatPercentage;\\n\\n address public longShort;\\n address public floatToken;\\n\\n address public gems;\\n uint256[45] private __globalStateGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Market specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n mapping(uint32 => uint256) public marketLaunchIncentive_period; // seconds\\n mapping(uint32 => uint256) public marketLaunchIncentive_multipliers; // e18 scale\\n mapping(uint32 => uint256) public marketUnstakeFee_e18;\\n mapping(uint32 => uint256) public balanceIncentiveCurve_exponent;\\n mapping(uint32 => int256) public balanceIncentiveCurve_equilibriumOffset;\\n mapping(uint32 => uint256) public safeExponentBitShifting;\\n\\n mapping(uint32 => mapping(bool => address)) public syntheticTokens;\\n uint256[45] private __marketStateGap;\\n\\n mapping(address => uint32) public marketIndexOfToken;\\n mapping(address => uint32) public userNonce;\\n uint256[45] private __synthStateGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Reward specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n mapping(uint32 => uint256) public latestRewardIndex; // This is synced to be the same as LongShort\\n mapping(uint32 => mapping(uint256 => AccumulativeIssuancePerStakedSynthSnapshot))\\n public accumulativeFloatPerSyntheticTokenSnapshots;\\n struct AccumulativeIssuancePerStakedSynthSnapshot {\\n uint256 timestamp;\\n uint256 accumulativeFloatPerSyntheticToken_long;\\n uint256 accumulativeFloatPerSyntheticToken_short;\\n }\\n\\n uint256[45] private __rewardStateGap;\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 User specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n mapping(uint32 => mapping(address => uint256)) public userIndexOfLastClaimedReward;\\n mapping(address => mapping(address => uint256)) public override userAmountStaked;\\n uint256[45] private __userStateGap;\\n\\n /* \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 Next price action management specific \\u2550\\u2550\\u2550\\u2550\\u2550\\u2550 */\\n /// @dev marketIndex => usersAddress => stakedActionIndex\\n mapping(uint32 => mapping(address => uint256)) public userNextPrice_stakedActionIndex;\\n\\n /// @dev marketIndex => usersAddress => amountUserRequestedToShiftAwayFromLongOnNextUpdate\\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\\n public userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom;\\n\\n /// @dev marketIndex => usersAddress => stakedActionIndex\\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\\n public userNextPrice_paymentToken_depositAmount;\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MODIFIERS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function onlyAdminModifierLogic() internal virtual {\\n _checkRole(ADMIN_ROLE, msg.sender);\\n }\\n\\n modifier onlyAdmin() {\\n onlyAdminModifierLogic();\\n _;\\n }\\n\\n function onlyValidSyntheticModifierLogic(address _synth) internal virtual {\\n require(marketIndexOfToken[_synth] != 0, \\\"not valid synth\\\");\\n }\\n\\n modifier onlyValidSynthetic(address _synth) {\\n onlyValidSyntheticModifierLogic(_synth);\\n _;\\n }\\n\\n function onlyLongShortModifierLogic() internal virtual {\\n require(msg.sender == address(longShort), \\\"not LongShort\\\");\\n }\\n\\n modifier onlyLongShort() {\\n onlyLongShortModifierLogic();\\n _;\\n }\\n\\n function _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\\n uint32 marketIndex,\\n address user\\n ) internal virtual {\\n if (\\n userNextPrice_stakedActionIndex[marketIndex][msg.sender] != 0 &&\\n userNextPrice_stakedActionIndex[marketIndex][msg.sender] <= latestRewardIndex[marketIndex]\\n ) {\\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender);\\n }\\n }\\n\\n modifier updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\\n uint32 marketIndex,\\n address user\\n ) {\\n _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\\n _;\\n }\\n\\n modifier gemCollecting(address user) {\\n GEMS(gems).gm(user);\\n _;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 CONTRACT SET-UP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Initializes the contract.\\n @dev Calls OpenZeppelin's initializer modifier.\\n @param _admin Address of the admin role.\\n @param _longShort Address of the LongShort contract, a deployed LongShort.sol\\n @param _floatToken Address of the Float token earned by staking.\\n @param _floatTreasury Address of the treasury contract for managing fees.\\n @param _floatCapital Address of the contract which earns a fixed percentage of Float.\\n @param _floatPercentage Determines the float percentage that gets minted for Float Capital, base 1e18.\\n */\\n function initialize(\\n address _admin,\\n address _longShort,\\n address _floatToken,\\n address _floatTreasury,\\n address _floatCapital,\\n address _discountSigner,\\n uint256 _floatPercentage,\\n address _gems\\n ) external virtual initializer {\\n require(\\n _admin != address(0) &&\\n _longShort != address(0) &&\\n _floatToken != address(0) &&\\n _floatTreasury != address(0) &&\\n _floatCapital != address(0) &&\\n _gems != address(0) &&\\n _floatPercentage != 0\\n );\\n\\n floatCapital = _floatCapital;\\n floatTreasury = _floatTreasury;\\n longShort = _longShort;\\n floatToken = _floatToken;\\n gems = _gems;\\n\\n _AccessControlledAndUpgradeable_init(_admin);\\n _setupRole(DISCOUNT_ROLE, _discountSigner);\\n\\n _changeFloatPercentage(_floatPercentage);\\n\\n emit StakerV1(_admin, _floatTreasury, _floatCapital, _floatToken, _floatPercentage);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 ADMIN \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @dev Logic for changeFloatPercentage\\n function _changeFloatPercentage(uint256 newFloatPercentage) internal virtual {\\n require(newFloatPercentage <= 1e18 && newFloatPercentage > 0); // less than or equal to 100% and greater than 0%\\n floatPercentage = newFloatPercentage;\\n }\\n\\n /**\\n @notice Changes percentage of float that is minted for float capital.\\n @param newFloatPercentage The new float percentage in base 1e18.\\n */\\n function changeFloatPercentage(uint256 newFloatPercentage) external onlyAdmin {\\n _changeFloatPercentage(newFloatPercentage);\\n emit FloatPercentageUpdated(newFloatPercentage);\\n }\\n\\n /// @dev Logic for changeUnstakeFee\\n function _changeUnstakeFee(uint32 marketIndex, uint256 newMarketUnstakeFee_e18) internal virtual {\\n require(newMarketUnstakeFee_e18 <= 5e16); // Explicitly stating 5% fee as the max fee possible.\\n marketUnstakeFee_e18[marketIndex] = newMarketUnstakeFee_e18;\\n }\\n\\n /**\\n @notice Changes unstake fee for a market\\n @param marketIndex Identifies the market.\\n @param newMarketUnstakeFee_e18 The new unstake fee.\\n */\\n function changeUnstakeFee(uint32 marketIndex, uint256 newMarketUnstakeFee_e18)\\n external\\n onlyAdmin\\n {\\n _changeUnstakeFee(marketIndex, newMarketUnstakeFee_e18);\\n emit StakeWithdrawalFeeUpdated(marketIndex, newMarketUnstakeFee_e18);\\n }\\n\\n /// @dev Logic for changeBalanceIncentiveExponent\\n function _changeBalanceIncentiveParameters(\\n uint32 marketIndex,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset,\\n uint256 _safeExponentBitShifting\\n ) internal virtual {\\n // Unreasonable that we would ever shift this more than 90% either way\\n require(\\n _balanceIncentiveCurve_equilibriumOffset > -9e17 &&\\n _balanceIncentiveCurve_equilibriumOffset < 9e17,\\n \\\"balanceIncentiveCurve_equilibriumOffset out of bounds\\\"\\n );\\n require(_balanceIncentiveCurve_exponent > 0, \\\"balanceIncentiveCurve_exponent out of bounds\\\");\\n require(_safeExponentBitShifting < 100, \\\"safeExponentBitShifting out of bounds\\\");\\n\\n uint256 totalLocked = ILongShort(longShort).marketSideValueInPaymentToken(marketIndex, true) +\\n ILongShort(longShort).marketSideValueInPaymentToken(marketIndex, false);\\n\\n // SafeMATH will revert here if this value is too big.\\n (((totalLocked * 500) >> _safeExponentBitShifting)**_balanceIncentiveCurve_exponent);\\n // Required to ensure at least 3 digits of precision.\\n require(\\n totalLocked >> _safeExponentBitShifting > 100,\\n \\\"bit shifting too lange for total locked\\\"\\n );\\n\\n balanceIncentiveCurve_exponent[marketIndex] = _balanceIncentiveCurve_exponent;\\n balanceIncentiveCurve_equilibriumOffset[marketIndex] = _balanceIncentiveCurve_equilibriumOffset;\\n safeExponentBitShifting[marketIndex] = _safeExponentBitShifting;\\n }\\n\\n /**\\n @notice Changes the balance incentive exponent for a market\\n @param marketIndex Identifies the market.\\n @param _balanceIncentiveCurve_exponent The new exponent for the curve.\\n @param _balanceIncentiveCurve_equilibriumOffset The new offset.\\n @param _safeExponentBitShifting The new bitshifting applied to the curve.\\n */\\n function changeBalanceIncentiveParameters(\\n uint32 marketIndex,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset,\\n uint256 _safeExponentBitShifting\\n ) external onlyAdmin {\\n _changeBalanceIncentiveParameters(\\n marketIndex,\\n _balanceIncentiveCurve_exponent,\\n _balanceIncentiveCurve_equilibriumOffset,\\n _safeExponentBitShifting\\n );\\n\\n emit BalanceIncentiveParamsUpdated(\\n marketIndex,\\n _balanceIncentiveCurve_exponent,\\n _balanceIncentiveCurve_equilibriumOffset,\\n _safeExponentBitShifting\\n );\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 STAKING SETUP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Sets this contract to track staking for a market in LongShort.sol\\n @param marketIndex Identifies the market.\\n @param longToken Address of the long token for the market.\\n @param shortToken Address of the short token for the market.\\n @param kInitialMultiplier Initial boost on float generation for the market.\\n @param kPeriod Period which the boost should last.\\n @param unstakeFee_e18 Percentage of tokens that are levied on unstaking in base 1e18.\\n @param _balanceIncentiveCurve_exponent Exponent for balance curve (see _calculateFloatPerSecond)\\n @param _balanceIncentiveCurve_equilibriumOffset Offset for balance curve (see _calculateFloatPerSecond)\\n */\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longToken,\\n address shortToken,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external override onlyLongShort {\\n require(kInitialMultiplier >= 1e18, \\\"kInitialMultiplier must be >= 1e18\\\");\\n\\n // a safe initial default value\\n uint256 initialSafeExponentBitShifting = 50;\\n\\n marketIndexOfToken[longToken] = marketIndex;\\n marketIndexOfToken[shortToken] = marketIndex;\\n\\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0].timestamp = block.timestamp;\\n\\n syntheticTokens[marketIndex][true] = longToken;\\n syntheticTokens[marketIndex][false] = shortToken;\\n _changeBalanceIncentiveParameters(\\n marketIndex,\\n _balanceIncentiveCurve_exponent,\\n _balanceIncentiveCurve_equilibriumOffset,\\n initialSafeExponentBitShifting\\n );\\n\\n marketLaunchIncentive_period[marketIndex] = kPeriod;\\n marketLaunchIncentive_multipliers[marketIndex] = kInitialMultiplier;\\n\\n _changeUnstakeFee(marketIndex, unstakeFee_e18);\\n\\n emit MarketAddedToStaker(\\n marketIndex,\\n unstakeFee_e18,\\n kPeriod,\\n kInitialMultiplier,\\n _balanceIncentiveCurve_exponent,\\n _balanceIncentiveCurve_equilibriumOffset,\\n initialSafeExponentBitShifting\\n );\\n\\n emit AccumulativeIssuancePerStakedSynthSnapshotCreated(marketIndex, 0, 0, 0);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 GLOBAL FLT REWARD ACCUMULATION CALCULATION AND TRACKING FUNCTIONS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Returns the K factor parameters for the given market with sensible\\n defaults if they haven't been set yet.\\n @param marketIndex The market to change the parameters for.\\n @return period The period for which the k factor applies for in seconds.\\n @return multiplier The multiplier on Float generation in this period.\\n */\\n function _getMarketLaunchIncentiveParameters(uint32 marketIndex)\\n internal\\n view\\n virtual\\n returns (uint256 period, uint256 multiplier)\\n {\\n period = marketLaunchIncentive_period[marketIndex]; // seconds TODO change name to contain seconds\\n multiplier = marketLaunchIncentive_multipliers[marketIndex]; // 1e18 TODO change name to contain E18\\n\\n if (multiplier < 1e18) {\\n multiplier = 1e18; // multiplier of 1 by default\\n }\\n }\\n\\n /**\\n @notice Returns the extent to which a markets float generation should be adjusted\\n based on the market's launch incentive parameters. Should start at multiplier\\n then linearly change to 1e18 over time.\\n @param marketIndex Identifies the market.\\n @return k The calculated modifier for float generation.\\n */\\n function _getKValue(uint32 marketIndex) internal view virtual returns (uint256) {\\n // Parameters controlling the float issuance multiplier.\\n (uint256 kPeriod, uint256 kInitialMultiplier) = _getMarketLaunchIncentiveParameters(\\n marketIndex\\n );\\n\\n // Sanity check - under normal circumstances, the multipliers should\\n // *never* be set to a value < 1e18, as there are guards against this.\\n assert(kInitialMultiplier >= 1e18);\\n\\n uint256 initialTimestamp = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0]\\n .timestamp;\\n\\n if (block.timestamp - initialTimestamp < kPeriod) {\\n return\\n kInitialMultiplier -\\n (((kInitialMultiplier - 1e18) * (block.timestamp - initialTimestamp)) / kPeriod);\\n } else {\\n return 1e18;\\n }\\n }\\n\\n /*\\n @notice Computes the number of float tokens a user earns per second for\\n every long/short synthetic token they've staked. The returned value has\\n a fixed decimal scale of 1e42 (!!!) for numerical stability. The return\\n values are float per second per synthetic token (hence the requirement\\n to multiply by price)\\n @dev to see below math in latex form see:\\n https://ipfs.io/ipfs/QmRWbr8P1F588XqRTzm7wCsRPu8DcDVPWGriBach4f22Fq/staker-fps.pdf\\n to interact with the equations see https://www.desmos.com/calculator/optkaxyihr\\n @param marketIndex The market referred to.\\n @param longPrice Price of the synthetic long token in units of payment token\\n @param shortPrice Price of the synthetic short token in units of payment token\\n @param longValue Amount of payment token in the long side of the market\\n @param shortValue Amount of payment token in the short side of the market\\n @return longFloatPerSecond Float token per second per long synthetic token\\n @return shortFloatPerSecond Float token per second per short synthetic token\\n */\\n function _calculateFloatPerSecond(\\n uint32 marketIndex,\\n uint256 longPrice,\\n uint256 shortPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) internal view virtual returns (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) {\\n // A float issuance multiplier that starts high and decreases linearly\\n // over time to a value of 1. This incentivises users to stake early.\\n uint256 k = _getKValue(marketIndex);\\n\\n uint256 totalLocked = (longValue + shortValue);\\n\\n // we need to scale this number by the totalLocked so that the offset remains consistent accross market size\\n\\n int256 equilibriumOffsetMarketScaled = (balanceIncentiveCurve_equilibriumOffset[marketIndex] *\\n int256(totalLocked)) / 2e18;\\n\\n uint256 safetyBitShifting = safeExponentBitShifting[marketIndex];\\n\\n // Float is scaled by the percentage of the total market value held in\\n // the opposite position. This incentivises users to stake on the\\n // weaker position.\\n if (int256(shortValue) - (2 * equilibriumOffsetMarketScaled) < int256(longValue)) {\\n if (equilibriumOffsetMarketScaled >= int256(shortValue)) {\\n // edge case: imbalanced far past the equilibrium offset - full rewards go to short token\\n // extremely unlikely to happen in practice\\n return (0, k * shortPrice);\\n }\\n\\n uint256 numerator = (uint256(int256(shortValue) - equilibriumOffsetMarketScaled) >>\\n (safetyBitShifting - 1))**balanceIncentiveCurve_exponent[marketIndex];\\n\\n uint256 denominator = ((totalLocked >> safetyBitShifting) **\\n balanceIncentiveCurve_exponent[marketIndex]);\\n\\n // NOTE: `x * 5e17` == `(x * 1e18) / 2`\\n uint256 longRewardUnscaled = (numerator * 5e17) / denominator;\\n uint256 shortRewardUnscaled = 1e18 - longRewardUnscaled;\\n\\n return (\\n (longRewardUnscaled * k * longPrice) / 1e18,\\n (shortRewardUnscaled * k * shortPrice) / 1e18\\n );\\n } else {\\n if (-equilibriumOffsetMarketScaled >= int256(longValue)) {\\n // edge case: imbalanced far past the equilibrium offset - full rewards go to long token\\n // extremely unlikely to happen in practice\\n return (k * longPrice, 0);\\n }\\n\\n uint256 numerator = (uint256(int256(longValue) + equilibriumOffsetMarketScaled) >>\\n (safetyBitShifting - 1))**balanceIncentiveCurve_exponent[marketIndex];\\n\\n uint256 denominator = ((totalLocked >> safetyBitShifting) **\\n balanceIncentiveCurve_exponent[marketIndex]);\\n\\n // NOTE: `x * 5e17` == `(x * 1e18) / 2`\\n uint256 shortRewardUnscaled = (numerator * 5e17) / denominator;\\n uint256 longRewardUnscaled = 1e18 - shortRewardUnscaled;\\n\\n return (\\n (longRewardUnscaled * k * longPrice) / 1e18,\\n (shortRewardUnscaled * k * shortPrice) / 1e18\\n );\\n }\\n }\\n\\n /**\\n @notice Computes the time since last accumulativeIssuancePerStakedSynthSnapshot for the given market in seconds.\\n @param marketIndex The market referred to.\\n @return timeDelta The time difference in seconds\\n */\\n function _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\\n uint32 marketIndex,\\n uint256 previousMarketUpdateIndex\\n ) internal view virtual returns (uint256 timeDelta) {\\n return\\n block.timestamp -\\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex].timestamp;\\n }\\n\\n /**\\n @notice Computes new cumulative sum of 'r' value since last accumulativeIssuancePerStakedSynthSnapshot. We use\\n cumulative 'r' value to avoid looping during issuance. Note that the\\n cumulative sum is kept in 1e42 scale (!!!) to avoid numerical issues.\\n @param shortValue The value locked in the short side of the market.\\n @param longValue The value locked in the long side of the market.\\n @param shortPrice The price of the short token as defined in LongShort.sol\\n @param longPrice The price of the long token as defined in LongShort.sol\\n @param marketIndex An identifier for the market.\\n @return longCumulativeRates The long cumulative sum.\\n @return shortCumulativeRates The short cumulative sum.\\n */\\n function _calculateNewCumulativeIssuancePerStakedSynth(\\n uint32 marketIndex,\\n uint256 previousMarketUpdateIndex,\\n uint256 longPrice,\\n uint256 shortPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) internal view virtual returns (uint256 longCumulativeRates, uint256 shortCumulativeRates) {\\n // Compute the current 'r' value for float issuance per second.\\n (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) = _calculateFloatPerSecond(\\n marketIndex,\\n longPrice,\\n shortPrice,\\n longValue,\\n shortValue\\n );\\n\\n // Compute time since last accumulativeIssuancePerStakedSynthSnapshot for the given token.\\n uint256 timeDelta = _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\\n marketIndex,\\n previousMarketUpdateIndex\\n );\\n\\n // Compute new cumulative 'r' value total.\\n return (\\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex]\\n .accumulativeFloatPerSyntheticToken_long + (timeDelta * longFloatPerSecond),\\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex]\\n .accumulativeFloatPerSyntheticToken_short + (timeDelta * shortFloatPerSecond)\\n );\\n }\\n\\n /**\\n @notice Adds new accumulativeIssuancePerStakedSynthSnapshots for the given long/short tokens. Called by the\\n ILongShort contract whenever there is a state change for a market.\\n @param marketIndex An identifier for the market.\\n @param marketUpdateIndex Current update index in the LongShort contract for this market.\\n @param shortValue The value locked in the short side of the market.\\n @param longValue The value locked in the long side of the market.\\n @param shortPrice The price of the short token as defined in LongShort.sol\\n @param longPrice The price of the long token as defined in LongShort.sol\\n */\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longPrice,\\n uint256 shortPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external override onlyLongShort {\\n (\\n uint256 newLongAccumulativeValue,\\n uint256 newShortAccumulativeValue\\n ) = _calculateNewCumulativeIssuancePerStakedSynth(\\n marketIndex,\\n marketUpdateIndex - 1,\\n longPrice,\\n shortPrice,\\n longValue,\\n shortValue\\n );\\n\\n // Set cumulative 'r' value on new accumulativeIssuancePerStakedSynthSnapshot.\\n\\n AccumulativeIssuancePerStakedSynthSnapshot\\n storage accumulativeFloatPerSyntheticTokenSnapshot = accumulativeFloatPerSyntheticTokenSnapshots[\\n marketIndex\\n ][marketUpdateIndex];\\n accumulativeFloatPerSyntheticTokenSnapshot\\n .accumulativeFloatPerSyntheticToken_long = newLongAccumulativeValue;\\n accumulativeFloatPerSyntheticTokenSnapshot\\n .accumulativeFloatPerSyntheticToken_short = newShortAccumulativeValue;\\n\\n // Set timestamp on new accumulativeIssuancePerStakedSynthSnapshot.\\n accumulativeFloatPerSyntheticTokenSnapshot.timestamp = block.timestamp;\\n\\n // Update latest index to point to new accumulativeIssuancePerStakedSynthSnapshot.\\n latestRewardIndex[marketIndex] = marketUpdateIndex;\\n\\n emit AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n marketIndex,\\n marketUpdateIndex,\\n newLongAccumulativeValue,\\n newShortAccumulativeValue\\n );\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 USER REWARD STATE FUNCTIONS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @dev Calculates the accumulated float in a specific range of staker snapshots\\n function _calculateAccumulatedFloatInRange(\\n uint32 marketIndex,\\n uint256 amountStakedLong,\\n uint256 amountStakedShort,\\n uint256 rewardIndexFrom,\\n uint256 rewardIndexTo\\n ) internal view virtual returns (uint256 floatReward) {\\n if (amountStakedLong > 0) {\\n uint256 accumDeltaLong = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][\\n rewardIndexTo\\n ].accumulativeFloatPerSyntheticToken_long -\\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom]\\n .accumulativeFloatPerSyntheticToken_long;\\n floatReward += (accumDeltaLong * amountStakedLong) / FLOAT_ISSUANCE_FIXED_DECIMAL;\\n }\\n\\n if (amountStakedShort > 0) {\\n uint256 accumDeltaShort = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][\\n rewardIndexTo\\n ].accumulativeFloatPerSyntheticToken_short -\\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom]\\n .accumulativeFloatPerSyntheticToken_short;\\n floatReward += (accumDeltaShort * amountStakedShort) / FLOAT_ISSUANCE_FIXED_DECIMAL;\\n }\\n }\\n\\n /**\\n @notice Calculates float owed to the user since the user last minted float for a market.\\n @param marketIndex Identifier for the market which the user staked in.\\n @param user The address of the user.\\n @return floatReward The amount of float owed.\\n */\\n function _calculateAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user)\\n internal\\n virtual\\n returns (uint256 floatReward)\\n {\\n address longToken = syntheticTokens[marketIndex][true];\\n address shortToken = syntheticTokens[marketIndex][false];\\n\\n uint256 amountStakedLong = userAmountStaked[longToken][user];\\n uint256 amountStakedShort = userAmountStaked[shortToken][user];\\n\\n uint256 usersLastRewardIndex = userIndexOfLastClaimedReward[marketIndex][user];\\n\\n uint256 currentRewardIndex = latestRewardIndex[marketIndex];\\n\\n // Don't do the calculation and return zero immediately if there is no change\\n if (usersLastRewardIndex == currentRewardIndex) {\\n return 0;\\n }\\n\\n uint256 usersShiftIndex = userNextPrice_stakedActionIndex[marketIndex][user];\\n // if there is a change in the users tokens held due to a token shift (or possibly another action in the future)\\n if (usersShiftIndex > 0 && usersShiftIndex <= currentRewardIndex) {\\n floatReward = _calculateAccumulatedFloatInRange(\\n marketIndex,\\n amountStakedLong,\\n amountStakedShort,\\n usersLastRewardIndex,\\n usersShiftIndex\\n );\\n\\n // Update the users balances\\n\\n uint256 amountToShiftAwayFromCurrentSide = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\\n marketIndex\\n ][true][user];\\n // Handle shifts from LONG side:\\n if (amountToShiftAwayFromCurrentSide > 0) {\\n amountStakedShort += ILongShort(longShort).getAmountSyntheticTokenToMintOnTargetSide(\\n marketIndex,\\n amountToShiftAwayFromCurrentSide,\\n true,\\n usersShiftIndex\\n );\\n\\n amountStakedLong -= amountToShiftAwayFromCurrentSide;\\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][user] = 0;\\n }\\n\\n amountToShiftAwayFromCurrentSide = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\\n marketIndex\\n ][false][user];\\n // Handle shifts from SHORT side:\\n if (amountToShiftAwayFromCurrentSide > 0) {\\n amountStakedLong += ILongShort(longShort).getAmountSyntheticTokenToMintOnTargetSide(\\n marketIndex,\\n amountToShiftAwayFromCurrentSide,\\n false,\\n usersShiftIndex\\n );\\n\\n amountStakedShort -= amountToShiftAwayFromCurrentSide;\\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][user] = 0;\\n }\\n\\n // Save the users updated staked amounts\\n userAmountStaked[longToken][user] = amountStakedLong;\\n userAmountStaked[shortToken][user] = amountStakedShort;\\n\\n emit StakeShifted(user, marketIndex, amountStakedLong, amountStakedShort);\\n\\n floatReward += _calculateAccumulatedFloatInRange(\\n marketIndex,\\n amountStakedLong,\\n amountStakedShort,\\n usersShiftIndex,\\n currentRewardIndex\\n );\\n\\n userNextPrice_stakedActionIndex[marketIndex][user] = 0;\\n } else {\\n floatReward = _calculateAccumulatedFloatInRange(\\n marketIndex,\\n amountStakedLong,\\n amountStakedShort,\\n usersLastRewardIndex,\\n currentRewardIndex\\n );\\n }\\n }\\n\\n /**\\n @notice Mints float for a user.\\n @dev Mints a fixed percentage for Float capital.\\n @param user The address of the user.\\n @param floatToMint The amount of float to mint.\\n */\\n function _mintFloat(address user, uint256 floatToMint) internal virtual {\\n IFloatToken(floatToken).mint(user, floatToMint);\\n IFloatToken(floatToken).mint(floatCapital, (floatToMint * floatPercentage) / 1e18);\\n }\\n\\n /**\\n @notice Mints float owed to a user for a market since they last minted.\\n @param marketIndex An identifier for the market.\\n @param user The address of the user.\\n */\\n function _mintAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user)\\n internal\\n virtual\\n {\\n uint256 floatToMint = _calculateAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\\n\\n if (floatToMint > 0) {\\n // Set the user has claimed up until now, stops them setting this forward\\n userIndexOfLastClaimedReward[marketIndex][user] = latestRewardIndex[marketIndex];\\n\\n _mintFloat(user, floatToMint);\\n emit FloatMinted(user, marketIndex, floatToMint);\\n }\\n }\\n\\n /**\\n @notice Mints float owed to a user for multiple markets, since they last minted for those markets.\\n @param marketIndexes Identifiers for the markets.\\n @param user The address of the user.\\n */\\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(\\n uint32[] calldata marketIndexes,\\n address user\\n ) internal virtual {\\n uint256 floatTotal = 0;\\n uint256 length = marketIndexes.length;\\n for (uint256 i = 0; i < length; i++) {\\n uint256 floatToMint = _calculateAccumulatedFloatAndExecuteOutstandingShifts(\\n marketIndexes[i],\\n user\\n );\\n\\n if (floatToMint > 0) {\\n // Set the user has claimed up until now, stops them setting this forward\\n userIndexOfLastClaimedReward[marketIndexes[i]][user] = latestRewardIndex[marketIndexes[i]];\\n\\n floatTotal += floatToMint;\\n\\n emit FloatMinted(user, marketIndexes[i], floatToMint);\\n }\\n }\\n if (floatTotal > 0) {\\n _mintFloat(user, floatTotal);\\n }\\n }\\n\\n /**\\n @notice Mints outstanding float for msg.sender.\\n @param marketIndexes Identifiers for the markets for which to mint float.\\n */\\n function claimFloatCustom(uint32[] calldata marketIndexes) external {\\n ILongShort(longShort).updateSystemStateMulti(marketIndexes);\\n _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, msg.sender);\\n }\\n\\n /**\\n @notice Mints outstanding float on behalf of another user.\\n @param marketIndexes Identifiers for the markets for which to mint float.\\n @param user The address of the user.\\n */\\n function claimFloatCustomFor(uint32[] calldata marketIndexes, address user) external {\\n // Unbounded loop - users are responsible for paying their own gas costs on these and it doesn't effect the rest of the system.\\n // No need to impose limit.\\n ILongShort(longShort).updateSystemStateMulti(marketIndexes);\\n _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, user);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 STAKING \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice A user with synthetic tokens stakes by calling stake on the token\\n contract which calls this function. We need to first update the\\n state of the LongShort contract for this market before staking to correctly calculate user rewards.\\n @param amount Amount to stake.\\n @param from Address to stake for.\\n */\\n function stakeFromUser(address from, uint256 amount)\\n external\\n virtual\\n override\\n onlyValidSynthetic(msg.sender)\\n gemCollecting(from)\\n {\\n uint32 marketIndex = marketIndexOfToken[msg.sender];\\n ILongShort(longShort).updateSystemState(marketIndex);\\n\\n uint256 userCurrentIndexOfLastClaimedReward = userIndexOfLastClaimedReward[marketIndex][from];\\n uint256 currentRewardIndex = latestRewardIndex[marketIndex];\\n // If they already have staked and have rewards due, mint these.\\n if (\\n userCurrentIndexOfLastClaimedReward != 0 &&\\n userCurrentIndexOfLastClaimedReward < currentRewardIndex\\n ) {\\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, from);\\n }\\n\\n userAmountStaked[msg.sender][from] += amount;\\n\\n // NOTE: Users retroactively earn a little bit of FLT because they start earning from the previous update index.\\n userIndexOfLastClaimedReward[marketIndex][from] = currentRewardIndex;\\n\\n emit StakeAdded(from, msg.sender, amount, currentRewardIndex);\\n }\\n\\n /**\\n @notice Allows users to shift their staked tokens from one side of the market to\\n the other at the next price.\\n @param amountSyntheticTokensToShift Amount of tokens to shift.\\n @param marketIndex Identifier for the market.\\n @param isShiftFromLong Whether the shift is from long to short or short to long.\\n */\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n )\\n external\\n virtual\\n override\\n updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\\n marketIndex,\\n msg.sender\\n )\\n gemCollecting(msg.sender)\\n {\\n require(amountSyntheticTokensToShift > 0, \\\"No zero shifts.\\\");\\n address token = syntheticTokens[marketIndex][isShiftFromLong];\\n uint256 totalAmountForNextShift = amountSyntheticTokensToShift +\\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][isShiftFromLong][\\n msg.sender\\n ];\\n\\n require(\\n userAmountStaked[token][msg.sender] >= totalAmountForNextShift,\\n \\\"Not enough tokens to shift\\\"\\n );\\n\\n ILongShort(longShort).shiftPositionNextPrice(\\n marketIndex,\\n amountSyntheticTokensToShift,\\n isShiftFromLong\\n );\\n\\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][isShiftFromLong][\\n msg.sender\\n ] = totalAmountForNextShift;\\n\\n uint256 userRewardIndex = latestRewardIndex[marketIndex] + 1;\\n userNextPrice_stakedActionIndex[marketIndex][msg.sender] = userRewardIndex;\\n\\n emit NextPriceStakeShift(\\n msg.sender,\\n marketIndex,\\n amountSyntheticTokensToShift,\\n isShiftFromLong,\\n userRewardIndex\\n );\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 WITHDRAWAL & MINTING \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Internal logic for withdrawing stakes.\\n @dev Mint user any outstanding float before withdrawing.\\n @param marketIndex Market index of token.\\n @param amount Amount to withdraw.\\n @param token Synthetic token that was staked.\\n */\\n function _withdraw(\\n uint32 marketIndex,\\n address token,\\n uint256 amount\\n ) internal virtual gemCollecting(msg.sender) {\\n uint256 amountFees = (amount * marketUnstakeFee_e18[marketIndex]) / 1e18;\\n\\n ISyntheticToken(token).transfer(floatTreasury, amountFees);\\n ISyntheticToken(token).transfer(msg.sender, amount - amountFees);\\n\\n emit StakeWithdrawn(msg.sender, token, amount);\\n }\\n\\n function _withdrawPrepLogic(\\n uint32 marketIndex,\\n bool isWithdrawFromLong,\\n uint256 amount,\\n address token\\n ) internal {\\n ILongShort(longShort).updateSystemState(marketIndex);\\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender);\\n\\n uint256 currentAmountStaked = userAmountStaked[token][msg.sender];\\n // If this value is greater than zero they have pending nextPriceShifts; don't allow user to shit these reserved tokens.\\n uint256 amountToShiftForThisToken = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\\n marketIndex\\n ][isWithdrawFromLong][msg.sender];\\n\\n unchecked {\\n require(currentAmountStaked >= amount + amountToShiftForThisToken, \\\"not enough to withdraw\\\");\\n userAmountStaked[token][msg.sender] = currentAmountStaked - amount;\\n }\\n }\\n\\n /**\\n @notice Withdraw function. Allows users to unstake.\\n @param amount Amount to withdraw.\\n @param marketIndex Market index of staked synthetic token\\n @param isWithdrawFromLong is synthetic token to be withdrawn long or short\\n */\\n function withdraw(\\n uint32 marketIndex,\\n bool isWithdrawFromLong,\\n uint256 amount\\n ) external {\\n address token = syntheticTokens[marketIndex][isWithdrawFromLong];\\n _withdrawPrepLogic(marketIndex, isWithdrawFromLong, amount, token);\\n _withdraw(marketIndex, token, amount);\\n }\\n\\n /**\\n @notice Allows users to withdraw their entire stake for a token.\\n @param marketIndex Market index of staked synthetic token\\n @param isWithdrawFromLong is synthetic token to be withdrawn long or short\\n */\\n function withdrawAll(uint32 marketIndex, bool isWithdrawFromLong) external {\\n ILongShort(longShort).updateSystemState(marketIndex);\\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender);\\n\\n address token = syntheticTokens[marketIndex][isWithdrawFromLong];\\n\\n uint256 userAmountStakedBeforeWithdrawal = userAmountStaked[token][msg.sender];\\n\\n uint256 amountToShiftForThisToken = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\\n marketIndex\\n ][isWithdrawFromLong][msg.sender];\\n userAmountStaked[token][msg.sender] = amountToShiftForThisToken;\\n\\n _withdraw(marketIndex, token, userAmountStakedBeforeWithdrawal - amountToShiftForThisToken);\\n }\\n\\n function _hasher(\\n uint32 marketIndex,\\n bool isWithdrawFromLong,\\n address user,\\n uint256 withdrawAmount,\\n uint256 expiry,\\n uint256 nonce,\\n uint256 discountWithdrawFee\\n ) internal pure returns (bytes32) {\\n return\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n keccak256(\\n abi.encodePacked(\\n marketIndex,\\n isWithdrawFromLong,\\n user,\\n withdrawAmount,\\n expiry,\\n nonce,\\n discountWithdrawFee\\n )\\n )\\n )\\n );\\n }\\n\\n function withdrawWithVoucher(\\n uint32 marketIndex,\\n bool isWithdrawFromLong,\\n uint256 withdrawAmount,\\n uint256 expiry,\\n uint256 nonce,\\n uint256 discountWithdrawFee,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external gemCollecting(msg.sender) {\\n address discountSigner = ecrecover(\\n _hasher(\\n marketIndex,\\n isWithdrawFromLong,\\n msg.sender,\\n withdrawAmount,\\n expiry,\\n nonce,\\n discountWithdrawFee\\n ),\\n v,\\n r,\\n s\\n );\\n hasRole(DISCOUNT_ROLE, discountSigner);\\n\\n require(block.timestamp < expiry, \\\"coupon expired\\\");\\n require(userNonce[msg.sender] == nonce, \\\"invalid nonce\\\");\\n require(discountWithdrawFee < marketUnstakeFee_e18[marketIndex], \\\"bad discount fee\\\");\\n userNonce[msg.sender] = userNonce[msg.sender] + 1;\\n\\n address token = syntheticTokens[marketIndex][isWithdrawFromLong];\\n\\n _withdrawPrepLogic(marketIndex, isWithdrawFromLong, withdrawAmount, token);\\n\\n uint256 amountFees = (withdrawAmount * discountWithdrawFee) / 1e18;\\n ISyntheticToken(token).transfer(floatTreasury, amountFees);\\n ISyntheticToken(token).transfer(msg.sender, withdrawAmount - amountFees);\\n emit StakeWithdrawn(msg.sender, token, withdrawAmount);\\n }\\n}\\n\",\"keccak256\":\"0x21eb0353226842d765b075a2c37acade17c0bd6f7d998cdc0dfeed5dcf5fb88e\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IFloatToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IFloatToken {\\n function mint(address to, uint256 amount) external;\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function burnFrom(address account, uint256 amount) external virtual;\\n}\\n\",\"keccak256\":\"0xdec0736a73d0855ee353797430e196f9be074ccd728209e28e881ffa24d76e5d\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506146d6806100206000396000f3fe6080604052600436106102935760003560e01c80639441752f1161015a578063c2b80072116100c1578063eae5a8d91161007a578063eae5a8d9146109a1578063edb010d7146109c1578063ef9c3052146109e1578063f344acc914610a0f578063f72c0d8b14610a2f578063f9fe734e14610a6357610293565b8063c2b80072146108a6578063d547741f146108e5578063dc86fe5014610905578063e39ac04414610933578063e68f3dbe14610961578063e955a3481461098157610293565b8063b45e86cf11610113578063b45e86cf146107b4578063ba89f7b8146107ed578063bda69fd81461080d578063be751cb71461082d578063c16199e31461084d578063c17f8ce91461086d57610293565b80639441752f146106be5780639e59fd0f146106fd578063a217fddf1461071d578063a538415c14610732578063b054c4a114610752578063b0956b5f1461079457610293565b80634f1ef286116101fe578063738f4b8e116101b7578063738f4b8e146105d857806375b238fc146105f857806385fcb8e31461062c57806386cbde1f1461065a5780638e659c081461067e57806391d148541461069e57610293565b80634f1ef286146105075780635892457d1461051a5780635ac76ce1146105305780636a5304df146105695780636c3050551461059757806372b124da146105b857610293565b80632e04b8e7116102505780632e04b8e7146103dc5780632f2ff15d1461041057806336568abe146104305780633659cfe6146104505780633733cf49146104705780633ebff44f146104a457610293565b806301ffc9a7146102985780630ca5a052146102cd57806313e8868a146102ef57806315f2081d1461032b578063248a9ca31461037457806329949872146103a4575b600080fd5b3480156102a457600080fd5b506102b86102b3366004613e90565b610a91565b60405190151581526020015b60405180910390f35b3480156102d957600080fd5b506102ed6102e83660046140eb565b610aca565b005b3480156102fb57600080fd5b5061031d61030a366004613f0f565b6101306020526000908152604090205481565b6040519081526020016102c4565b34801561033757600080fd5b5061035f610346366004613be7565b6101626020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016102c4565b34801561038057600080fd5b5061031d61038f366004613e56565b60009081526065602052604090206001015490565b3480156103b057600080fd5b5060fe546103c4906001600160a01b031681565b6040516001600160a01b0390911681526020016102c4565b3480156103e857600080fd5b5061035f6103f7366004613be7565b6101636020526000908152604090205463ffffffff1681565b34801561041c57600080fd5b506102ed61042b366004613e6e565b610b1f565b34801561043c57600080fd5b506102ed61044b366004613e6e565b610b4b565b34801561045c57600080fd5b506102ed61046b366004613be7565b610bce565b34801561047c57600080fd5b5061031d7fce9a6d3180818296cf6add4d55c45a6cd9e315597ee1da1e2313c503391736cd81565b3480156104b057600080fd5b506104ec6104bf3660046140eb565b61019260209081526000928352604080842090915290825290208054600182015460029092015490919083565b604080519384526020840192909252908201526060016102c4565b6102ed610515366004613cc2565b610bf5565b34801561052657600080fd5b5061031d60fd5481565b34801561053c57600080fd5b5061031d61054b366004613f29565b6101c060209081526000928352604080842090915290825290205481565b34801561057557600080fd5b5061031d610584366004613f0f565b61012e6020526000908152604090205481565b3480156105a357600080fd5b50610100546103c4906001600160a01b031681565b3480156105c457600080fd5b506102ed6105d3366004614063565b610c0a565b3480156105e457600080fd5b506102ed6105f3366004613da8565b6110a7565b34801561060457600080fd5b5061031d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561063857600080fd5b5061031d610647366004613f0f565b6101336020526000908152604090205481565b34801561066657600080fd5b5061031d6cd73d4c35b9df8aa7d6c3003573602c1b81565b34801561068a57600080fd5b506102ed610699366004613c33565b611116565b3480156106aa57600080fd5b506102b86106b9366004613e6e565b6112fb565b3480156106ca57600080fd5b5061031d6106d9366004613fea565b6101f060209081526000938452604080852082529284528284209052825290205481565b34801561070957600080fd5b506102ed610718366004613e56565b611328565b34801561072957600080fd5b5061031d600081565b34801561073e57600080fd5b506102ed61074d366004613fb4565b61136f565b34801561075e57600080fd5b506103c461076d366004613fb4565b6101346020908152600092835260408084209091529082529020546001600160a01b031681565b3480156107a057600080fd5b506102ed6107af366004613f44565b611466565b3480156107c057600080fd5b5061031d6107cf366004613f29565b6101ef60209081526000928352604080842090915290825290205481565b3480156107f957600080fd5b5060fb546103c4906001600160a01b031681565b34801561081957600080fd5b506102ed61082836600461413e565b611666565b34801561083957600080fd5b506102ed610848366004614106565b611711565b34801561085957600080fd5b5060fc546103c4906001600160a01b031681565b34801561087957600080fd5b5061031d610888366004613c01565b6101c160209081526000928352604080842090915290825290205481565b3480156108b257600080fd5b5061031d6108c1366004613fea565b6101f160209081526000938452604080852082529284528284209052825290205481565b3480156108f157600080fd5b506102ed610900366004613e6e565b611779565b34801561091157600080fd5b5061031d610920366004613f0f565b6101326020526000908152604090205481565b34801561093f57600080fd5b5061031d61094e366004613f0f565b6101916020526000908152604090205481565b34801561096d57600080fd5b506102ed61097c366004613d7f565b61179f565b34801561098d57600080fd5b506102ed61099c366004614025565b61198e565b3480156109ad57600080fd5b5060ff546103c4906001600160a01b031681565b3480156109cd57600080fd5b506102ed6109dc366004613ed0565b6119d8565b3480156109ed57600080fd5b5061031d6109fc366004613f0f565b61012f6020526000908152604090205481565b348015610a1b57600080fd5b506102ed610a2a366004613de8565b611c80565b348015610a3b57600080fd5b5061031d7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b348015610a6f57600080fd5b5061031d610a7e366004613f0f565b6101316020526000908152604090205481565b60006001600160e01b03198216637965db0b60e01b1480610ac257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b610ad2611cef565b610adc8282611d1b565b6040805163ffffffff84168152602081018390527feb76801ec75076256b8590fd7c621c2541531e6b9ac568389fa5cdf72e664844910160405180910390a15050565b600082815260656020526040902060010154610b3c81335b611d49565b610b468383611dad565b505050565b6001600160a01b0381163314610bc05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610bca8282611e33565b5050565b610bd781611e9a565b610bf281604051806020016040528060008152506000611ec5565b50565b610bfe82611e9a565b610bca82826001611ec5565b610100546040516324b4085360e21b81523360048201819052916001600160a01b0316906392d0214c90602401600060405180830381600087803b158015610c5157600080fd5b505af1158015610c65573d6000803e3d6000fd5b5050604080516001600160e01b031960e08f901b166020808301919091528d151560f81b60248301526bffffffffffffffffffffffff193360601b166025830152603982018d9052605982018c9052607982018b905260998083018b90528351808403909101815260b9830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060d984015260f58084019190915283518084039091018152610115909201909252805191012060009250600191506040805160008152602081018083529290925260ff881690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015610d76573d6000803e3d6000fd5b505050602060405103519050610dac7fce9a6d3180818296cf6add4d55c45a6cd9e315597ee1da1e2313c503391736cd826112fb565b50874210610ded5760405162461bcd60e51b815260206004820152600e60248201526d18dbdd5c1bdb88195e1c1a5c995960921b6044820152606401610bb7565b336000908152610163602052604090205463ffffffff168714610e425760405162461bcd60e51b815260206004820152600d60248201526c696e76616c6964206e6f6e636560981b6044820152606401610bb7565b63ffffffff8b16600090815261013060205260409020548610610e9a5760405162461bcd60e51b815260206004820152601060248201526f62616420646973636f756e742066656560801b6044820152606401610bb7565b3360009081526101636020526040902054610ebc9063ffffffff16600161433b565b33600090815261016360209081526040808320805463ffffffff191663ffffffff958616179055928e16825261013481528282208d15158352905220546001600160a01b0316610f0e8c8c8c84612046565b6000670de0b6b3a7640000610f23898d61453c565b610f2d9190614391565b60fc5460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925083169063a9059cbb90604401602060405180830381600087803b158015610f7d57600080fd5b505af1158015610f91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb59190613e3a565b506001600160a01b03821663a9059cbb33610fd0848f61459a565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561101657600080fd5b505af115801561102a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104e9190613e3a565b50604080513381526001600160a01b03841660208201529081018c90527fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda39060600160405180910390a150505050505050505050505050565b60fe54604051636c8d2b9760e01b81526001600160a01b0390911690636c8d2b97906110d99085908590600401614218565b600060405180830381600087803b1580156110f357600080fd5b505af1158015611107573d6000803e3d6000fd5b50505050610bca828233612178565b600054610100900460ff168061112f575060005460ff16155b61114b5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff1615801561116d576000805461ffff19166101011790555b6001600160a01b0389161580159061118d57506001600160a01b03881615155b80156111a157506001600160a01b03871615155b80156111b557506001600160a01b03861615155b80156111c957506001600160a01b03851615155b80156111dd57506001600160a01b03821615155b80156111e857508215155b6111f157600080fd5b60fb80546001600160a01b03199081166001600160a01b038881169190911790925560fc8054821689841617905560fe805482168b841617905560ff805482168a841617905561010080549091169184169190911790556112518961233f565b61127b7fce9a6d3180818296cf6add4d55c45a6cd9e315597ee1da1e2313c503391736cd856123c4565b611284836123ce565b604080516001600160a01b038b81168252888116602083015287811682840152891660608201526080810185905290517faf92ca815edd9a90dc4aa1dfc722fb1624d5b5f914b25ae3cf979ce6600f0a969181900360a00190a180156112f0576000805461ff00191690555b505050505050505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b611330611cef565b611339816123ce565b6040518181527f062ffcd555faf2b2c81f26010ee6db2e23106941bfed5ae979abd111975d815d9060200160405180910390a150565b60fe546040516305c8146f60e01b815263ffffffff841660048201526001600160a01b03909116906305c8146f90602401600060405180830381600087803b1580156113ba57600080fd5b505af11580156113ce573d6000803e3d6000fd5b505050506113dc82336123f4565b63ffffffff8216600081815261013460209081526040808320851515808552908352818420546001600160a01b03168085526101c184528285203380875281865284872080549888526101f0875285882094885293865284872090875285529290942054919092529081905590919061145f858461145a848661459a565b61249b565b5050505050565b61146e6126a1565b670de0b6b3a76400008510156114d15760405162461bcd60e51b815260206004820152602260248201527f6b496e697469616c4d756c7469706c696572206d757374206265203e3d203165604482015261062760f31b6064820152608401610bb7565b6001600160a01b03808816600081815261016260209081526040808320805463ffffffff8f1663ffffffff199182168117909255958c168085528285208054909716821790965580845261019283528184208480528352818420429055835261013482528083206001845280835281842080546001600160a01b031990811690961790558380529091529020805490911690911790556032611575898484846126eb565b63ffffffff8916600090815261012e6020908152604080832088905561012f90915290208690556115a68985611d1b565b6040805163ffffffff8b16815260208101869052908101869052606081018790526080810184905260a0810183905260c081018290527fe0bc2edbe91b35919ee6608af52675476a1cb964af5d671c9e2c018d3cae98919060e00160405180910390a16040805163ffffffff8b16815260006020820181905291810182905260608101919091527f65663e89e16ccfe470dd659bacdf6fddae8185e108d00bc980d34be7e86466d0906080015b60405180910390a1505050505050505050565b61166e6126a1565b6000806116898861168060018a61459a565b88888888612a05565b63ffffffff8a166000818152610192602090815260408083208d8452825280832060018101879055600281018690554281558484526101918352928190208d905580519384529083018c90528201849052606082018390529294509092507f65663e89e16ccfe470dd659bacdf6fddae8185e108d00bc980d34be7e86466d090608001611653565b611719611cef565b611725848484846126eb565b6040805163ffffffff8616815260208101859052908101839052606081018290527f940844064f9f8938ffe6a879f6143788f9f7e81daf872fee4fe2387b7cf9448d9060800160405180910390a150505050565b6000828152606560205260409020600101546117958133610b37565b610b468383611e33565b336117a981612aae565b610100546040516324b4085360e21b81526001600160a01b038086166004830152859216906392d0214c90602401600060405180830381600087803b1580156117f157600080fd5b505af1158015611805573d6000803e3d6000fd5b50503360009081526101626020526040908190205460fe5491516305c8146f60e01b815263ffffffff9091166004820181905293506001600160a01b0390911691506305c8146f90602401600060405180830381600087803b15801561186a57600080fd5b505af115801561187e573d6000803e3d6000fd5b5050505063ffffffff811660008181526101c0602090815260408083206001600160a01b038a16845282528083205493835261019190915290205481158015906118c757508082105b156118d6576118d683886123f4565b3360009081526101c1602090815260408083206001600160a01b038b1684529091528120805488929061190a908490614323565b909155505063ffffffff831660009081526101c0602090815260408083206001600160a01b038b1680855290835292819020849055805192835233918301919091528101879052606081018290527fef7c8dfef14cbefdf829b8f066b068b677992411137321d64b3ed4538c2b36379060800160405180910390a150505050505050565b63ffffffff831660009081526101346020908152604080832085151584529091529020546001600160a01b03166119c784848484612046565b6119d284828461249b565b50505050565b81336119e48282612b0c565b610100546040516324b4085360e21b81523360048201819052916001600160a01b0316906392d0214c90602401600060405180830381600087803b158015611a2b57600080fd5b505af1158015611a3f573d6000803e3d6000fd5b5050505060008611611a855760405162461bcd60e51b815260206004820152600f60248201526e2737903d32b9379039b434b33a399760891b6044820152606401610bb7565b63ffffffff8516600081815261013460209081526040808320881515808552908352818420549484526101f0835281842090845282528083203384529091528120546001600160a01b0390921691611add9089614323565b6001600160a01b03831660009081526101c160209081526040808320338452909152902054909150811115611b545760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656e6f75676820746f6b656e7320746f2073686966740000000000006044820152606401610bb7565b60fe546040516371fd962360e01b815263ffffffff89166004820152602481018a905287151560448201526001600160a01b03909116906371fd962390606401600060405180830381600087803b158015611bae57600080fd5b505af1158015611bc2573d6000803e3d6000fd5b5050505063ffffffff871660008181526101f0602090815260408083208a1515845282528083203384528252808320859055928252610191905290812054611c0b906001614323565b63ffffffff891660008181526101ef6020908152604080832033808552908352928190208590558051928352908201929092529081018b90528815156060820152608081018290529091507f1393b60b20fc61ac59730bbda202288e21de9c963502cfe81fcb843b427d46e29060a001611653565b60fe54604051636c8d2b9760e01b81526001600160a01b0390911690636c8d2b9790611cb29086908690600401614218565b600060405180830381600087803b158015611ccc57600080fd5b505af1158015611ce0573d6000803e3d6000fd5b50505050610b46838383612178565b611d197fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533611d49565b565b66b1a2bc2ec50000811115611d2f57600080fd5b63ffffffff90911660009081526101306020526040902055565b611d5382826112fb565b610bca57611d6b816001600160a01b03166014612b75565b611d76836020612b75565b604051602001611d879291906141a3565b60408051601f198184030181529082905262461bcd60e51b8252610bb791600401614261565b611db782826112fb565b610bca5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611def3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611e3d82826112fb565b15610bca5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610bca8133610b37565b6000611ef87f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050611f0384612d5e565b600083511180611f105750815b15611f2157611f1f8484612e03565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661145f57805460ff191660011781556040516001600160a01b0383166024820152611fa090869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052612e03565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b0383811691161461203d5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610bb7565b61145f85612eee565b60fe546040516305c8146f60e01b815263ffffffff861660048201526001600160a01b03909116906305c8146f90602401600060405180830381600087803b15801561209157600080fd5b505af11580156120a5573d6000803e3d6000fd5b505050506120b384336123f4565b6001600160a01b03811660009081526101c160209081526040808320338085529083528184205463ffffffff891685526101f08452828520881515865284528285209185529252909120548381018210156121495760405162461bcd60e51b81526020600482015260166024820152756e6f7420656e6f75676820746f20776974686472617760501b6044820152606401610bb7565b506001600160a01b0390911660009081526101c160209081526040808320338452909152902091900390555050565b600082815b8181101561232e5760006121c58787848181106121aa57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906121bf9190613f0f565b86612f2e565b9050801561231b5761019160008888858181106121f257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122079190613f0f565b63ffffffff1663ffffffff168152602001908152602001600020546101c0600089898681811061224757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061225c9190613f0f565b63ffffffff168152602080820192909252604090810160009081206001600160a01b038a1682529092529020556122938185614323565b93507f2f0b57f663333228518fca119813fe0f6daeb5f19d087965f56b45fecf2d5205858888858181106122d757634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122ec9190613f0f565b604080516001600160a01b03909316835263ffffffff9091166020830152810183905260600160405180910390a15b5080612326816145f4565b91505061217d565b50811561145f5761145f8383613352565b600054610100900460ff1680612358575060005460ff16155b6123745760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff16158015612396576000805461ffff19166101011790555b61239e613456565b6123a66134d9565b6123af82613537565b8015610bca576000805461ff00191690555050565b610bca8282611dad565b670de0b6b3a764000081111580156123e65750600081115b6123ef57600080fd5b60fd55565b60006124008383612f2e565b90508015610b465763ffffffff8316600090815261019160209081526040808320546101c083528184206001600160a01b0387168552909252909120556124478282613352565b604080516001600160a01b038416815263ffffffff851660208201529081018290527f2f0b57f663333228518fca119813fe0f6daeb5f19d087965f56b45fecf2d52059060600160405180910390a1505050565b610100546040516324b4085360e21b81523360048201819052916001600160a01b0316906392d0214c90602401600060405180830381600087803b1580156124e257600080fd5b505af11580156124f6573d6000803e3d6000fd5b5050505063ffffffff841660009081526101306020526040812054670de0b6b3a764000090612525908561453c565b61252f9190614391565b60fc5460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925085169063a9059cbb90604401602060405180830381600087803b15801561257f57600080fd5b505af1158015612593573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125b79190613e3a565b506001600160a01b03841663a9059cbb336125d2848761459a565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561261857600080fd5b505af115801561262c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126509190613e3a565b50604080513381526001600160a01b03861660208201529081018490527fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda39060600160405180910390a15050505050565b60fe546001600160a01b03163314611d195760405162461bcd60e51b815260206004820152600d60248201526c1b9bdd08131bdb99d4da1bdc9d609a1b6044820152606401610bb7565b670c7d713b49d9ffff198213801561270a5750670c7d713b49da000082125b6127745760405162461bcd60e51b815260206004820152603560248201527f62616c616e6365496e63656e7469766543757276655f657175696c69627269756044820152746d4f6666736574206f7574206f6620626f756e647360581b6064820152608401610bb7565b600083116127d95760405162461bcd60e51b815260206004820152602c60248201527f62616c616e6365496e63656e7469766543757276655f6578706f6e656e74206f60448201526b7574206f6620626f756e647360a01b6064820152608401610bb7565b606481106128375760405162461bcd60e51b815260206004820152602560248201527f736166654578706f6e656e744269745368696674696e67206f7574206f6620626044820152646f756e647360d81b6064820152608401610bb7565b60fe54604051631678fc4360e31b815263ffffffff86166004820152600060248201819052916001600160a01b03169063b3c7e2189060440160206040518083038186803b15801561288857600080fd5b505afa15801561289c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128c09190613eb8565b60fe54604051631678fc4360e31b815263ffffffff88166004820152600160248201526001600160a01b039091169063b3c7e2189060440160206040518083038186803b15801561291057600080fd5b505afa158015612924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129489190613eb8565b6129529190614323565b90508382612962836101f461453c565b61296d92911c6143eb565b50606481831c116129d05760405162461bcd60e51b815260206004820152602760248201527f626974207368696674696e6720746f6f206c616e676520666f7220746f74616c604482015266081b1bd8dad95960ca1b6064820152608401610bb7565b5063ffffffff909316600090815261013160209081526040808320949094556101328152838220929092556101339091522055565b600080600080612a188a89898989613600565b915091506000612a288b8b6138a9565b9050612a34838261453c565b63ffffffff8c166000908152610192602090815260408083208e8452909152902060010154612a639190614323565b612a6d838361453c565b63ffffffff8d166000908152610192602090815260408083208f8452909152902060020154612a9c9190614323565b94509450505050965096945050505050565b6001600160a01b0381166000908152610162602052604090205463ffffffff16610bf25760405162461bcd60e51b815260206004820152600f60248201526e0dcdee840ecc2d8d2c840e6f2dce8d608b1b6044820152606401610bb7565b63ffffffff821660009081526101ef6020908152604080832033845290915290205415801590612b66575063ffffffff8216600090815261019160209081526040808320546101ef83528184203385529092529091205411155b15610bca57610bca82336123f4565b60606000612b8483600261453c565b612b8f906002614323565b67ffffffffffffffff811115612bb557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612bdf576020820181803683370190505b509050600360fc1b81600081518110612c0857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612c4557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000612c6984600261453c565b612c74906001614323565b90505b6001811115612d08576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612cb657634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110612cda57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93612d01816145dd565b9050612c77565b508315612d575760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610bb7565b9392505050565b803b612dc25760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610bb7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b612e625760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610bb7565b600080846001600160a01b031684604051612e7d9190614187565b600060405180830381855af49150503d8060008114612eb8576040519150601f19603f3d011682016040523d82523d6000602084013e612ebd565b606091505b5091509150612ee5828260405180606001604052806027815260200161467a602791396138d5565b95945050505050565b612ef781612d5e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b63ffffffff821660008181526101346020908152604080832060018452825280832054838052818420546001600160a01b039182168086526101c180865284872089851680895290875285882054949093168088529086528487208388528652848720548888526101c087528588209388529286528487205497875261019190955292852054949592949192909180821415612fd35760009650505050505050611322565b63ffffffff891660009081526101ef602090815260408083206001600160a01b038c168452909152902054801580159061300d5750818111155b156133355761301f8a8686868561390e565b63ffffffff8b1660009081526101f0602090815260408083206001845282528083206001600160a01b038e168452909152902054909850801561313f5760fe54604051630125edfd60e71b815263ffffffff8d1660048201526024810183905260016044820152606481018490526001600160a01b03909116906392f6fe809060840160206040518083038186803b1580156130ba57600080fd5b505afa1580156130ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f29190613eb8565b6130fc9086614323565b9450613108818761459a565b63ffffffff8c1660009081526101f0602090815260408083206001845282528083206001600160a01b038f16845290915281205595505b5063ffffffff8a1660009081526101f06020908152604080832083805282528083206001600160a01b038d168452909152902054801561325b5760fe54604051630125edfd60e71b815263ffffffff8d1660048201526024810183905260006044820152606481018490526001600160a01b03909116906392f6fe809060840160206040518083038186803b1580156131d757600080fd5b505afa1580156131eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061320f9190613eb8565b6132199087614323565b9550613225818661459a565b63ffffffff8c1660009081526101f06020908152604080832083805282528083206001600160a01b038f16845290915281205594505b6001600160a01b0388811660009081526101c1602081815260408084208f86168086529083528185208c9055948c168452918152818320848452815291819020889055805192835263ffffffff8e16918301919091528101879052606081018690527fea2b4628943d2a0a2c85f85b60007fb6f8273d91c0eaff6f8b140a5007637b359060800160405180910390a16132f78b8787858761390e565b613301908a614323565b63ffffffff8c1660009081526101ef602090815260408083206001600160a01b038f16845290915281205598506133459050565b6133428a8686868661390e565b97505b5050505050505092915050565b60ff546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b1580156133a057600080fd5b505af11580156133b4573d6000803e3d6000fd5b505060ff5460fb5460fd546001600160a01b0392831694506340c10f199350911690670de0b6b3a7640000906133ea908661453c565b6133f49190614391565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561343a57600080fd5b505af115801561344e573d6000803e3d6000fd5b505050505050565b600054610100900460ff168061346f575060005460ff16155b61348b5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff161580156134ad576000805461ffff19166101011790555b6134b5613a01565b6134bd613a01565b6134c5613a01565b8015610bf2576000805461ff001916905550565b600054610100900460ff16806134f2575060005460ff16155b61350e5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff161580156134b5576000805461ffff19166101011790556134bd613a01565b600054610100900460ff1680613550575060005460ff16155b61356c5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff1615801561358e576000805461ffff19166101011790555b6001600160a01b0382166135a157600080fd5b6135ac6000836123c4565b6135d67fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775836123c4565b6123af7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3836123c4565b600080600061360e88613a6b565b9050600061361c8587614323565b63ffffffff8a166000908152610132602052604081205491925090671bc16d674ec800009061364c9084906144b9565b6136569190614363565b63ffffffff8b16600090815261013360205260409020549091508761367c8360026144b9565b613686908961455b565b12156137a4578682126136ac57600061369f8a8661453c565b955095505050505061389f565b63ffffffff8b16600090815261013160205260408120546136ce60018461459a565b6136d8858b61455b565b6136e392911c6143eb565b63ffffffff8d16600090815261013160205260408120549192509061370a9086851c6143eb565b9050600081613721846706f05b59d3b2000061453c565b61372b9190614391565b9050600061374182670de0b6b3a764000061459a565b9050670de0b6b3a76400008e6137578a8561453c565b613761919061453c565b61376b9190614391565b670de0b6b3a76400008e61377f8b8561453c565b613789919061453c565b6137939190614391565b99509950505050505050505061389f565b876137ae8361460f565b126137cc576137bd8a8561453c565b6000955095505050505061389f565b63ffffffff8b16600090815261013160205260408120546137ee60018461459a565b6137f8858c6142e2565b61380392911c6143eb565b63ffffffff8d16600090815261013160205260408120549192509061382a9086851c6143eb565b9050600081613841846706f05b59d3b2000061453c565b61384b9190614391565b9050600061386182670de0b6b3a764000061459a565b9050670de0b6b3a76400008e6138778a8461453c565b613881919061453c565b61388b9190614391565b670de0b6b3a76400008e61377f8b8661453c565b9550959350505050565b63ffffffff8216600090815261019260209081526040808320848452909152812054612d57904261459a565b606083156138e4575081612d57565b8251156138f45782518084602001fd5b8160405162461bcd60e51b8152600401610bb79190614261565b600084156139855763ffffffff86166000908152610192602090815260408083208684529091528082206001908101548584529183200154613950919061459a565b90506cd73d4c35b9df8aa7d6c3003573602c1b61396d878361453c565b6139779190614391565b6139819083614323565b9150505b8315612ee55763ffffffff861660009081526101926020908152604080832086845290915280822060029081015485845291832001546139c5919061459a565b90506cd73d4c35b9df8aa7d6c3003573602c1b6139e2868361453c565b6139ec9190614391565b6139f69083614323565b979650505050505050565b600054610100900460ff1680613a1a575060005460ff16155b613a365760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff161580156134c5576000805461ffff19166101011790558015610bf2576000805461ff001916905550565b6000806000613a7984613b2e565b91509150670de0b6b3a7640000811015613aa357634e487b7160e01b600052600160045260246000fd5b63ffffffff841660009081526101926020908152604080832083805290915290205482613ad0824261459a565b1015613b1b5782613ae1824261459a565b613af3670de0b6b3a76400008561459a565b613afd919061453c565b613b079190614391565b613b11908361459a565b9350505050610ac5565b670de0b6b3a76400009350505050610ac5565b63ffffffff8116600090815261012e602090815260408083205461012f90925290912054670de0b6b3a7640000811015613b6d5750670de0b6b3a76400005b915091565b80356001600160a01b0381168114610ac557600080fd5b60008083601f840112613b9a578081fd5b50813567ffffffffffffffff811115613bb1578182fd5b6020830191508360208260051b8501011115613bcc57600080fd5b9250929050565b803563ffffffff81168114610ac557600080fd5b600060208284031215613bf8578081fd5b612d5782613b72565b60008060408385031215613c13578081fd5b613c1c83613b72565b9150613c2a60208401613b72565b90509250929050565b600080600080600080600080610100898b031215613c4f578384fd5b613c5889613b72565b9750613c6660208a01613b72565b9650613c7460408a01613b72565b9550613c8260608a01613b72565b9450613c9060808a01613b72565b9350613c9e60a08a01613b72565b925060c08901359150613cb360e08a01613b72565b90509295985092959890939650565b60008060408385031215613cd4578182fd5b613cdd83613b72565b9150602083013567ffffffffffffffff80821115613cf9578283fd5b818501915085601f830112613d0c578283fd5b813581811115613d1e57613d1e614655565b604051601f8201601f19908116603f01168101908382118183101715613d4657613d46614655565b81604052828152886020848701011115613d5e578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215613d91578182fd5b613d9a83613b72565b946020939093013593505050565b60008060208385031215613dba578182fd5b823567ffffffffffffffff811115613dd0578283fd5b613ddc85828601613b89565b90969095509350505050565b600080600060408486031215613dfc578283fd5b833567ffffffffffffffff811115613e12578384fd5b613e1e86828701613b89565b9094509250613e31905060208501613b72565b90509250925092565b600060208284031215613e4b578081fd5b8151612d578161466b565b600060208284031215613e67578081fd5b5035919050565b60008060408385031215613e80578182fd5b82359150613c2a60208401613b72565b600060208284031215613ea1578081fd5b81356001600160e01b031981168114612d57578182fd5b600060208284031215613ec9578081fd5b5051919050565b600080600060608486031215613ee4578081fd5b83359250613ef460208501613bd3565b91506040840135613f048161466b565b809150509250925092565b600060208284031215613f20578081fd5b612d5782613bd3565b60008060408385031215613f3b578182fd5b613c1c83613bd3565b600080600080600080600080610100898b031215613f60578182fd5b613f6989613bd3565b9750613f7760208a01613b72565b9650613f8560408a01613b72565b979a96995096976060810135975060808101359660a0820135965060c0820135955060e0909101359350915050565b60008060408385031215613fc6578182fd5b613fcf83613bd3565b91506020830135613fdf8161466b565b809150509250929050565b600080600060608486031215613ffe578081fd5b61400784613bd3565b925060208401356140178161466b565b9150613e3160408501613b72565b600080600060608486031215614039578081fd5b61404284613bd3565b925060208401356140528161466b565b929592945050506040919091013590565b60008060008060008060008060006101208a8c031215614081578283fd5b61408a8a613bd3565b985060208a013561409a8161466b565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013560ff811681146140cb578384fd5b8093505060e08a013591506101008a013590509295985092959850929598565b600080604083850312156140fd578182fd5b613d9a83613bd3565b6000806000806080858703121561411b578182fd5b61412485613bd3565b966020860135965060408601359560600135945092505050565b60008060008060008060c08789031215614156578384fd5b61415f87613bd3565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b600082516141998184602087016145b1565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516141db8160178501602088016145b1565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161420c8160288401602088016145b1565b01602801949350505050565b60208082528181018390526000908460408401835b868110156142565763ffffffff61424384613bd3565b168252918301919083019060010161422d565b509695505050505050565b60006020825282518060208401526142808160408501602087016145b1565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600080821280156001600160ff1b038490038513161561430457614304614629565b600160ff1b839003841281161561431d5761431d614629565b50500190565b6000821982111561433657614336614629565b500190565b600063ffffffff80831681851680830382111561435a5761435a614629565b01949350505050565b6000826143725761437261463f565b600160ff1b82146000198414161561438c5761438c614629565b500590565b6000826143a0576143a061463f565b500490565b80825b60018086116143b757506143e2565b8187048211156143c9576143c9614629565b808616156143d657918102915b9490941c9380026143a8565b94509492505050565b6000612d57600019848460008261440457506001612d57565b8161441157506000612d57565b816001811461442757600281146144315761445e565b6001915050612d57565b60ff84111561444257614442614629565b6001841b91508482111561445857614458614629565b50612d57565b5060208310610133831016604e8410600b8410161715614491575081810a8381111561448c5761448c614629565b612d57565b61449e84848460016143a5565b8086048211156144b0576144b0614629565b02949350505050565b60006001600160ff1b03818413828413808216868404861116156144df576144df614629565b600160ff1b848712828116878305891216156144fd576144fd614629565b85871292508782058712848416161561451857614518614629565b8785058712818416161561452e5761452e614629565b505050929093029392505050565b600081600019048311821515161561455657614556614629565b500290565b60008083128015600160ff1b85018412161561457957614579614629565b6001600160ff1b038401831381161561459457614594614629565b50500390565b6000828210156145ac576145ac614629565b500390565b60005b838110156145cc5781810151838201526020016145b4565b838111156119d25750506000910152565b6000816145ec576145ec614629565b506000190190565b600060001982141561460857614608614629565b5060010190565b6000600160ff1b82141561462557614625614629565b0390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610bf257600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e65a261f0e7be1ea69060a11b4eecf050d4dc7b4e508a141e6173fce849a994964736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106102935760003560e01c80639441752f1161015a578063c2b80072116100c1578063eae5a8d91161007a578063eae5a8d9146109a1578063edb010d7146109c1578063ef9c3052146109e1578063f344acc914610a0f578063f72c0d8b14610a2f578063f9fe734e14610a6357610293565b8063c2b80072146108a6578063d547741f146108e5578063dc86fe5014610905578063e39ac04414610933578063e68f3dbe14610961578063e955a3481461098157610293565b8063b45e86cf11610113578063b45e86cf146107b4578063ba89f7b8146107ed578063bda69fd81461080d578063be751cb71461082d578063c16199e31461084d578063c17f8ce91461086d57610293565b80639441752f146106be5780639e59fd0f146106fd578063a217fddf1461071d578063a538415c14610732578063b054c4a114610752578063b0956b5f1461079457610293565b80634f1ef286116101fe578063738f4b8e116101b7578063738f4b8e146105d857806375b238fc146105f857806385fcb8e31461062c57806386cbde1f1461065a5780638e659c081461067e57806391d148541461069e57610293565b80634f1ef286146105075780635892457d1461051a5780635ac76ce1146105305780636a5304df146105695780636c3050551461059757806372b124da146105b857610293565b80632e04b8e7116102505780632e04b8e7146103dc5780632f2ff15d1461041057806336568abe146104305780633659cfe6146104505780633733cf49146104705780633ebff44f146104a457610293565b806301ffc9a7146102985780630ca5a052146102cd57806313e8868a146102ef57806315f2081d1461032b578063248a9ca31461037457806329949872146103a4575b600080fd5b3480156102a457600080fd5b506102b86102b3366004613e90565b610a91565b60405190151581526020015b60405180910390f35b3480156102d957600080fd5b506102ed6102e83660046140eb565b610aca565b005b3480156102fb57600080fd5b5061031d61030a366004613f0f565b6101306020526000908152604090205481565b6040519081526020016102c4565b34801561033757600080fd5b5061035f610346366004613be7565b6101626020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016102c4565b34801561038057600080fd5b5061031d61038f366004613e56565b60009081526065602052604090206001015490565b3480156103b057600080fd5b5060fe546103c4906001600160a01b031681565b6040516001600160a01b0390911681526020016102c4565b3480156103e857600080fd5b5061035f6103f7366004613be7565b6101636020526000908152604090205463ffffffff1681565b34801561041c57600080fd5b506102ed61042b366004613e6e565b610b1f565b34801561043c57600080fd5b506102ed61044b366004613e6e565b610b4b565b34801561045c57600080fd5b506102ed61046b366004613be7565b610bce565b34801561047c57600080fd5b5061031d7fce9a6d3180818296cf6add4d55c45a6cd9e315597ee1da1e2313c503391736cd81565b3480156104b057600080fd5b506104ec6104bf3660046140eb565b61019260209081526000928352604080842090915290825290208054600182015460029092015490919083565b604080519384526020840192909252908201526060016102c4565b6102ed610515366004613cc2565b610bf5565b34801561052657600080fd5b5061031d60fd5481565b34801561053c57600080fd5b5061031d61054b366004613f29565b6101c060209081526000928352604080842090915290825290205481565b34801561057557600080fd5b5061031d610584366004613f0f565b61012e6020526000908152604090205481565b3480156105a357600080fd5b50610100546103c4906001600160a01b031681565b3480156105c457600080fd5b506102ed6105d3366004614063565b610c0a565b3480156105e457600080fd5b506102ed6105f3366004613da8565b6110a7565b34801561060457600080fd5b5061031d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561063857600080fd5b5061031d610647366004613f0f565b6101336020526000908152604090205481565b34801561066657600080fd5b5061031d6cd73d4c35b9df8aa7d6c3003573602c1b81565b34801561068a57600080fd5b506102ed610699366004613c33565b611116565b3480156106aa57600080fd5b506102b86106b9366004613e6e565b6112fb565b3480156106ca57600080fd5b5061031d6106d9366004613fea565b6101f060209081526000938452604080852082529284528284209052825290205481565b34801561070957600080fd5b506102ed610718366004613e56565b611328565b34801561072957600080fd5b5061031d600081565b34801561073e57600080fd5b506102ed61074d366004613fb4565b61136f565b34801561075e57600080fd5b506103c461076d366004613fb4565b6101346020908152600092835260408084209091529082529020546001600160a01b031681565b3480156107a057600080fd5b506102ed6107af366004613f44565b611466565b3480156107c057600080fd5b5061031d6107cf366004613f29565b6101ef60209081526000928352604080842090915290825290205481565b3480156107f957600080fd5b5060fb546103c4906001600160a01b031681565b34801561081957600080fd5b506102ed61082836600461413e565b611666565b34801561083957600080fd5b506102ed610848366004614106565b611711565b34801561085957600080fd5b5060fc546103c4906001600160a01b031681565b34801561087957600080fd5b5061031d610888366004613c01565b6101c160209081526000928352604080842090915290825290205481565b3480156108b257600080fd5b5061031d6108c1366004613fea565b6101f160209081526000938452604080852082529284528284209052825290205481565b3480156108f157600080fd5b506102ed610900366004613e6e565b611779565b34801561091157600080fd5b5061031d610920366004613f0f565b6101326020526000908152604090205481565b34801561093f57600080fd5b5061031d61094e366004613f0f565b6101916020526000908152604090205481565b34801561096d57600080fd5b506102ed61097c366004613d7f565b61179f565b34801561098d57600080fd5b506102ed61099c366004614025565b61198e565b3480156109ad57600080fd5b5060ff546103c4906001600160a01b031681565b3480156109cd57600080fd5b506102ed6109dc366004613ed0565b6119d8565b3480156109ed57600080fd5b5061031d6109fc366004613f0f565b61012f6020526000908152604090205481565b348015610a1b57600080fd5b506102ed610a2a366004613de8565b611c80565b348015610a3b57600080fd5b5061031d7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b348015610a6f57600080fd5b5061031d610a7e366004613f0f565b6101316020526000908152604090205481565b60006001600160e01b03198216637965db0b60e01b1480610ac257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b610ad2611cef565b610adc8282611d1b565b6040805163ffffffff84168152602081018390527feb76801ec75076256b8590fd7c621c2541531e6b9ac568389fa5cdf72e664844910160405180910390a15050565b600082815260656020526040902060010154610b3c81335b611d49565b610b468383611dad565b505050565b6001600160a01b0381163314610bc05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610bca8282611e33565b5050565b610bd781611e9a565b610bf281604051806020016040528060008152506000611ec5565b50565b610bfe82611e9a565b610bca82826001611ec5565b610100546040516324b4085360e21b81523360048201819052916001600160a01b0316906392d0214c90602401600060405180830381600087803b158015610c5157600080fd5b505af1158015610c65573d6000803e3d6000fd5b5050604080516001600160e01b031960e08f901b166020808301919091528d151560f81b60248301526bffffffffffffffffffffffff193360601b166025830152603982018d9052605982018c9052607982018b905260998083018b90528351808403909101815260b9830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060d984015260f58084019190915283518084039091018152610115909201909252805191012060009250600191506040805160008152602081018083529290925260ff881690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015610d76573d6000803e3d6000fd5b505050602060405103519050610dac7fce9a6d3180818296cf6add4d55c45a6cd9e315597ee1da1e2313c503391736cd826112fb565b50874210610ded5760405162461bcd60e51b815260206004820152600e60248201526d18dbdd5c1bdb88195e1c1a5c995960921b6044820152606401610bb7565b336000908152610163602052604090205463ffffffff168714610e425760405162461bcd60e51b815260206004820152600d60248201526c696e76616c6964206e6f6e636560981b6044820152606401610bb7565b63ffffffff8b16600090815261013060205260409020548610610e9a5760405162461bcd60e51b815260206004820152601060248201526f62616420646973636f756e742066656560801b6044820152606401610bb7565b3360009081526101636020526040902054610ebc9063ffffffff16600161433b565b33600090815261016360209081526040808320805463ffffffff191663ffffffff958616179055928e16825261013481528282208d15158352905220546001600160a01b0316610f0e8c8c8c84612046565b6000670de0b6b3a7640000610f23898d61453c565b610f2d9190614391565b60fc5460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925083169063a9059cbb90604401602060405180830381600087803b158015610f7d57600080fd5b505af1158015610f91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb59190613e3a565b506001600160a01b03821663a9059cbb33610fd0848f61459a565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561101657600080fd5b505af115801561102a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104e9190613e3a565b50604080513381526001600160a01b03841660208201529081018c90527fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda39060600160405180910390a150505050505050505050505050565b60fe54604051636c8d2b9760e01b81526001600160a01b0390911690636c8d2b97906110d99085908590600401614218565b600060405180830381600087803b1580156110f357600080fd5b505af1158015611107573d6000803e3d6000fd5b50505050610bca828233612178565b600054610100900460ff168061112f575060005460ff16155b61114b5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff1615801561116d576000805461ffff19166101011790555b6001600160a01b0389161580159061118d57506001600160a01b03881615155b80156111a157506001600160a01b03871615155b80156111b557506001600160a01b03861615155b80156111c957506001600160a01b03851615155b80156111dd57506001600160a01b03821615155b80156111e857508215155b6111f157600080fd5b60fb80546001600160a01b03199081166001600160a01b038881169190911790925560fc8054821689841617905560fe805482168b841617905560ff805482168a841617905561010080549091169184169190911790556112518961233f565b61127b7fce9a6d3180818296cf6add4d55c45a6cd9e315597ee1da1e2313c503391736cd856123c4565b611284836123ce565b604080516001600160a01b038b81168252888116602083015287811682840152891660608201526080810185905290517faf92ca815edd9a90dc4aa1dfc722fb1624d5b5f914b25ae3cf979ce6600f0a969181900360a00190a180156112f0576000805461ff00191690555b505050505050505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b611330611cef565b611339816123ce565b6040518181527f062ffcd555faf2b2c81f26010ee6db2e23106941bfed5ae979abd111975d815d9060200160405180910390a150565b60fe546040516305c8146f60e01b815263ffffffff841660048201526001600160a01b03909116906305c8146f90602401600060405180830381600087803b1580156113ba57600080fd5b505af11580156113ce573d6000803e3d6000fd5b505050506113dc82336123f4565b63ffffffff8216600081815261013460209081526040808320851515808552908352818420546001600160a01b03168085526101c184528285203380875281865284872080549888526101f0875285882094885293865284872090875285529290942054919092529081905590919061145f858461145a848661459a565b61249b565b5050505050565b61146e6126a1565b670de0b6b3a76400008510156114d15760405162461bcd60e51b815260206004820152602260248201527f6b496e697469616c4d756c7469706c696572206d757374206265203e3d203165604482015261062760f31b6064820152608401610bb7565b6001600160a01b03808816600081815261016260209081526040808320805463ffffffff8f1663ffffffff199182168117909255958c168085528285208054909716821790965580845261019283528184208480528352818420429055835261013482528083206001845280835281842080546001600160a01b031990811690961790558380529091529020805490911690911790556032611575898484846126eb565b63ffffffff8916600090815261012e6020908152604080832088905561012f90915290208690556115a68985611d1b565b6040805163ffffffff8b16815260208101869052908101869052606081018790526080810184905260a0810183905260c081018290527fe0bc2edbe91b35919ee6608af52675476a1cb964af5d671c9e2c018d3cae98919060e00160405180910390a16040805163ffffffff8b16815260006020820181905291810182905260608101919091527f65663e89e16ccfe470dd659bacdf6fddae8185e108d00bc980d34be7e86466d0906080015b60405180910390a1505050505050505050565b61166e6126a1565b6000806116898861168060018a61459a565b88888888612a05565b63ffffffff8a166000818152610192602090815260408083208d8452825280832060018101879055600281018690554281558484526101918352928190208d905580519384529083018c90528201849052606082018390529294509092507f65663e89e16ccfe470dd659bacdf6fddae8185e108d00bc980d34be7e86466d090608001611653565b611719611cef565b611725848484846126eb565b6040805163ffffffff8616815260208101859052908101839052606081018290527f940844064f9f8938ffe6a879f6143788f9f7e81daf872fee4fe2387b7cf9448d9060800160405180910390a150505050565b6000828152606560205260409020600101546117958133610b37565b610b468383611e33565b336117a981612aae565b610100546040516324b4085360e21b81526001600160a01b038086166004830152859216906392d0214c90602401600060405180830381600087803b1580156117f157600080fd5b505af1158015611805573d6000803e3d6000fd5b50503360009081526101626020526040908190205460fe5491516305c8146f60e01b815263ffffffff9091166004820181905293506001600160a01b0390911691506305c8146f90602401600060405180830381600087803b15801561186a57600080fd5b505af115801561187e573d6000803e3d6000fd5b5050505063ffffffff811660008181526101c0602090815260408083206001600160a01b038a16845282528083205493835261019190915290205481158015906118c757508082105b156118d6576118d683886123f4565b3360009081526101c1602090815260408083206001600160a01b038b1684529091528120805488929061190a908490614323565b909155505063ffffffff831660009081526101c0602090815260408083206001600160a01b038b1680855290835292819020849055805192835233918301919091528101879052606081018290527fef7c8dfef14cbefdf829b8f066b068b677992411137321d64b3ed4538c2b36379060800160405180910390a150505050505050565b63ffffffff831660009081526101346020908152604080832085151584529091529020546001600160a01b03166119c784848484612046565b6119d284828461249b565b50505050565b81336119e48282612b0c565b610100546040516324b4085360e21b81523360048201819052916001600160a01b0316906392d0214c90602401600060405180830381600087803b158015611a2b57600080fd5b505af1158015611a3f573d6000803e3d6000fd5b5050505060008611611a855760405162461bcd60e51b815260206004820152600f60248201526e2737903d32b9379039b434b33a399760891b6044820152606401610bb7565b63ffffffff8516600081815261013460209081526040808320881515808552908352818420549484526101f0835281842090845282528083203384529091528120546001600160a01b0390921691611add9089614323565b6001600160a01b03831660009081526101c160209081526040808320338452909152902054909150811115611b545760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656e6f75676820746f6b656e7320746f2073686966740000000000006044820152606401610bb7565b60fe546040516371fd962360e01b815263ffffffff89166004820152602481018a905287151560448201526001600160a01b03909116906371fd962390606401600060405180830381600087803b158015611bae57600080fd5b505af1158015611bc2573d6000803e3d6000fd5b5050505063ffffffff871660008181526101f0602090815260408083208a1515845282528083203384528252808320859055928252610191905290812054611c0b906001614323565b63ffffffff891660008181526101ef6020908152604080832033808552908352928190208590558051928352908201929092529081018b90528815156060820152608081018290529091507f1393b60b20fc61ac59730bbda202288e21de9c963502cfe81fcb843b427d46e29060a001611653565b60fe54604051636c8d2b9760e01b81526001600160a01b0390911690636c8d2b9790611cb29086908690600401614218565b600060405180830381600087803b158015611ccc57600080fd5b505af1158015611ce0573d6000803e3d6000fd5b50505050610b46838383612178565b611d197fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533611d49565b565b66b1a2bc2ec50000811115611d2f57600080fd5b63ffffffff90911660009081526101306020526040902055565b611d5382826112fb565b610bca57611d6b816001600160a01b03166014612b75565b611d76836020612b75565b604051602001611d879291906141a3565b60408051601f198184030181529082905262461bcd60e51b8252610bb791600401614261565b611db782826112fb565b610bca5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611def3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611e3d82826112fb565b15610bca5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610bca8133610b37565b6000611ef87f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050611f0384612d5e565b600083511180611f105750815b15611f2157611f1f8484612e03565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661145f57805460ff191660011781556040516001600160a01b0383166024820152611fa090869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052612e03565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b0383811691161461203d5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610bb7565b61145f85612eee565b60fe546040516305c8146f60e01b815263ffffffff861660048201526001600160a01b03909116906305c8146f90602401600060405180830381600087803b15801561209157600080fd5b505af11580156120a5573d6000803e3d6000fd5b505050506120b384336123f4565b6001600160a01b03811660009081526101c160209081526040808320338085529083528184205463ffffffff891685526101f08452828520881515865284528285209185529252909120548381018210156121495760405162461bcd60e51b81526020600482015260166024820152756e6f7420656e6f75676820746f20776974686472617760501b6044820152606401610bb7565b506001600160a01b0390911660009081526101c160209081526040808320338452909152902091900390555050565b600082815b8181101561232e5760006121c58787848181106121aa57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906121bf9190613f0f565b86612f2e565b9050801561231b5761019160008888858181106121f257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122079190613f0f565b63ffffffff1663ffffffff168152602001908152602001600020546101c0600089898681811061224757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061225c9190613f0f565b63ffffffff168152602080820192909252604090810160009081206001600160a01b038a1682529092529020556122938185614323565b93507f2f0b57f663333228518fca119813fe0f6daeb5f19d087965f56b45fecf2d5205858888858181106122d757634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122ec9190613f0f565b604080516001600160a01b03909316835263ffffffff9091166020830152810183905260600160405180910390a15b5080612326816145f4565b91505061217d565b50811561145f5761145f8383613352565b600054610100900460ff1680612358575060005460ff16155b6123745760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff16158015612396576000805461ffff19166101011790555b61239e613456565b6123a66134d9565b6123af82613537565b8015610bca576000805461ff00191690555050565b610bca8282611dad565b670de0b6b3a764000081111580156123e65750600081115b6123ef57600080fd5b60fd55565b60006124008383612f2e565b90508015610b465763ffffffff8316600090815261019160209081526040808320546101c083528184206001600160a01b0387168552909252909120556124478282613352565b604080516001600160a01b038416815263ffffffff851660208201529081018290527f2f0b57f663333228518fca119813fe0f6daeb5f19d087965f56b45fecf2d52059060600160405180910390a1505050565b610100546040516324b4085360e21b81523360048201819052916001600160a01b0316906392d0214c90602401600060405180830381600087803b1580156124e257600080fd5b505af11580156124f6573d6000803e3d6000fd5b5050505063ffffffff841660009081526101306020526040812054670de0b6b3a764000090612525908561453c565b61252f9190614391565b60fc5460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925085169063a9059cbb90604401602060405180830381600087803b15801561257f57600080fd5b505af1158015612593573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125b79190613e3a565b506001600160a01b03841663a9059cbb336125d2848761459a565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561261857600080fd5b505af115801561262c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126509190613e3a565b50604080513381526001600160a01b03861660208201529081018490527fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda39060600160405180910390a15050505050565b60fe546001600160a01b03163314611d195760405162461bcd60e51b815260206004820152600d60248201526c1b9bdd08131bdb99d4da1bdc9d609a1b6044820152606401610bb7565b670c7d713b49d9ffff198213801561270a5750670c7d713b49da000082125b6127745760405162461bcd60e51b815260206004820152603560248201527f62616c616e6365496e63656e7469766543757276655f657175696c69627269756044820152746d4f6666736574206f7574206f6620626f756e647360581b6064820152608401610bb7565b600083116127d95760405162461bcd60e51b815260206004820152602c60248201527f62616c616e6365496e63656e7469766543757276655f6578706f6e656e74206f60448201526b7574206f6620626f756e647360a01b6064820152608401610bb7565b606481106128375760405162461bcd60e51b815260206004820152602560248201527f736166654578706f6e656e744269745368696674696e67206f7574206f6620626044820152646f756e647360d81b6064820152608401610bb7565b60fe54604051631678fc4360e31b815263ffffffff86166004820152600060248201819052916001600160a01b03169063b3c7e2189060440160206040518083038186803b15801561288857600080fd5b505afa15801561289c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128c09190613eb8565b60fe54604051631678fc4360e31b815263ffffffff88166004820152600160248201526001600160a01b039091169063b3c7e2189060440160206040518083038186803b15801561291057600080fd5b505afa158015612924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129489190613eb8565b6129529190614323565b90508382612962836101f461453c565b61296d92911c6143eb565b50606481831c116129d05760405162461bcd60e51b815260206004820152602760248201527f626974207368696674696e6720746f6f206c616e676520666f7220746f74616c604482015266081b1bd8dad95960ca1b6064820152608401610bb7565b5063ffffffff909316600090815261013160209081526040808320949094556101328152838220929092556101339091522055565b600080600080612a188a89898989613600565b915091506000612a288b8b6138a9565b9050612a34838261453c565b63ffffffff8c166000908152610192602090815260408083208e8452909152902060010154612a639190614323565b612a6d838361453c565b63ffffffff8d166000908152610192602090815260408083208f8452909152902060020154612a9c9190614323565b94509450505050965096945050505050565b6001600160a01b0381166000908152610162602052604090205463ffffffff16610bf25760405162461bcd60e51b815260206004820152600f60248201526e0dcdee840ecc2d8d2c840e6f2dce8d608b1b6044820152606401610bb7565b63ffffffff821660009081526101ef6020908152604080832033845290915290205415801590612b66575063ffffffff8216600090815261019160209081526040808320546101ef83528184203385529092529091205411155b15610bca57610bca82336123f4565b60606000612b8483600261453c565b612b8f906002614323565b67ffffffffffffffff811115612bb557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612bdf576020820181803683370190505b509050600360fc1b81600081518110612c0857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612c4557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000612c6984600261453c565b612c74906001614323565b90505b6001811115612d08576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612cb657634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110612cda57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93612d01816145dd565b9050612c77565b508315612d575760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610bb7565b9392505050565b803b612dc25760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610bb7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b612e625760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610bb7565b600080846001600160a01b031684604051612e7d9190614187565b600060405180830381855af49150503d8060008114612eb8576040519150601f19603f3d011682016040523d82523d6000602084013e612ebd565b606091505b5091509150612ee5828260405180606001604052806027815260200161467a602791396138d5565b95945050505050565b612ef781612d5e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b63ffffffff821660008181526101346020908152604080832060018452825280832054838052818420546001600160a01b039182168086526101c180865284872089851680895290875285882054949093168088529086528487208388528652848720548888526101c087528588209388529286528487205497875261019190955292852054949592949192909180821415612fd35760009650505050505050611322565b63ffffffff891660009081526101ef602090815260408083206001600160a01b038c168452909152902054801580159061300d5750818111155b156133355761301f8a8686868561390e565b63ffffffff8b1660009081526101f0602090815260408083206001845282528083206001600160a01b038e168452909152902054909850801561313f5760fe54604051630125edfd60e71b815263ffffffff8d1660048201526024810183905260016044820152606481018490526001600160a01b03909116906392f6fe809060840160206040518083038186803b1580156130ba57600080fd5b505afa1580156130ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f29190613eb8565b6130fc9086614323565b9450613108818761459a565b63ffffffff8c1660009081526101f0602090815260408083206001845282528083206001600160a01b038f16845290915281205595505b5063ffffffff8a1660009081526101f06020908152604080832083805282528083206001600160a01b038d168452909152902054801561325b5760fe54604051630125edfd60e71b815263ffffffff8d1660048201526024810183905260006044820152606481018490526001600160a01b03909116906392f6fe809060840160206040518083038186803b1580156131d757600080fd5b505afa1580156131eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061320f9190613eb8565b6132199087614323565b9550613225818661459a565b63ffffffff8c1660009081526101f06020908152604080832083805282528083206001600160a01b038f16845290915281205594505b6001600160a01b0388811660009081526101c1602081815260408084208f86168086529083528185208c9055948c168452918152818320848452815291819020889055805192835263ffffffff8e16918301919091528101879052606081018690527fea2b4628943d2a0a2c85f85b60007fb6f8273d91c0eaff6f8b140a5007637b359060800160405180910390a16132f78b8787858761390e565b613301908a614323565b63ffffffff8c1660009081526101ef602090815260408083206001600160a01b038f16845290915281205598506133459050565b6133428a8686868661390e565b97505b5050505050505092915050565b60ff546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b1580156133a057600080fd5b505af11580156133b4573d6000803e3d6000fd5b505060ff5460fb5460fd546001600160a01b0392831694506340c10f199350911690670de0b6b3a7640000906133ea908661453c565b6133f49190614391565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561343a57600080fd5b505af115801561344e573d6000803e3d6000fd5b505050505050565b600054610100900460ff168061346f575060005460ff16155b61348b5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff161580156134ad576000805461ffff19166101011790555b6134b5613a01565b6134bd613a01565b6134c5613a01565b8015610bf2576000805461ff001916905550565b600054610100900460ff16806134f2575060005460ff16155b61350e5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff161580156134b5576000805461ffff19166101011790556134bd613a01565b600054610100900460ff1680613550575060005460ff16155b61356c5760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff1615801561358e576000805461ffff19166101011790555b6001600160a01b0382166135a157600080fd5b6135ac6000836123c4565b6135d67fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775836123c4565b6123af7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3836123c4565b600080600061360e88613a6b565b9050600061361c8587614323565b63ffffffff8a166000908152610132602052604081205491925090671bc16d674ec800009061364c9084906144b9565b6136569190614363565b63ffffffff8b16600090815261013360205260409020549091508761367c8360026144b9565b613686908961455b565b12156137a4578682126136ac57600061369f8a8661453c565b955095505050505061389f565b63ffffffff8b16600090815261013160205260408120546136ce60018461459a565b6136d8858b61455b565b6136e392911c6143eb565b63ffffffff8d16600090815261013160205260408120549192509061370a9086851c6143eb565b9050600081613721846706f05b59d3b2000061453c565b61372b9190614391565b9050600061374182670de0b6b3a764000061459a565b9050670de0b6b3a76400008e6137578a8561453c565b613761919061453c565b61376b9190614391565b670de0b6b3a76400008e61377f8b8561453c565b613789919061453c565b6137939190614391565b99509950505050505050505061389f565b876137ae8361460f565b126137cc576137bd8a8561453c565b6000955095505050505061389f565b63ffffffff8b16600090815261013160205260408120546137ee60018461459a565b6137f8858c6142e2565b61380392911c6143eb565b63ffffffff8d16600090815261013160205260408120549192509061382a9086851c6143eb565b9050600081613841846706f05b59d3b2000061453c565b61384b9190614391565b9050600061386182670de0b6b3a764000061459a565b9050670de0b6b3a76400008e6138778a8461453c565b613881919061453c565b61388b9190614391565b670de0b6b3a76400008e61377f8b8661453c565b9550959350505050565b63ffffffff8216600090815261019260209081526040808320848452909152812054612d57904261459a565b606083156138e4575081612d57565b8251156138f45782518084602001fd5b8160405162461bcd60e51b8152600401610bb79190614261565b600084156139855763ffffffff86166000908152610192602090815260408083208684529091528082206001908101548584529183200154613950919061459a565b90506cd73d4c35b9df8aa7d6c3003573602c1b61396d878361453c565b6139779190614391565b6139819083614323565b9150505b8315612ee55763ffffffff861660009081526101926020908152604080832086845290915280822060029081015485845291832001546139c5919061459a565b90506cd73d4c35b9df8aa7d6c3003573602c1b6139e2868361453c565b6139ec9190614391565b6139f69083614323565b979650505050505050565b600054610100900460ff1680613a1a575060005460ff16155b613a365760405162461bcd60e51b8152600401610bb790614294565b600054610100900460ff161580156134c5576000805461ffff19166101011790558015610bf2576000805461ff001916905550565b6000806000613a7984613b2e565b91509150670de0b6b3a7640000811015613aa357634e487b7160e01b600052600160045260246000fd5b63ffffffff841660009081526101926020908152604080832083805290915290205482613ad0824261459a565b1015613b1b5782613ae1824261459a565b613af3670de0b6b3a76400008561459a565b613afd919061453c565b613b079190614391565b613b11908361459a565b9350505050610ac5565b670de0b6b3a76400009350505050610ac5565b63ffffffff8116600090815261012e602090815260408083205461012f90925290912054670de0b6b3a7640000811015613b6d5750670de0b6b3a76400005b915091565b80356001600160a01b0381168114610ac557600080fd5b60008083601f840112613b9a578081fd5b50813567ffffffffffffffff811115613bb1578182fd5b6020830191508360208260051b8501011115613bcc57600080fd5b9250929050565b803563ffffffff81168114610ac557600080fd5b600060208284031215613bf8578081fd5b612d5782613b72565b60008060408385031215613c13578081fd5b613c1c83613b72565b9150613c2a60208401613b72565b90509250929050565b600080600080600080600080610100898b031215613c4f578384fd5b613c5889613b72565b9750613c6660208a01613b72565b9650613c7460408a01613b72565b9550613c8260608a01613b72565b9450613c9060808a01613b72565b9350613c9e60a08a01613b72565b925060c08901359150613cb360e08a01613b72565b90509295985092959890939650565b60008060408385031215613cd4578182fd5b613cdd83613b72565b9150602083013567ffffffffffffffff80821115613cf9578283fd5b818501915085601f830112613d0c578283fd5b813581811115613d1e57613d1e614655565b604051601f8201601f19908116603f01168101908382118183101715613d4657613d46614655565b81604052828152886020848701011115613d5e578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215613d91578182fd5b613d9a83613b72565b946020939093013593505050565b60008060208385031215613dba578182fd5b823567ffffffffffffffff811115613dd0578283fd5b613ddc85828601613b89565b90969095509350505050565b600080600060408486031215613dfc578283fd5b833567ffffffffffffffff811115613e12578384fd5b613e1e86828701613b89565b9094509250613e31905060208501613b72565b90509250925092565b600060208284031215613e4b578081fd5b8151612d578161466b565b600060208284031215613e67578081fd5b5035919050565b60008060408385031215613e80578182fd5b82359150613c2a60208401613b72565b600060208284031215613ea1578081fd5b81356001600160e01b031981168114612d57578182fd5b600060208284031215613ec9578081fd5b5051919050565b600080600060608486031215613ee4578081fd5b83359250613ef460208501613bd3565b91506040840135613f048161466b565b809150509250925092565b600060208284031215613f20578081fd5b612d5782613bd3565b60008060408385031215613f3b578182fd5b613c1c83613bd3565b600080600080600080600080610100898b031215613f60578182fd5b613f6989613bd3565b9750613f7760208a01613b72565b9650613f8560408a01613b72565b979a96995096976060810135975060808101359660a0820135965060c0820135955060e0909101359350915050565b60008060408385031215613fc6578182fd5b613fcf83613bd3565b91506020830135613fdf8161466b565b809150509250929050565b600080600060608486031215613ffe578081fd5b61400784613bd3565b925060208401356140178161466b565b9150613e3160408501613b72565b600080600060608486031215614039578081fd5b61404284613bd3565b925060208401356140528161466b565b929592945050506040919091013590565b60008060008060008060008060006101208a8c031215614081578283fd5b61408a8a613bd3565b985060208a013561409a8161466b565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013560ff811681146140cb578384fd5b8093505060e08a013591506101008a013590509295985092959850929598565b600080604083850312156140fd578182fd5b613d9a83613bd3565b6000806000806080858703121561411b578182fd5b61412485613bd3565b966020860135965060408601359560600135945092505050565b60008060008060008060c08789031215614156578384fd5b61415f87613bd3565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b600082516141998184602087016145b1565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516141db8160178501602088016145b1565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161420c8160288401602088016145b1565b01602801949350505050565b60208082528181018390526000908460408401835b868110156142565763ffffffff61424384613bd3565b168252918301919083019060010161422d565b509695505050505050565b60006020825282518060208401526142808160408501602087016145b1565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600080821280156001600160ff1b038490038513161561430457614304614629565b600160ff1b839003841281161561431d5761431d614629565b50500190565b6000821982111561433657614336614629565b500190565b600063ffffffff80831681851680830382111561435a5761435a614629565b01949350505050565b6000826143725761437261463f565b600160ff1b82146000198414161561438c5761438c614629565b500590565b6000826143a0576143a061463f565b500490565b80825b60018086116143b757506143e2565b8187048211156143c9576143c9614629565b808616156143d657918102915b9490941c9380026143a8565b94509492505050565b6000612d57600019848460008261440457506001612d57565b8161441157506000612d57565b816001811461442757600281146144315761445e565b6001915050612d57565b60ff84111561444257614442614629565b6001841b91508482111561445857614458614629565b50612d57565b5060208310610133831016604e8410600b8410161715614491575081810a8381111561448c5761448c614629565b612d57565b61449e84848460016143a5565b8086048211156144b0576144b0614629565b02949350505050565b60006001600160ff1b03818413828413808216868404861116156144df576144df614629565b600160ff1b848712828116878305891216156144fd576144fd614629565b85871292508782058712848416161561451857614518614629565b8785058712818416161561452e5761452e614629565b505050929093029392505050565b600081600019048311821515161561455657614556614629565b500290565b60008083128015600160ff1b85018412161561457957614579614629565b6001600160ff1b038401831381161561459457614594614629565b50500390565b6000828210156145ac576145ac614629565b500390565b60005b838110156145cc5781810151838201526020016145b4565b838111156119d25750506000910152565b6000816145ec576145ec614629565b506000190190565b600060001982141561460857614608614629565b5060010190565b6000600160ff1b82141561462557614625614629565b0390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610bf257600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e65a261f0e7be1ea69060a11b4eecf050d4dc7b4e508a141e6173fce849a994964736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": { + "addNewStakingFund(uint32,address,address,uint256,uint256,uint256,uint256,int256)": { + "params": { + "_balanceIncentiveCurve_equilibriumOffset": "Offset for balance curve (see _calculateFloatPerSecond)", + "_balanceIncentiveCurve_exponent": "Exponent for balance curve (see _calculateFloatPerSecond)", + "kInitialMultiplier": "Initial boost on float generation for the market.", + "kPeriod": "Period which the boost should last.", + "longToken": "Address of the long token for the market.", + "marketIndex": "Identifies the market.", + "shortToken": "Address of the short token for the market.", + "unstakeFee_e18": "Percentage of tokens that are levied on unstaking in base 1e18." + } + }, + "changeBalanceIncentiveParameters(uint32,uint256,int256,uint256)": { + "params": { + "_balanceIncentiveCurve_equilibriumOffset": "The new offset.", + "_balanceIncentiveCurve_exponent": "The new exponent for the curve.", + "_safeExponentBitShifting": "The new bitshifting applied to the curve.", + "marketIndex": "Identifies the market." + } + }, + "changeFloatPercentage(uint256)": { + "params": { + "newFloatPercentage": "The new float percentage in base 1e18." + } + }, + "changeUnstakeFee(uint32,uint256)": { + "params": { + "marketIndex": "Identifies the market.", + "newMarketUnstakeFee_e18": "The new unstake fee." + } + }, + "claimFloatCustom(uint32[])": { + "params": { + "marketIndexes": "Identifiers for the markets for which to mint float." + } + }, + "claimFloatCustomFor(uint32[],address)": { + "params": { + "marketIndexes": "Identifiers for the markets for which to mint float.", + "user": "The address of the user." + } + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,address,address,address,address,address,uint256,address)": { + "details": "Calls OpenZeppelin's initializer modifier.", + "params": { + "_admin": "Address of the admin role.", + "_floatCapital": "Address of the contract which earns a fixed percentage of Float.", + "_floatPercentage": "Determines the float percentage that gets minted for Float Capital, base 1e18.", + "_floatToken": "Address of the Float token earned by staking.", + "_floatTreasury": "Address of the treasury contract for managing fees.", + "_longShort": "Address of the LongShort contract, a deployed LongShort.sol" + } + }, + "pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(uint32,uint256,uint256,uint256,uint256,uint256)": { + "params": { + "longPrice": "The price of the long token as defined in LongShort.sol", + "longValue": "The value locked in the long side of the market.", + "marketIndex": "An identifier for the market.", + "marketUpdateIndex": "Current update index in the LongShort contract for this market.", + "shortPrice": "The price of the short token as defined in LongShort.sol", + "shortValue": "The value locked in the short side of the market." + } + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "shiftTokens(uint256,uint32,bool)": { + "params": { + "amountSyntheticTokensToShift": "Amount of tokens to shift.", + "isShiftFromLong": "Whether the shift is from long to short or short to long.", + "marketIndex": "Identifier for the market." + } + }, + "stakeFromUser(address,uint256)": { + "params": { + "amount": "Amount to stake.", + "from": "Address to stake for." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "withdraw(uint32,bool,uint256)": { + "params": { + "amount": "Amount to withdraw.", + "isWithdrawFromLong": "is synthetic token to be withdrawn long or short", + "marketIndex": "Market index of staked synthetic token" + } + }, + "withdrawAll(uint32,bool)": { + "params": { + "isWithdrawFromLong": "is synthetic token to be withdrawn long or short", + "marketIndex": "Market index of staked synthetic token" + } + } + }, + "stateVariables": { + "userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom": { + "details": "marketIndex => usersAddress => amountUserRequestedToShiftAwayFromLongOnNextUpdate" + }, + "userNextPrice_paymentToken_depositAmount": { + "details": "marketIndex => usersAddress => stakedActionIndex" + }, + "userNextPrice_stakedActionIndex": { + "details": "marketIndex => usersAddress => stakedActionIndex" + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addNewStakingFund(uint32,address,address,uint256,uint256,uint256,uint256,int256)": { + "notice": "Sets this contract to track staking for a market in LongShort.sol" + }, + "changeBalanceIncentiveParameters(uint32,uint256,int256,uint256)": { + "notice": "Changes the balance incentive exponent for a market" + }, + "changeFloatPercentage(uint256)": { + "notice": "Changes percentage of float that is minted for float capital." + }, + "changeUnstakeFee(uint32,uint256)": { + "notice": "Changes unstake fee for a market" + }, + "claimFloatCustom(uint32[])": { + "notice": "Mints outstanding float for msg.sender." + }, + "claimFloatCustomFor(uint32[],address)": { + "notice": "Mints outstanding float on behalf of another user." + }, + "initialize(address,address,address,address,address,address,uint256,address)": { + "notice": "Initializes the contract." + }, + "pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(uint32,uint256,uint256,uint256,uint256,uint256)": { + "notice": "Adds new accumulativeIssuancePerStakedSynthSnapshots for the given long/short tokens. Called by the ILongShort contract whenever there is a state change for a market." + }, + "shiftTokens(uint256,uint32,bool)": { + "notice": "Allows users to shift their staked tokens from one side of the market to the other at the next price." + }, + "stakeFromUser(address,uint256)": { + "notice": "A user with synthetic tokens stakes by calling stake on the token contract which calls this function. We need to first update the state of the LongShort contract for this market before staking to correctly calculate user rewards." + }, + "withdraw(uint32,bool,uint256)": { + "notice": "Withdraw function. Allows users to unstake." + }, + "withdrawAll(uint32,bool)": { + "notice": "Allows users to withdraw their entire stake for a token." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/Staker.sol:Staker", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/Staker.sol:Staker", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/Staker.sol:Staker", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/Staker.sol:Staker", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/Staker.sol:Staker", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/Staker.sol:Staker", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/Staker.sol:Staker", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/Staker.sol:Staker", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 13320, + "contract": "contracts/Staker.sol:Staker", + "label": "floatCapital", + "offset": 0, + "slot": "251", + "type": "t_address" + }, + { + "astId": 13322, + "contract": "contracts/Staker.sol:Staker", + "label": "floatTreasury", + "offset": 0, + "slot": "252", + "type": "t_address" + }, + { + "astId": 13324, + "contract": "contracts/Staker.sol:Staker", + "label": "floatPercentage", + "offset": 0, + "slot": "253", + "type": "t_uint256" + }, + { + "astId": 13326, + "contract": "contracts/Staker.sol:Staker", + "label": "longShort", + "offset": 0, + "slot": "254", + "type": "t_address" + }, + { + "astId": 13328, + "contract": "contracts/Staker.sol:Staker", + "label": "floatToken", + "offset": 0, + "slot": "255", + "type": "t_address" + }, + { + "astId": 13330, + "contract": "contracts/Staker.sol:Staker", + "label": "gems", + "offset": 0, + "slot": "256", + "type": "t_address" + }, + { + "astId": 13334, + "contract": "contracts/Staker.sol:Staker", + "label": "__globalStateGap", + "offset": 0, + "slot": "257", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 13338, + "contract": "contracts/Staker.sol:Staker", + "label": "marketLaunchIncentive_period", + "offset": 0, + "slot": "302", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 13342, + "contract": "contracts/Staker.sol:Staker", + "label": "marketLaunchIncentive_multipliers", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 13346, + "contract": "contracts/Staker.sol:Staker", + "label": "marketUnstakeFee_e18", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 13350, + "contract": "contracts/Staker.sol:Staker", + "label": "balanceIncentiveCurve_exponent", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 13354, + "contract": "contracts/Staker.sol:Staker", + "label": "balanceIncentiveCurve_equilibriumOffset", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_uint32,t_int256)" + }, + { + "astId": 13358, + "contract": "contracts/Staker.sol:Staker", + "label": "safeExponentBitShifting", + "offset": 0, + "slot": "307", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 13364, + "contract": "contracts/Staker.sol:Staker", + "label": "syntheticTokens", + "offset": 0, + "slot": "308", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_address))" + }, + { + "astId": 13368, + "contract": "contracts/Staker.sol:Staker", + "label": "__marketStateGap", + "offset": 0, + "slot": "309", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 13372, + "contract": "contracts/Staker.sol:Staker", + "label": "marketIndexOfToken", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_address,t_uint32)" + }, + { + "astId": 13376, + "contract": "contracts/Staker.sol:Staker", + "label": "userNonce", + "offset": 0, + "slot": "355", + "type": "t_mapping(t_address,t_uint32)" + }, + { + "astId": 13380, + "contract": "contracts/Staker.sol:Staker", + "label": "__synthStateGap", + "offset": 0, + "slot": "356", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 13384, + "contract": "contracts/Staker.sol:Staker", + "label": "latestRewardIndex", + "offset": 0, + "slot": "401", + "type": "t_mapping(t_uint32,t_uint256)" + }, + { + "astId": 13391, + "contract": "contracts/Staker.sol:Staker", + "label": "accumulativeFloatPerSyntheticTokenSnapshots", + "offset": 0, + "slot": "402", + "type": "t_mapping(t_uint32,t_mapping(t_uint256,t_struct(AccumulativeIssuancePerStakedSynthSnapshot)13398_storage))" + }, + { + "astId": 13402, + "contract": "contracts/Staker.sol:Staker", + "label": "__rewardStateGap", + "offset": 0, + "slot": "403", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 13408, + "contract": "contracts/Staker.sol:Staker", + "label": "userIndexOfLastClaimedReward", + "offset": 0, + "slot": "448", + "type": "t_mapping(t_uint32,t_mapping(t_address,t_uint256))" + }, + { + "astId": 13415, + "contract": "contracts/Staker.sol:Staker", + "label": "userAmountStaked", + "offset": 0, + "slot": "449", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 13419, + "contract": "contracts/Staker.sol:Staker", + "label": "__userStateGap", + "offset": 0, + "slot": "450", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 13426, + "contract": "contracts/Staker.sol:Staker", + "label": "userNextPrice_stakedActionIndex", + "offset": 0, + "slot": "495", + "type": "t_mapping(t_uint32,t_mapping(t_address,t_uint256))" + }, + { + "astId": 13435, + "contract": "contracts/Staker.sol:Staker", + "label": "userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom", + "offset": 0, + "slot": "496", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))" + }, + { + "astId": 13444, + "contract": "contracts/Staker.sol:Staker", + "label": "userNextPrice_paymentToken_depositAmount", + "offset": 0, + "slot": "497", + "type": "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_int256": { + "encoding": "inplace", + "label": "int256", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_address,t_uint32)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" + }, + "t_mapping(t_bool,t_address)": { + "encoding": "mapping", + "key": "t_bool", + "label": "mapping(bool => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bool,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_bool", + "label": "mapping(bool => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_mapping(t_uint256,t_struct(AccumulativeIssuancePerStakedSynthSnapshot)13398_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct Staker.AccumulativeIssuancePerStakedSynthSnapshot)", + "numberOfBytes": "32", + "value": "t_struct(AccumulativeIssuancePerStakedSynthSnapshot)13398_storage" + }, + "t_mapping(t_uint32,t_int256)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => int256)", + "numberOfBytes": "32", + "value": "t_int256" + }, + "t_mapping(t_uint32,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_uint32,t_mapping(t_bool,t_address))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(bool => address))", + "numberOfBytes": "32", + "value": "t_mapping(t_bool,t_address)" + }, + "t_mapping(t_uint32,t_mapping(t_bool,t_mapping(t_address,t_uint256)))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(bool => mapping(address => uint256)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bool,t_mapping(t_address,t_uint256))" + }, + "t_mapping(t_uint32,t_mapping(t_uint256,t_struct(AccumulativeIssuancePerStakedSynthSnapshot)13398_storage))": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => mapping(uint256 => struct Staker.AccumulativeIssuancePerStakedSynthSnapshot))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(AccumulativeIssuancePerStakedSynthSnapshot)13398_storage)" + }, + "t_mapping(t_uint32,t_uint256)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(AccumulativeIssuancePerStakedSynthSnapshot)13398_storage": { + "encoding": "inplace", + "label": "struct Staker.AccumulativeIssuancePerStakedSynthSnapshot", + "members": [ + { + "astId": 13393, + "contract": "contracts/Staker.sol:Staker", + "label": "timestamp", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 13395, + "contract": "contracts/Staker.sol:Staker", + "label": "accumulativeFloatPerSyntheticToken_long", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 13397, + "contract": "contracts/Staker.sol:Staker", + "label": "accumulativeFloatPerSyntheticToken_short", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "numberOfBytes": "96" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/Staker.sol:Staker", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/Staker.sol:Staker", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/polygon/Staker_Proxy.json b/deployments/polygon/Staker_Proxy.json new file mode 100644 index 0000000..fdad8f5 --- /dev/null +++ b/deployments/polygon/Staker_Proxy.json @@ -0,0 +1,147 @@ +{ + "address": "0xe7C89eb987c415B4233789E5ceC0eE7407d2C47F", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x1b33ad1e5d9f2dca681bdc2e0ea967b0de8bd060fd1cbfdb57c91f53090b6e26", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xe7C89eb987c415B4233789E5ceC0eE7407d2C47F", + "transactionIndex": 48, + "gasUsed": "247797", + "logsBloom": "0x00000000000000000000000000000000400000000020000000000000400000000000000000000000000000000000000000008000000000000000000000000000000004000000000000000000000002800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000800000000000000000000000000000000000000000000000200000040002000000000002000000000000000000000000000000000000004000000020000008000001001000000000000000000000000000100000000001000000000000000200000000000000000001000000000000000000000000100000", + "blockHash": "0x8e52848a928c66e26b980994a91b5592bffeea05ebc52a0445c397bf47e93ea5", + "transactionHash": "0x1b33ad1e5d9f2dca681bdc2e0ea967b0de8bd060fd1cbfdb57c91f53090b6e26", + "logs": [ + { + "transactionIndex": 48, + "blockNumber": 19058654, + "transactionHash": "0x1b33ad1e5d9f2dca681bdc2e0ea967b0de8bd060fd1cbfdb57c91f53090b6e26", + "address": "0xe7C89eb987c415B4233789E5ceC0eE7407d2C47F", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000011bf56dee7f3627985552a8b7aa6845a6636e3b7" + ], + "data": "0x", + "logIndex": 248, + "blockHash": "0x8e52848a928c66e26b980994a91b5592bffeea05ebc52a0445c397bf47e93ea5" + }, + { + "transactionIndex": 48, + "blockNumber": 19058654, + "transactionHash": "0x1b33ad1e5d9f2dca681bdc2e0ea967b0de8bd060fd1cbfdb57c91f53090b6e26", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x0000000000000000000000000000000000000000000000000002265a8afa68800000000000000000000000000000000000000000000000000d9c546d73f4622a000000000000000000000000000000000000000000006e187fdb88c9e33f11b90000000000000000000000000000000000000000000000000d9a2e12e8f9f9aa000000000000000000000000000000000000000000006e187fddaf246e397a39", + "logIndex": 249, + "blockHash": "0x8e52848a928c66e26b980994a91b5592bffeea05ebc52a0445c397bf47e93ea5" + } + ], + "blockNumber": 19058654, + "cumulativeGasUsed": "9548099", + "status": 1, + "byzantium": true + }, + "args": [ + "0x11BF56dEE7F3627985552A8B7Aa6845a6636E3B7", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0x" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/TokenFactory.json b/deployments/polygon/TokenFactory.json new file mode 100644 index 0000000..fa80187 --- /dev/null +++ b/deployments/polygon/TokenFactory.json @@ -0,0 +1,151 @@ +{ + "address": "0x809C2619a27c58334CAac07470899e4dd0574AEC", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_longShort", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "syntheticName", + "type": "string" + }, + { + "internalType": "string", + "name": "syntheticSymbol", + "type": "string" + }, + { + "internalType": "address", + "name": "staker", + "type": "address" + }, + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + } + ], + "name": "createSyntheticToken", + "outputs": [ + { + "internalType": "address", + "name": "syntheticToken", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x5372257599d4a33476e5ce8f0010e32a408ba7a05b8be603cff0823edc3e45f9", + "receipt": { + "to": null, + "from": "0xcfcCB5e6b3882b7795eb1B1A9f18831A842d4eE0", + "contractAddress": "0x809C2619a27c58334CAac07470899e4dd0574AEC", + "transactionIndex": 15, + "gasUsed": "2241515", + "logsBloom": "0x00000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000008000000000000000000000000000000004000000000000000000200000800000000000000000000100000000000000000000000000000100000000000000000000000000000080000000000000000000000000000000800000000000000000000000800000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x66d796aa32a8796e65147bf3a359621c74be96c6dc095e5379926134446a0f6f", + "transactionHash": "0x5372257599d4a33476e5ce8f0010e32a408ba7a05b8be603cff0823edc3e45f9", + "logs": [ + { + "transactionIndex": 15, + "blockNumber": 19059210, + "transactionHash": "0x5372257599d4a33476e5ce8f0010e32a408ba7a05b8be603cff0823edc3e45f9", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x000000000000000000000000000000000000000000000000004fa275cd564c000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000006e1ffc1e867b77c9b2cf0000000000000000000000000000000000000000000000000d91143dda0db400000000000000000000000000000000000000000000006e1ffc6e28f1451ffecf", + "logIndex": 112, + "blockHash": "0x66d796aa32a8796e65147bf3a359621c74be96c6dc095e5379926134446a0f6f" + } + ], + "blockNumber": 19059210, + "cumulativeGasUsed": "4826791", + "status": 1, + "byzantium": true + }, + "args": [ + "0x168a5d1217AEcd258b03018d5bF1A1677A07b733" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"syntheticName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"syntheticSymbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isLong\",\"type\":\"bool\"}],\"name\":\"createSyntheticToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"syntheticToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_longShort\":\"address of the longShort contract\"}},\"createSyntheticToken(string,string,address,uint32,bool)\":{\"params\":{\"isLong\":\"boolean denoting if the synthetic token is long or short\",\"marketIndex\":\"market index this synthetic token belongs to\",\"staker\":\"address of the staker contract\",\"syntheticName\":\"name of the synthetic token\",\"syntheticSymbol\":\"ticker symbol of the synthetic token\"},\"returns\":{\"syntheticToken\":\"- address of the created synthetic token\"}}},\"title\":\"TokenFactory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"sets the address of the longShort contract on initialization\"},\"createSyntheticToken(string,string,address,uint32,bool)\":{\"notice\":\"creates and sets up a new synthetic token\"},\"longShort()\":{\"notice\":\"address of long short contract\"}},\"notice\":\"contract is used to reliably mint the synthetic tokens used by the float protocol.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/TokenFactory.sol\":\"TokenFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\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, _msgSender());\\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(IAccessControl).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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x183481af1c40d2efb26b86f63d6fe9e22f24c87e436d60a69f261b38500e7cd6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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\":\"0xfe0edb09653ed10e8a1bfe03eb9b0ff06775666eee817a95bd3d0799f1ee2b44\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 currentAllowance = allowance(account, _msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n unchecked {\\n _approve(account, _msgSender(), currentAllowance - amount);\\n }\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0xf98cb1651a90d20ef77d8c1dd10d5fce4954e747603e5672a8292bd4368120dd\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20Permit.sol\\\";\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../../../utils/Counters.sol\\\";\\n\\n/**\\n * @dev Implementation 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 *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\\n using Counters for Counters.Counter;\\n\\n mapping(address => Counters.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private immutable _PERMIT_TYPEHASH =\\n keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n constructor(string memory name) EIP712(name, \\\"1\\\") {}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\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 ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSA.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n Counters.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n}\\n\",\"keccak256\":\"0x7ce4684ee1fac31ee5671df82b30c10bd2ebf88add2f63524ed00618a8486907\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x3aab711a5f9a5a5a394191e928cc8258e8a243e855bb0275e7834f9686383277\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary Counters {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x78450f4e3b722cce467b21e285f72ce5eaf361e9ba9dd2241a413926246773cd\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x391d3ba97ab6856a16b225d6ee29617ad15ff00db70f3b4df1ab5ea33aa47c9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xbc991a1cf357ce19480831a40792c814238a3b5458134703682abd8aa39719fb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSA.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n /* solhint-disable var-name-mixedcase */\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\\n uint256 private immutable _CACHED_CHAIN_ID;\\n\\n bytes32 private immutable _HASHED_NAME;\\n bytes32 private immutable _HASHED_VERSION;\\n bytes32 private immutable _TYPE_HASH;\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor(string memory name, string memory version) {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n bytes32 typeHash = keccak256(\\n \\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"\\n );\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n _CACHED_CHAIN_ID = block.chainid;\\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\\n _TYPE_HASH = typeHash;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n if (block.chainid == _CACHED_CHAIN_ID) {\\n return _CACHED_DOMAIN_SEPARATOR;\\n } else {\\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\\n }\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n}\\n\",\"keccak256\":\"0xba18d725602452307e5b278ed4566616c63792d89f3a0388a6f285428c26e681\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0x5718c5df9bd67ac68a796961df938821bb5dc0cd4c6118d77e9145afb187409b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xa28007762d9da9db878dd421960c8cb9a10471f47ab5c1b3309bfe48e9e79ff4\",\"license\":\"MIT\"},\"contracts/SyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./interfaces/IStaker.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\nimport \\\"./interfaces/ISyntheticToken.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol\\\";\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n@dev Logic for price tracking contained in LongShort.sol. \\n The contract inherits from ERC20PresetMinterPauser.sol\\n*/\\ncontract SyntheticToken is ISyntheticToken, ERC20, ERC20Burnable, AccessControl, ERC20Permit {\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n\\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\\n address public immutable longShort;\\n /// @notice Address of the Staker contract, a deployed Staker.sol\\n address public immutable staker;\\n /// @notice Identifies which market in longShort the token is for.\\n uint32 public immutable marketIndex;\\n /// @notice Whether the token is a long token or short token for its market.\\n bool public immutable isLong;\\n\\n /// @notice Creates an instance of the contract.\\n /// @dev Should only be called by TokenFactory.sol for our system.\\n /// @param name The name of the token.\\n /// @param symbol The symbol for the token.\\n /// @param _longShort Address of the core LongShort contract.\\n /// @param _staker Address of the staker contract.\\n /// @param _marketIndex Which market the token is for.\\n /// @param _isLong Whether the token is long or short for its market.\\n constructor(\\n string memory name,\\n string memory symbol,\\n address _longShort,\\n address _staker,\\n uint32 _marketIndex,\\n bool _isLong\\n ) ERC20(name, symbol) ERC20Permit(name) {\\n longShort = _longShort;\\n staker = _staker;\\n marketIndex = _marketIndex;\\n isLong = _isLong;\\n\\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\\n _setupRole(MINTER_ROLE, _longShort);\\n }\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n /// @dev Core staking logic contained in Staker.sol\\n /// @param amount Amount to stake in wei.\\n function stake(uint256 amount) external override {\\n // NOTE: this is safe, this function will throw \\\"ERC20: transfer\\n // amount exceeds balance\\\" if amount exceeds users balance.\\n super._transfer(msg.sender, address(staker), amount);\\n\\n IStaker(staker).stakeFromUser(msg.sender, amount);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 FUNCTIONS INHERITED BY ERC20PresetMinterPauser \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n function totalSupply() public view virtual override(ERC20, ISyntheticToken) returns (uint256) {\\n return ERC20.totalSupply();\\n }\\n\\n /** \\n @notice Mints a number of synthetic tokens for an address.\\n @dev Can only be called by addresses with a minter role. \\n This should correspond to the Long Short contract.\\n @param to The address for which to mint the tokens for.\\n @param amount Amount of synthetic tokens to mint in wei.\\n */\\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\\n /// @param amount The amount of tokens to burn in wei.\\n function burn(uint256 amount) public override(ERC20Burnable, ISyntheticToken) {\\n require(msg.sender == longShort, \\\"Only LongShort contract\\\");\\n super._burn(_msgSender(), amount);\\n }\\n\\n /** \\n @notice Overrides the default ERC20 transferFrom.\\n @dev To allow users to avoid approving LongShort when redeeming tokens,\\n longShort has a virtual infinite allowance.\\n @param sender User for which to transfer tokens.\\n @param recipient Recipient of the transferred tokens.\\n @param amount Amount of tokens to transfer in wei.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public override(ERC20, ISyntheticToken) returns (bool) {\\n if (recipient == longShort && msg.sender == longShort) {\\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\\n ERC20._transfer(sender, recipient, amount);\\n return true;\\n } else {\\n return ERC20.transferFrom(sender, recipient, amount);\\n }\\n }\\n\\n function transfer(address recipient, uint256 amount)\\n public\\n virtual\\n override(ERC20, ISyntheticToken)\\n returns (bool)\\n {\\n return ERC20.transfer(recipient, amount);\\n }\\n\\n /** \\n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\\n tokens from next price actions before any token transfer occurs.\\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\\n @param sender User for which tokens are to be transferred for.\\n */\\n function _beforeTokenTransfer(\\n address sender,\\n address to,\\n uint256 amount\\n ) internal override {\\n if (sender != longShort) {\\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\\n }\\n super._beforeTokenTransfer(sender, to, amount);\\n }\\n\\n /** \\n @notice Gets the synthetic token balance of the user in wei.\\n @dev To automatically account for next price actions which have been confirmed but not settled,\\n includes any outstanding tokens owed by longShort.\\n @param account The address for which to get the balance of.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return\\n ERC20.balanceOf(account) +\\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\\n account,\\n marketIndex,\\n isLong\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf0b0c616469076573a355e08d656a04100a29557c4e29616ec86a8ad577a7e17\",\"license\":\"BUSL-1.1\"},\"contracts/TokenFactory.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"./SyntheticToken.sol\\\";\\nimport \\\"./interfaces/ITokenFactory.sol\\\";\\n\\n/// @title TokenFactory\\n/// @notice contract is used to reliably mint the synthetic tokens used by the float protocol.\\ncontract TokenFactory is ITokenFactory {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 STATE \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice address of long short contract\\n address public immutable longShort;\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MODIFIERS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @dev only allow longShort contract to call this function\\n modifier onlyLongShort() {\\n require(msg.sender == address(longShort));\\n _;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 SET-UP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice sets the address of the longShort contract on initialization\\n /// @param _longShort address of the longShort contract\\n constructor(address _longShort) {\\n longShort = _longShort;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 TOKEN CREATION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice creates and sets up a new synthetic token\\n /// @param syntheticName name of the synthetic token\\n /// @param syntheticSymbol ticker symbol of the synthetic token\\n /// @param staker address of the staker contract\\n /// @param marketIndex market index this synthetic token belongs to\\n /// @param isLong boolean denoting if the synthetic token is long or short\\n /// @return syntheticToken - address of the created synthetic token\\n function createSyntheticToken(\\n string calldata syntheticName,\\n string calldata syntheticSymbol,\\n address staker,\\n uint32 marketIndex,\\n bool isLong\\n ) external override onlyLongShort returns (address syntheticToken) {\\n syntheticToken = address(\\n new SyntheticToken(syntheticName, syntheticSymbol, longShort, staker, marketIndex, isLong)\\n );\\n }\\n}\\n\",\"keccak256\":\"0x0600dbd499020b37473edbd2412fb40f4fdd816f16910685a3c5f58b43063232\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStaker.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IStaker {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event StakerV1(\\n address admin,\\n address floatTreasury,\\n address floatCapital,\\n address floatToken,\\n uint256 floatPercentage\\n );\\n\\n event MarketAddedToStaker(\\n uint32 marketIndex,\\n uint256 exitFee_e18,\\n uint256 period,\\n uint256 multiplier,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveEquilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\\n uint32 marketIndex,\\n uint256 accumulativeFloatIssuanceSnapshotIndex,\\n uint256 accumulativeLong,\\n uint256 accumulativeShort\\n );\\n\\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\\n\\n event StakeWithdrawn(address user, address token, uint256 amount);\\n\\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\\n\\n event MarketLaunchIncentiveParametersChanges(\\n uint32 marketIndex,\\n uint256 period,\\n uint256 multiplier\\n );\\n\\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\\n\\n event BalanceIncentiveParamsUpdated(\\n uint32 marketIndex,\\n uint256 balanceIncentiveExponent,\\n int256 balanceIncentiveCurve_equilibriumOffset,\\n uint256 safeExponentBitShifting\\n );\\n\\n event FloatPercentageUpdated(uint256 floatPercentage);\\n\\n event NextPriceStakeShift(\\n address user,\\n uint32 marketIndex,\\n uint256 amount,\\n bool isShiftFromLong,\\n uint256 userShiftIndex\\n );\\n\\n // only for graph validation\\n event StakeShifted(\\n address user,\\n uint32 marketIndex,\\n uint256 newAmountStakedLong,\\n uint256 newAmountStakedShort\\n );\\n\\n function userAmountStaked(address, address) external view returns (uint256);\\n\\n function addNewStakingFund(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n uint256 kInitialMultiplier,\\n uint256 kPeriod,\\n uint256 unstakeFee_e18,\\n uint256 _balanceIncentiveCurve_exponent,\\n int256 _balanceIncentiveCurve_equilibriumOffset\\n ) external;\\n\\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\\n uint32 marketIndex,\\n uint256 marketUpdateIndex,\\n uint256 longTokenPrice,\\n uint256 shortTokenPrice,\\n uint256 longValue,\\n uint256 shortValue\\n ) external;\\n\\n function stakeFromUser(address from, uint256 amount) external;\\n\\n function shiftTokens(\\n uint256 amountSyntheticTokensToShift,\\n uint32 marketIndex,\\n bool isShiftFromLong\\n ) external;\\n}\\n\",\"keccak256\":\"0x20995aa36f54d4019dd0e685b3f827342f03c47b8b17a0f97918d40177c36669\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISyntheticToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/**\\n@title SyntheticToken\\n@notice An ERC20 token that tracks or inversely tracks the price of an\\n underlying asset with floating exposure.\\n*/\\ninterface ISyntheticToken {\\n // function MINTER_ROLE() external returns (bytes32);\\n\\n /// @notice Allows users to stake their synthetic tokens to earn Float.\\n function stake(uint256) external;\\n\\n function mint(address, uint256) external;\\n\\n function totalSupply() external returns (uint256);\\n\\n function transferFrom(\\n address,\\n address,\\n uint256\\n ) external returns (bool);\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function burn(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba1a2c66bf11e22077a46f8037498ec577250e7de27268d88f4ea989c7532040\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ITokenFactory.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ITokenFactory {\\n function createSyntheticToken(\\n string calldata syntheticName,\\n string calldata syntheticSymbol,\\n address staker,\\n uint32 marketIndex,\\n bool isLong\\n ) external returns (address);\\n}\\n\",\"keccak256\":\"0x90e4adf1a78ded36d804731a69137b3a4b6c4a6e9c9af46c7ccfa8d91b976e2e\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60a060405234801561001057600080fd5b5060405161285238038061285283398101604081905261002f91610044565b60601b6001600160601b031916608052610072565b600060208284031215610055578081fd5b81516001600160a01b038116811461006b578182fd5b9392505050565b60805160601c6127b761009b600039600081816040015281816099015260c901526127b76000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063299498721461003b578063e6d304671461007e575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b61006261008c36600461019a565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100c357600080fd5b878787877f00000000000000000000000000000000000000000000000000000000000000008888886040516100f790610131565b610108989796959493929190610279565b604051809103906000f080158015610124573d6000803e3d6000fd5b5098975050505050505050565b6124a8806102da83390190565b8035801515811461014e57600080fd5b919050565b60008083601f840112610164578182fd5b50813567ffffffffffffffff81111561017b578182fd5b60208301915083602082850101111561019357600080fd5b9250929050565b600080600080600080600060a0888a0312156101b4578283fd5b873567ffffffffffffffff808211156101cb578485fd5b6101d78b838c01610153565b909950975060208a01359150808211156101ef578485fd5b506101fc8a828b01610153565b90965094505060408801356001600160a01b038116811461021b578384fd5b9250606088013563ffffffff81168114610233578283fd5b91506102416080890161013e565b905092959891949750929550565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b600060c0825261028d60c083018a8c61024f565b82810360208401526102a081898b61024f565b6001600160a01b0397881660408501529590961660608301525063ffffffff929092166080830152151560a0909101529594505050505056fe6101c06040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b50604051620024a8380380620024a88339810160408190526200005a91620003de565b8580604051806040016040528060018152602001603160f81b815250888881600390805190602001906200009092919062000268565b508051620000a690600490602084019062000268565b5050825160208085019190912083518483012060c082815260e08290524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301889052606082018790526080820194909452308184015281518082039093018352909301909252815191909401209193509190608052610100525050506001600160601b0319606087811b82166101405286901b166101605250506001600160e01b031960e083901b166101805280151560f81b6101a0526200017c600085620001b4565b620001a87f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a685620001b4565b505050505050620004f2565b620001c08282620001c4565b5050565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff16620001c05760008281526005602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002243390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b82805462000276906200049f565b90600052602060002090601f0160209004810192826200029a5760008555620002e5565b82601f10620002b557805160ff1916838001178555620002e5565b82800160010185558215620002e5579182015b82811115620002e5578251825591602001919060010190620002c8565b50620002f3929150620002f7565b5090565b5b80821115620002f35760008155600101620002f8565b80516001600160a01b03811681146200032657600080fd5b919050565b600082601f8301126200033c578081fd5b81516001600160401b0380821115620003595762000359620004dc565b604051601f8301601f19908116603f01168101908282118183101715620003845762000384620004dc565b81604052838152602092508683858801011115620003a0578485fd5b8491505b83821015620003c35785820183015181830184015290820190620003a4565b83821115620003d457848385830101525b9695505050505050565b60008060008060008060c08789031215620003f7578182fd5b86516001600160401b03808211156200040e578384fd5b6200041c8a838b016200032b565b9750602089015191508082111562000432578384fd5b506200044189828a016200032b565b95505062000452604088016200030e565b935062000462606088016200030e565b9250608087015163ffffffff811681146200047b578283fd5b60a0880151909250801515811462000491578182fd5b809150509295509295509295565b600181811c90821680620004b457607f821691505b60208210811415620004d657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160a05160c05160e05161010051610120516101405160601c6101605160601c6101805160e01c6101a05160f81c611ee1620005c76000396000818161024a015261085b0152600081816103be01528181610834015261161a01526000818161035e01528181610a9d0152610ade0152600081816102a7015281816105cd015281816106120152818161079601528181610886015281816115bf015261164101526000610ba5015260006111c601526000611215015260006111f0015260006111720152600061119b0152611ee16000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80635ebaf1db11610104578063a217fddf116100a2578063d505accf11610071578063d505accf14610451578063d539139314610464578063d547741f1461048b578063dd62ed3e1461049e576101da565b8063a217fddf14610410578063a457c2d714610418578063a694fc3a1461042b578063a9059cbb1461043e576101da565b80637ecebe00116100de5780637ecebe00146103a65780638c7adc15146103b957806391d14854146103f557806395d89b4114610408576101da565b80635ebaf1db1461035957806370a082311461038057806379cc679014610393576101da565b8063299498721161017c57806336568abe1161014b57806336568abe1461030d578063395093511461032057806340c10f191461033357806342966c6814610346576101da565b806329949872146102a25780632f2ff15d146102e1578063313ce567146102f65780633644e51514610305576101da565b806318160ddd116101b857806318160ddd1461022f578063202a61a11461024557806323b872dd1461026c578063248a9ca31461027f576101da565b806301ffc9a7146101df57806306fdde0314610207578063095ea7b31461021c575b600080fd5b6101f26101ed366004611ce7565b6104d7565b60405190151581526020015b60405180910390f35b61020f610510565b6040516101fe9190611d9c565b6101f261022a366004611c84565b6105a3565b6102376105b9565b6040519081526020016101fe565b6101f27f000000000000000000000000000000000000000000000000000000000000000081565b6101f261027a366004611bd8565b6105c9565b61023761028d366004611cad565b60009081526005602052604090206001015490565b6102c97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101fe565b6102f46102ef366004611cc5565b610661565b005b604051601281526020016101fe565b61023761068d565b6102f461031b366004611cc5565b610697565b6101f261032e366004611c84565b61071a565b6102f4610341366004611c84565b610756565b6102f4610354366004611cad565b61078b565b6102c97f000000000000000000000000000000000000000000000000000000000000000081565b61023761038e366004611b8c565b610810565b6102f46103a1366004611c84565b610925565b6102376103b4366004611b8c565b6109a6565b6103e07f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016101fe565b6101f2610403366004611cc5565b6109c4565b61020f6109ef565b610237600081565b6101f2610426366004611c84565b6109fe565b6102f4610439366004611cad565b610a97565b6101f261044c366004611c84565b610b45565b6102f461045f366004611c13565b610b51565b6102377f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102f4610499366004611cc5565b610cb5565b6102376104ac366004611ba6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061050857506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60606003805461051f90611e60565b80601f016020809104026020016040519081016040528092919081815260200182805461054b90611e60565b80156105985780601f1061056d57610100808354040283529160200191610598565b820191906000526020600020905b81548152906001019060200180831161057b57829003601f168201915b505050505090505b90565b60006105b0338484610cdb565b50600192915050565b60006105c460025490565b905090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161480156106345750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b1561064c57610644848484610dff565b50600161065a565b610657848484610fda565b90505b9392505050565b60008281526005602052604090206001015461067e81335b611084565b61068883836110e8565b505050565b60006105c461116e565b6001600160a01b038116331461070c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6107168282611265565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105b0918590610751908690611dcf565b610cdb565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66107818133610679565b61068883836112cc565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108035760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610703565b61080d33826113b8565b50565b60405163f68a327f60e01b81526001600160a01b03828116600483015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248301527f0000000000000000000000000000000000000000000000000000000000000000151560448301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063f68a327f9060640160206040518083038186803b1580156108ca57600080fd5b505afa1580156108de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109029190611d0f565b6001600160a01b0383166000908152602081905260409020546105089190611dcf565b600061093183336104ac565b90508181101561098f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610703565b61099c8333848403610cdb565b61068883836113b8565b6001600160a01b038116600090815260066020526040812054610508565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606004805461051f90611e60565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610a805760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610703565b610a8d3385858403610cdb565b5060019392505050565b610ac2337f000000000000000000000000000000000000000000000000000000000000000083610dff565b6040516373479edf60e11b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e68f3dbe90604401600060405180830381600087803b158015610b2a57600080fd5b505af1158015610b3e573d6000803e3d6000fd5b5050505050565b600061065a8383611512565b83421115610ba15760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610703565b60007f0000000000000000000000000000000000000000000000000000000000000000888888610bd08c61151f565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610c2b82611547565b90506000610c3b82878787611595565b9050896001600160a01b0316816001600160a01b031614610c9e5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610703565b610ca98a8a8a610cdb565b50505050505050505050565b600082815260056020526040902060010154610cd18133610679565b6106888383611265565b6001600160a01b038316610d3d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610703565b6001600160a01b038216610d9e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610703565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e635760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610703565b6001600160a01b038216610ec55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610703565b610ed08383836115bd565b6001600160a01b03831660009081526020819052604090205481811015610f485760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610703565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610f7f908490611dcf565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fcb91815260200190565b60405180910390a35b50505050565b6000610fe7848484610dff565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561106c5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610703565b6110798533858403610cdb565b506001949350505050565b61108e82826109c4565b610716576110a6816001600160a01b031660146116a3565b6110b18360206116a3565b6040516020016110c2929190611d27565b60408051601f198184030181529082905262461bcd60e51b825261070391600401611d9c565b6110f282826109c4565b6107165760008281526005602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561112a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60007f00000000000000000000000000000000000000000000000000000000000000004614156111bf57507f00000000000000000000000000000000000000000000000000000000000000006105a0565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c090920190925280519101206105a0565b61126f82826109c4565b156107165760008281526005602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166113225760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610703565b61132e600083836115bd565b80600260008282546113409190611dcf565b90915550506001600160a01b0382166000908152602081905260408120805483929061136d908490611dcf565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610716565b6001600160a01b0382166114185760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610703565b611424826000836115bd565b6001600160a01b038216600090815260208190526040902054818110156114985760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610703565b6001600160a01b03831660009081526020819052604081208383039055600280548492906114c7908490611e06565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610688565b60006105b0338484610dff565b6001600160a01b03811660009081526006602052604090208054600181018255905b50919050565b600061050861155461116e565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006115a687878787611885565b915091506115b381611972565b5095945050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161461169e576040516344bd03c360e11b81526001600160a01b03848116600483015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248301527f0000000000000000000000000000000000000000000000000000000000000000169063897a078690604401600060405180830381600087803b15801561168557600080fd5b505af1158015611699573d6000803e3d6000fd5b505050505b610688565b606060006116b2836002611de7565b6116bd906002611dcf565b67ffffffffffffffff8111156116e357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561170d576020820181803683370190505b509050600360fc1b8160008151811061173657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061177357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611797846002611de7565b6117a2906001611dcf565b90505b6001811115611836576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106117e457634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061180857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361182f81611e49565b90506117a5565b50831561065a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610703565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156118bc5750600090506003611969565b8460ff16601b141580156118d457508460ff16601c14155b156118e55750600090506004611969565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611939573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661196257600060019250925050611969565b9150600090505b94509492505050565b600081600481111561199457634e487b7160e01b600052602160045260246000fd5b141561199f5761080d565b60018160048111156119c157634e487b7160e01b600052602160045260246000fd5b1415611a0f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610703565b6002816004811115611a3157634e487b7160e01b600052602160045260246000fd5b1415611a7f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610703565b6003816004811115611aa157634e487b7160e01b600052602160045260246000fd5b1415611afa5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610703565b6004816004811115611b1c57634e487b7160e01b600052602160045260246000fd5b141561080d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610703565b80356001600160a01b038116811461050b57600080fd5b600060208284031215611b9d578081fd5b61065a82611b75565b60008060408385031215611bb8578081fd5b611bc183611b75565b9150611bcf60208401611b75565b90509250929050565b600080600060608486031215611bec578081fd5b611bf584611b75565b9250611c0360208501611b75565b9150604084013590509250925092565b600080600080600080600060e0888a031215611c2d578283fd5b611c3688611b75565b9650611c4460208901611b75565b95506040880135945060608801359350608088013560ff81168114611c67578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611c96578182fd5b611c9f83611b75565b946020939093013593505050565b600060208284031215611cbe578081fd5b5035919050565b60008060408385031215611cd7578182fd5b82359150611bcf60208401611b75565b600060208284031215611cf8578081fd5b81356001600160e01b03198116811461065a578182fd5b600060208284031215611d20578081fd5b5051919050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351611d5f816017850160208801611e1d565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611d90816028840160208801611e1d565b01602801949350505050565b6000602082528251806020840152611dbb816040850160208701611e1d565b601f01601f19169190910160400192915050565b60008219821115611de257611de2611e95565b500190565b6000816000190483118215151615611e0157611e01611e95565b500290565b600082821015611e1857611e18611e95565b500390565b60005b83811015611e38578181015183820152602001611e20565b83811115610fd45750506000910152565b600081611e5857611e58611e95565b506000190190565b600181811c90821680611e7457607f821691505b6020821081141561154157634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fdfea2646970667358221220827ed691f8f3f0cb3d61a76172241c75ea94d8b189cf079d9cc596830f26bc9c64736f6c63430008030033a2646970667358221220c39d83bc7b4f49c3057595a6560d5252babde9c06b8f321859918ffc088818c464736f6c63430008030033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063299498721461003b578063e6d304671461007e575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b61006261008c36600461019a565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100c357600080fd5b878787877f00000000000000000000000000000000000000000000000000000000000000008888886040516100f790610131565b610108989796959493929190610279565b604051809103906000f080158015610124573d6000803e3d6000fd5b5098975050505050505050565b6124a8806102da83390190565b8035801515811461014e57600080fd5b919050565b60008083601f840112610164578182fd5b50813567ffffffffffffffff81111561017b578182fd5b60208301915083602082850101111561019357600080fd5b9250929050565b600080600080600080600060a0888a0312156101b4578283fd5b873567ffffffffffffffff808211156101cb578485fd5b6101d78b838c01610153565b909950975060208a01359150808211156101ef578485fd5b506101fc8a828b01610153565b90965094505060408801356001600160a01b038116811461021b578384fd5b9250606088013563ffffffff81168114610233578283fd5b91506102416080890161013e565b905092959891949750929550565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b600060c0825261028d60c083018a8c61024f565b82810360208401526102a081898b61024f565b6001600160a01b0397881660408501529590961660608301525063ffffffff929092166080830152151560a0909101529594505050505056fe6101c06040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b50604051620024a8380380620024a88339810160408190526200005a91620003de565b8580604051806040016040528060018152602001603160f81b815250888881600390805190602001906200009092919062000268565b508051620000a690600490602084019062000268565b5050825160208085019190912083518483012060c082815260e08290524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301889052606082018790526080820194909452308184015281518082039093018352909301909252815191909401209193509190608052610100525050506001600160601b0319606087811b82166101405286901b166101605250506001600160e01b031960e083901b166101805280151560f81b6101a0526200017c600085620001b4565b620001a87f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a685620001b4565b505050505050620004f2565b620001c08282620001c4565b5050565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff16620001c05760008281526005602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002243390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b82805462000276906200049f565b90600052602060002090601f0160209004810192826200029a5760008555620002e5565b82601f10620002b557805160ff1916838001178555620002e5565b82800160010185558215620002e5579182015b82811115620002e5578251825591602001919060010190620002c8565b50620002f3929150620002f7565b5090565b5b80821115620002f35760008155600101620002f8565b80516001600160a01b03811681146200032657600080fd5b919050565b600082601f8301126200033c578081fd5b81516001600160401b0380821115620003595762000359620004dc565b604051601f8301601f19908116603f01168101908282118183101715620003845762000384620004dc565b81604052838152602092508683858801011115620003a0578485fd5b8491505b83821015620003c35785820183015181830184015290820190620003a4565b83821115620003d457848385830101525b9695505050505050565b60008060008060008060c08789031215620003f7578182fd5b86516001600160401b03808211156200040e578384fd5b6200041c8a838b016200032b565b9750602089015191508082111562000432578384fd5b506200044189828a016200032b565b95505062000452604088016200030e565b935062000462606088016200030e565b9250608087015163ffffffff811681146200047b578283fd5b60a0880151909250801515811462000491578182fd5b809150509295509295509295565b600181811c90821680620004b457607f821691505b60208210811415620004d657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160a05160c05160e05161010051610120516101405160601c6101605160601c6101805160e01c6101a05160f81c611ee1620005c76000396000818161024a015261085b0152600081816103be01528181610834015261161a01526000818161035e01528181610a9d0152610ade0152600081816102a7015281816105cd015281816106120152818161079601528181610886015281816115bf015261164101526000610ba5015260006111c601526000611215015260006111f0015260006111720152600061119b0152611ee16000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80635ebaf1db11610104578063a217fddf116100a2578063d505accf11610071578063d505accf14610451578063d539139314610464578063d547741f1461048b578063dd62ed3e1461049e576101da565b8063a217fddf14610410578063a457c2d714610418578063a694fc3a1461042b578063a9059cbb1461043e576101da565b80637ecebe00116100de5780637ecebe00146103a65780638c7adc15146103b957806391d14854146103f557806395d89b4114610408576101da565b80635ebaf1db1461035957806370a082311461038057806379cc679014610393576101da565b8063299498721161017c57806336568abe1161014b57806336568abe1461030d578063395093511461032057806340c10f191461033357806342966c6814610346576101da565b806329949872146102a25780632f2ff15d146102e1578063313ce567146102f65780633644e51514610305576101da565b806318160ddd116101b857806318160ddd1461022f578063202a61a11461024557806323b872dd1461026c578063248a9ca31461027f576101da565b806301ffc9a7146101df57806306fdde0314610207578063095ea7b31461021c575b600080fd5b6101f26101ed366004611ce7565b6104d7565b60405190151581526020015b60405180910390f35b61020f610510565b6040516101fe9190611d9c565b6101f261022a366004611c84565b6105a3565b6102376105b9565b6040519081526020016101fe565b6101f27f000000000000000000000000000000000000000000000000000000000000000081565b6101f261027a366004611bd8565b6105c9565b61023761028d366004611cad565b60009081526005602052604090206001015490565b6102c97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101fe565b6102f46102ef366004611cc5565b610661565b005b604051601281526020016101fe565b61023761068d565b6102f461031b366004611cc5565b610697565b6101f261032e366004611c84565b61071a565b6102f4610341366004611c84565b610756565b6102f4610354366004611cad565b61078b565b6102c97f000000000000000000000000000000000000000000000000000000000000000081565b61023761038e366004611b8c565b610810565b6102f46103a1366004611c84565b610925565b6102376103b4366004611b8c565b6109a6565b6103e07f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016101fe565b6101f2610403366004611cc5565b6109c4565b61020f6109ef565b610237600081565b6101f2610426366004611c84565b6109fe565b6102f4610439366004611cad565b610a97565b6101f261044c366004611c84565b610b45565b6102f461045f366004611c13565b610b51565b6102377f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102f4610499366004611cc5565b610cb5565b6102376104ac366004611ba6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061050857506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60606003805461051f90611e60565b80601f016020809104026020016040519081016040528092919081815260200182805461054b90611e60565b80156105985780601f1061056d57610100808354040283529160200191610598565b820191906000526020600020905b81548152906001019060200180831161057b57829003601f168201915b505050505090505b90565b60006105b0338484610cdb565b50600192915050565b60006105c460025490565b905090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161480156106345750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b1561064c57610644848484610dff565b50600161065a565b610657848484610fda565b90505b9392505050565b60008281526005602052604090206001015461067e81335b611084565b61068883836110e8565b505050565b60006105c461116e565b6001600160a01b038116331461070c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6107168282611265565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105b0918590610751908690611dcf565b610cdb565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66107818133610679565b61068883836112cc565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108035760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204c6f6e6753686f727420636f6e74726163740000000000000000006044820152606401610703565b61080d33826113b8565b50565b60405163f68a327f60e01b81526001600160a01b03828116600483015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248301527f0000000000000000000000000000000000000000000000000000000000000000151560448301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063f68a327f9060640160206040518083038186803b1580156108ca57600080fd5b505afa1580156108de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109029190611d0f565b6001600160a01b0383166000908152602081905260409020546105089190611dcf565b600061093183336104ac565b90508181101561098f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610703565b61099c8333848403610cdb565b61068883836113b8565b6001600160a01b038116600090815260066020526040812054610508565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606004805461051f90611e60565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610a805760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610703565b610a8d3385858403610cdb565b5060019392505050565b610ac2337f000000000000000000000000000000000000000000000000000000000000000083610dff565b6040516373479edf60e11b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e68f3dbe90604401600060405180830381600087803b158015610b2a57600080fd5b505af1158015610b3e573d6000803e3d6000fd5b5050505050565b600061065a8383611512565b83421115610ba15760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610703565b60007f0000000000000000000000000000000000000000000000000000000000000000888888610bd08c61151f565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610c2b82611547565b90506000610c3b82878787611595565b9050896001600160a01b0316816001600160a01b031614610c9e5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610703565b610ca98a8a8a610cdb565b50505050505050505050565b600082815260056020526040902060010154610cd18133610679565b6106888383611265565b6001600160a01b038316610d3d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610703565b6001600160a01b038216610d9e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610703565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e635760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610703565b6001600160a01b038216610ec55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610703565b610ed08383836115bd565b6001600160a01b03831660009081526020819052604090205481811015610f485760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610703565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610f7f908490611dcf565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fcb91815260200190565b60405180910390a35b50505050565b6000610fe7848484610dff565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561106c5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610703565b6110798533858403610cdb565b506001949350505050565b61108e82826109c4565b610716576110a6816001600160a01b031660146116a3565b6110b18360206116a3565b6040516020016110c2929190611d27565b60408051601f198184030181529082905262461bcd60e51b825261070391600401611d9c565b6110f282826109c4565b6107165760008281526005602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561112a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60007f00000000000000000000000000000000000000000000000000000000000000004614156111bf57507f00000000000000000000000000000000000000000000000000000000000000006105a0565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c090920190925280519101206105a0565b61126f82826109c4565b156107165760008281526005602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166113225760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610703565b61132e600083836115bd565b80600260008282546113409190611dcf565b90915550506001600160a01b0382166000908152602081905260408120805483929061136d908490611dcf565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610716565b6001600160a01b0382166114185760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610703565b611424826000836115bd565b6001600160a01b038216600090815260208190526040902054818110156114985760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610703565b6001600160a01b03831660009081526020819052604081208383039055600280548492906114c7908490611e06565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610688565b60006105b0338484610dff565b6001600160a01b03811660009081526006602052604090208054600181018255905b50919050565b600061050861155461116e565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006115a687878787611885565b915091506115b381611972565b5095945050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161461169e576040516344bd03c360e11b81526001600160a01b03848116600483015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248301527f0000000000000000000000000000000000000000000000000000000000000000169063897a078690604401600060405180830381600087803b15801561168557600080fd5b505af1158015611699573d6000803e3d6000fd5b505050505b610688565b606060006116b2836002611de7565b6116bd906002611dcf565b67ffffffffffffffff8111156116e357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561170d576020820181803683370190505b509050600360fc1b8160008151811061173657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061177357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611797846002611de7565b6117a2906001611dcf565b90505b6001811115611836576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106117e457634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061180857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361182f81611e49565b90506117a5565b50831561065a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610703565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156118bc5750600090506003611969565b8460ff16601b141580156118d457508460ff16601c14155b156118e55750600090506004611969565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611939573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661196257600060019250925050611969565b9150600090505b94509492505050565b600081600481111561199457634e487b7160e01b600052602160045260246000fd5b141561199f5761080d565b60018160048111156119c157634e487b7160e01b600052602160045260246000fd5b1415611a0f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610703565b6002816004811115611a3157634e487b7160e01b600052602160045260246000fd5b1415611a7f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610703565b6003816004811115611aa157634e487b7160e01b600052602160045260246000fd5b1415611afa5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610703565b6004816004811115611b1c57634e487b7160e01b600052602160045260246000fd5b141561080d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610703565b80356001600160a01b038116811461050b57600080fd5b600060208284031215611b9d578081fd5b61065a82611b75565b60008060408385031215611bb8578081fd5b611bc183611b75565b9150611bcf60208401611b75565b90509250929050565b600080600060608486031215611bec578081fd5b611bf584611b75565b9250611c0360208501611b75565b9150604084013590509250925092565b600080600080600080600060e0888a031215611c2d578283fd5b611c3688611b75565b9650611c4460208901611b75565b95506040880135945060608801359350608088013560ff81168114611c67578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611c96578182fd5b611c9f83611b75565b946020939093013593505050565b600060208284031215611cbe578081fd5b5035919050565b60008060408385031215611cd7578182fd5b82359150611bcf60208401611b75565b600060208284031215611cf8578081fd5b81356001600160e01b03198116811461065a578182fd5b600060208284031215611d20578081fd5b5051919050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351611d5f816017850160208801611e1d565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611d90816028840160208801611e1d565b01602801949350505050565b6000602082528251806020840152611dbb816040850160208701611e1d565b601f01601f19169190910160400192915050565b60008219821115611de257611de2611e95565b500190565b6000816000190483118215151615611e0157611e01611e95565b500290565b600082821015611e1857611e18611e95565b500390565b60005b83811015611e38578181015183820152602001611e20565b83811115610fd45750506000910152565b600081611e5857611e58611e95565b506000190190565b600181811c90821680611e7457607f821691505b6020821081141561154157634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fdfea2646970667358221220827ed691f8f3f0cb3d61a76172241c75ea94d8b189cf079d9cc596830f26bc9c64736f6c63430008030033a2646970667358221220c39d83bc7b4f49c3057595a6560d5252babde9c06b8f321859918ffc088818c464736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": { + "constructor": { + "params": { + "_longShort": "address of the longShort contract" + } + }, + "createSyntheticToken(string,string,address,uint32,bool)": { + "params": { + "isLong": "boolean denoting if the synthetic token is long or short", + "marketIndex": "market index this synthetic token belongs to", + "staker": "address of the staker contract", + "syntheticName": "name of the synthetic token", + "syntheticSymbol": "ticker symbol of the synthetic token" + }, + "returns": { + "syntheticToken": "- address of the created synthetic token" + } + } + }, + "title": "TokenFactory", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "constructor": { + "notice": "sets the address of the longShort contract on initialization" + }, + "createSyntheticToken(string,string,address,uint32,bool)": { + "notice": "creates and sets up a new synthetic token" + }, + "longShort()": { + "notice": "address of long short contract" + } + }, + "notice": "contract is used to reliably mint the synthetic tokens used by the float protocol.", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/TreasuryAlpha.json b/deployments/polygon/TreasuryAlpha.json new file mode 100644 index 0000000..12610ac --- /dev/null +++ b/deployments/polygon/TreasuryAlpha.json @@ -0,0 +1,638 @@ +{ + "address": "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newBasePrice", + "type": "uint256" + } + ], + "name": "BasePriceUpdated", + "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": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "activateRedemptions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "basePrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOfFloatToBurn", + "type": "uint256" + } + ], + "name": "burnFloatForShareOfTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "convertSynthsToPaymentTokenNextPriceLong", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "convertSynthsToPaymentTokenNextPriceShort", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "floatToken", + "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": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paymentToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redemptionsActivated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newBasePrice", + "type": "uint256" + } + ], + "name": "updateBasePrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "transactionIndex": 70, + "gasUsed": "417883", + "logsBloom": "0x00000004000000000000000000000000400000000020000000000000400000000000000000000000000000028000000000008000000000000000000400000000000004000000000000000000200002800000000020000000000100000000000000000000020000000100000000000800800000000000000880010000000000000000000000000000800000000000004000000000800000000000000000000000200000000000000000000000000400000000000000000020001000000000004000000020000008000011000000000000000000000000000100100000000020000080000000000200000000000000000000000000000000000000000000100000", + "blockHash": "0x4cb193cf25dfc8913db1cff628d97ce5583ac2da8fdf8e275b84b8a0ffa6bd2b", + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "logs": [ + { + "transactionIndex": 70, + "blockNumber": 19059221, + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "address": "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000d0667fdb16f184708fa54bbccbff346ef037e67c" + ], + "data": "0x", + "logIndex": 281, + "blockHash": "0x4cb193cf25dfc8913db1cff628d97ce5583ac2da8fdf8e275b84b8a0ffa6bd2b" + }, + { + "transactionIndex": 70, + "blockNumber": 19059221, + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "address": "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 282, + "blockHash": "0x4cb193cf25dfc8913db1cff628d97ce5583ac2da8fdf8e275b84b8a0ffa6bd2b" + }, + { + "transactionIndex": 70, + "blockNumber": 19059221, + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "address": "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 283, + "blockHash": "0x4cb193cf25dfc8913db1cff628d97ce5583ac2da8fdf8e275b84b8a0ffa6bd2b" + }, + { + "transactionIndex": 70, + "blockNumber": 19059221, + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "address": "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 284, + "blockHash": "0x4cb193cf25dfc8913db1cff628d97ce5583ac2da8fdf8e275b84b8a0ffa6bd2b" + }, + { + "transactionIndex": 70, + "blockNumber": 19059221, + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x000000000000000000000000000000000000000000000000000ed89fadba0c000000000000000000000000000000000000000000000000000cbe755d62be7342000000000000000000000000000000000000000000006e203af761940dcb03410000000000000000000000000000000000000000000000000caf9cbdb5046742000000000000000000000000000000000000000000006e203b063a33bb850f41", + "logIndex": 285, + "blockHash": "0x4cb193cf25dfc8913db1cff628d97ce5583ac2da8fdf8e275b84b8a0ffa6bd2b" + } + ], + "blockNumber": 19059221, + "cumulativeGasUsed": "9720035", + "status": 1, + "byzantium": true + }, + "args": [ + "0xd0667FdB16f184708Fa54BbCcBff346ef037E67C", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0xf8c8765e000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee00000000000000000000000008f3cf7ad23cd3cadbd9735aff958023239c6a06300000000000000000000000001309a1ec476871760d9ea454628500bccc1e011000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "0xcfcCB5e6b3882b7795eb1B1A9f18831A842d4eE0", + "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063", + "0x01309A1Ec476871760D9Ea454628500BCcc1E011", + "0x168a5d1217AEcd258b03018d5bF1A1677A07b733" + ] + }, + "implementation": "0xd0667FdB16f184708Fa54BbCcBff346ef037E67C", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/TreasuryAlpha_Implementation.json b/deployments/polygon/TreasuryAlpha_Implementation.json new file mode 100644 index 0000000..ae9a903 --- /dev/null +++ b/deployments/polygon/TreasuryAlpha_Implementation.json @@ -0,0 +1,738 @@ +{ + "address": "0xd0667FdB16f184708Fa54BbCcBff346ef037E67C", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newBasePrice", + "type": "uint256" + } + ], + "name": "BasePriceUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "activateRedemptions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "basePrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOfFloatToBurn", + "type": "uint256" + } + ], + "name": "burnFloatForShareOfTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "convertSynthsToPaymentTokenNextPriceLong", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "marketIndex", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "tokens_redeem", + "type": "uint256" + } + ], + "name": "convertSynthsToPaymentTokenNextPriceShort", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "floatToken", + "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": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_floatToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_longShort", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paymentToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redemptionsActivated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newBasePrice", + "type": "uint256" + } + ], + "name": "updateBasePrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x874c3b79300c5e4b31490ac2c8011921c9652de71425e38d696550c0d45658cb", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xd0667FdB16f184708Fa54BbCcBff346ef037E67C", + "transactionIndex": 23, + "gasUsed": "1502889", + "logsBloom": "0x00000000000000000000000000000000000000000020000000000000400000000000000000000000000000000000000000008000000000000000000000000000000004000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000800000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000008000001000000000000000000000000000000100000000000000000000000000200000000000000000000000000000000000000000000100000", + "blockHash": "0x9db0b9e6fa8682abf04e00a726b5db63efb3a2c5384e6c2b6bfc94176ca428e1", + "transactionHash": "0x874c3b79300c5e4b31490ac2c8011921c9652de71425e38d696550c0d45658cb", + "logs": [ + { + "transactionIndex": 23, + "blockNumber": 19059215, + "transactionHash": "0x874c3b79300c5e4b31490ac2c8011921c9652de71425e38d696550c0d45658cb", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x000000000000000000000000000000000000000000000000003564b221d184000000000000000000000000000000000000000000000000000cf3da0f848ff742000000000000000000000000000000000000000000006e200c03a5ab144d90c10000000000000000000000000000000000000000000000000cbe755d62be7342000000000000000000000000000000000000000000006e200c390a5d361f14c1", + "logIndex": 277, + "blockHash": "0x9db0b9e6fa8682abf04e00a726b5db63efb3a2c5384e6c2b6bfc94176ca428e1" + } + ], + "blockNumber": 19059215, + "cumulativeGasUsed": "11091080", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBasePrice\",\"type\":\"uint256\"}],\"name\":\"BasePriceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"activateRedemptions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"basePrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOfFloatToBurn\",\"type\":\"uint256\"}],\"name\":\"burnFloatForShareOfTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"tokens_redeem\",\"type\":\"uint256\"}],\"name\":\"convertSynthsToPaymentTokenNextPriceLong\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"marketIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"tokens_redeem\",\"type\":\"uint256\"}],\"name\":\"convertSynthsToPaymentTokenNextPriceShort\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatToken\",\"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\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_paymentToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_floatToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paymentToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redemptionsActivated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newBasePrice\",\"type\":\"uint256\"}],\"name\":\"updateBasePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"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.\"},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"Treasury Contract \",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/TreasuryAlpha.sol\":\"TreasuryAlpha\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x02348b2e4b9f3200c7e3907c5c2661643a6d8520e9f79939fbb9b4005a54894d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 / b + (a % b == 0 ? 0 : 1);\\n }\\n}\\n\",\"keccak256\":\"0x49ebdac5d515aebb95168564158940b79d7d5d12fbfe59cec546a00d57fee64a\",\"license\":\"MIT\"},\"contracts/TreasuryAlpha.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\nimport \\\"./interfaces/IFloatToken.sol\\\";\\nimport \\\"./interfaces/ILongShort.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/** This contract implementation is purely for the alpha, allowing the burning of FLT tokens\\n for a proportional share of the value held in the treasury. In contrast, the beta launch will be\\n rely on a more robust governance mechanism to vote on the buying and buring of FLT tokens using\\n treasury funds.*/\\n\\n/** @title Treasury Contract */\\ncontract TreasuryAlpha is AccessControlledAndUpgradeable {\\n //Using Open Zeppelin safe transfer library for token transfers\\n using SafeERC20 for IERC20;\\n\\n address public paymentToken;\\n address public floatToken;\\n address public longShort;\\n // An aproximation of what the FLT price should be according to the yield at the time.\\n uint256 public basePrice;\\n bool public redemptionsActivated;\\n\\n event BasePriceUpdated(uint256 newBasePrice);\\n\\n function initialize(\\n address _admin,\\n address _paymentToken,\\n address _floatToken,\\n address _longShort\\n ) external initializer {\\n _AccessControlledAndUpgradeable_init(_admin);\\n paymentToken = _paymentToken;\\n floatToken = _floatToken;\\n longShort = _longShort;\\n }\\n\\n function onlyAdminModifierLogic() internal virtual {\\n _checkRole(ADMIN_ROLE, msg.sender);\\n }\\n\\n modifier onlyAdmin() {\\n onlyAdminModifierLogic();\\n _;\\n }\\n\\n modifier redemptionsActive() {\\n require(redemptionsActivated, \\\"redemptions haven't been activated\\\");\\n _;\\n }\\n\\n function _getValueLockedInTreasury() internal view returns (uint256) {\\n return IERC20(paymentToken).balanceOf(address(this));\\n }\\n\\n function _getFloatTokenSupply() internal view returns (uint256) {\\n return IFloatToken(floatToken).totalSupply();\\n }\\n\\n function updateBasePrice(uint256 newBasePrice) public onlyAdmin {\\n // What should the minimum for this value be? 0.2 DAI per token seems reasonable if we are targetting 0.5 DAI as the normal price (and say Aave yield is poor or similar)\\n require(newBasePrice > 2e17, \\\"base price too low\\\");\\n\\n basePrice = newBasePrice;\\n emit BasePriceUpdated(newBasePrice);\\n }\\n\\n function activateRedemptions() public onlyAdmin {\\n redemptionsActivated = true;\\n }\\n\\n function burnFloatForShareOfTreasury(uint256 amountOfFloatToBurn) external redemptionsActive {\\n uint256 priceAccordingToTreasuryAndSupply = (_getValueLockedInTreasury() * 1e18) /\\n _getFloatTokenSupply();\\n // In normal operation the `priceAccordingToTreasuryAndSupply` value will be an over-estimation favouring people who withdraw early. Thus typically the 'basePrice' will be a bit lower to prevent this in typical cases.\\n // We take the min of these two values so it is impossible for us to run with the money.\\n uint256 priceToUse = Math.min(priceAccordingToTreasuryAndSupply, basePrice);\\n\\n uint256 amountToRecieve = (priceToUse * amountOfFloatToBurn) / 1e18;\\n\\n IFloatToken(floatToken).burnFrom(msg.sender, amountOfFloatToBurn); // Can modify the core FLT token if wanted to remove the need for this step. // Currently requires user to approve treasury contract.\\n IERC20(paymentToken).safeTransfer(msg.sender, amountToRecieve);\\n }\\n\\n function convertSynthsToPaymentTokenNextPriceLong(uint32 marketIndex, uint256 tokens_redeem)\\n external\\n {\\n ILongShort(longShort).redeemLongNextPrice(marketIndex, tokens_redeem);\\n }\\n\\n function convertSynthsToPaymentTokenNextPriceShort(uint32 marketIndex, uint256 tokens_redeem)\\n external\\n {\\n ILongShort(longShort).redeemShortNextPrice(marketIndex, tokens_redeem);\\n }\\n}\\n\",\"keccak256\":\"0xe99e7af16cf48c3e2b38c3ae035e65bd8e463ef5ffa6cd1651312669ab8c0a4c\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IFloatToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface IFloatToken {\\n function mint(address to, uint256 amount) external;\\n\\n function transfer(address, uint256) external returns (bool);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function burnFrom(address account, uint256 amount) external virtual;\\n}\\n\",\"keccak256\":\"0xdec0736a73d0855ee353797430e196f9be074ccd728209e28e881ffa24d76e5d\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILongShort.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\ninterface ILongShort {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 EVENTS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n event LongShortV1(address admin, address tokenFactory, address staker);\\n\\n event SystemStateUpdated(\\n uint32 marketIndex,\\n uint256 updateIndex,\\n int256 underlyingAssetPrice,\\n uint256 longValue,\\n uint256 shortValue,\\n uint256 longPrice,\\n uint256 shortPrice\\n );\\n\\n event SyntheticMarketCreated(\\n uint32 marketIndex,\\n address longTokenAddress,\\n address shortTokenAddress,\\n address paymentToken,\\n int256 initialAssetPrice,\\n string name,\\n string symbol,\\n address oracleAddress,\\n address yieldManagerAddress\\n );\\n\\n event NextPriceRedeem(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 synthRedeemed,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceSyntheticPositionShift(\\n uint32 marketIndex,\\n bool isShiftFromLong,\\n uint256 synthShifted,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event NextPriceDeposit(\\n uint32 marketIndex,\\n bool isLong,\\n uint256 depositAdded,\\n address user,\\n uint256 oracleUpdateIndex\\n );\\n\\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\\n\\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\\n\\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\\n\\n function syntheticTokens(uint32, bool) external view returns (address);\\n\\n function marketUpdateIndex(uint32) external view returns (uint256);\\n\\n function syntheticToken_priceSnapshot(\\n uint32,\\n bool,\\n uint256\\n ) external view returns (uint256);\\n\\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\\n external\\n view\\n returns (uint256 marketSideValueInPaymentToken);\\n\\n function updateSystemState(uint32 marketIndex) external;\\n\\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\\n\\n function getUsersConfirmedButNotSettledSynthBalance(\\n address user,\\n uint32 marketIndex,\\n bool isLong\\n ) external view returns (uint256 confirmedButNotSettledBalance);\\n\\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\\n\\n function shiftPositionNextPrice(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokensToShift,\\n bool isShiftFromLong\\n ) external;\\n\\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\\n external;\\n\\n function getAmountSyntheticTokenToMintOnTargetSide(\\n uint32 marketIndex,\\n uint256 amountSyntheticTokenShiftedFromOneSide,\\n bool isShiftFromLong,\\n uint256 priceSnapshotIndex\\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\\n\\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\\n\\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x28fe544185921f40f81e9bbfabb847f84a7325d85dfc749b9b2531bfcf7cf0dd\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611a3a806100206000396000f3fe6080604052600436106101355760003560e01c8063941e670f116100ab578063c7876ea41161006f578063c7876ea414610371578063d547741f14610387578063eae5a8d9146103a7578063f72c0d8b146103c7578063f8c8765e146103fb578063fd5baa881461041b57610135565b8063941e670f146102ee5780639c0057111461030e578063a217fddf1461032e578063b18c00bd14610343578063ba311ae61461035c57610135565b80633013ce29116100fd5780633013ce291461022757806336568abe146102475780633659cfe6146102675780634f1ef2861461028757806375b238fc1461029a57806391d14854146102ce57610135565b806301ffc9a71461013a5780630e11b60e1461016f578063248a9ca31461019157806329949872146101cf5780632f2ff15d14610207575b600080fd5b34801561014657600080fd5b5061015a610155366004611792565b61043b565b60405190151581526020015b60405180910390f35b34801561017b57600080fd5b5061018f61018a3660046117d2565b610474565b005b34801561019d57600080fd5b506101c16101ac36600461174f565b60009081526065602052604090206001015490565b604051908152602001610166565b3480156101db57600080fd5b5060fd546101ef906001600160a01b031681565b6040516001600160a01b039091168152602001610166565b34801561021357600080fd5b5061018f610222366004611767565b6104e3565b34801561023357600080fd5b5060fb546101ef906001600160a01b031681565b34801561025357600080fd5b5061018f610262366004611767565b61050f565b34801561027357600080fd5b5061018f610282366004611605565b610592565b61018f610295366004611672565b6105b9565b3480156102a657600080fd5b506101c17fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102da57600080fd5b5061015a6102e9366004611767565b6105ce565b3480156102fa57600080fd5b5061018f61030936600461174f565b6105f9565b34801561031a57600080fd5b5061018f6103293660046117d2565b610737565b34801561033a57600080fd5b506101c1600081565b34801561034f57600080fd5b5060ff805461015a911681565b34801561036857600080fd5b5061018f610774565b34801561037d57600080fd5b506101c160fe5481565b34801561039357600080fd5b5061018f6103a2366004611767565b61078b565b3480156103b357600080fd5b5060fc546101ef906001600160a01b031681565b3480156103d357600080fd5b506101c17f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b34801561040757600080fd5b5061018f61041636600461161f565b6107b1565b34801561042757600080fd5b5061018f61043636600461174f565b610867565b60006001600160e01b03198216637965db0b60e01b148061046c57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60fd5460405163c2e1247160e01b815263ffffffff84166004820152602481018390526001600160a01b039091169063c2e12471906044015b600060405180830381600087803b1580156104c757600080fd5b505af11580156104db573d6000803e3d6000fd5b505050505050565b60008281526065602052604090206001015461050081335b6108f6565b61050a838361095a565b505050565b6001600160a01b03811633146105845760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61058e82826109e0565b5050565b61059b81610a47565b6105b681604051806020016040528060008152506000610a72565b50565b6105c282610a47565b61058e82826001610a72565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60ff8054166106555760405162461bcd60e51b815260206004820152602260248201527f726564656d7074696f6e7320686176656e2774206265656e2061637469766174604482015261195960f21b606482015260840161057b565b600061065f610bf3565b610667610c75565b61067990670de0b6b3a764000061194f565b610683919061192f565b905060006106938260fe54610cb9565b90506000670de0b6b3a76400006106aa858461194f565b6106b4919061192f565b60fc5460405163079cc67960e41b8152336004820152602481018790529192506001600160a01b0316906379cc679090604401600060405180830381600087803b15801561070157600080fd5b505af1158015610715573d6000803e3d6000fd5b505060fb5461073192506001600160a01b031690503383610cd1565b50505050565b60fd54604051630735b02760e51b815263ffffffff84166004820152602481018390526001600160a01b039091169063e6b604e0906044016104ad565b61077c610d23565b60ff805460ff19166001179055565b6000828152606560205260409020600101546107a781336104fb565b61050a83836109e0565b600054610100900460ff16806107ca575060005460ff16155b6107e65760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff16158015610808576000805461ffff19166101011790555b61081185610d4f565b60fb80546001600160a01b038087166001600160a01b03199283161790925560fc805486841690831617905560fd8054928516929091169190911790558015610860576000805461ff00191690555b5050505050565b61086f610d23565b6702c68af0bb14000081116108bb5760405162461bcd60e51b81526020600482015260126024820152716261736520707269636520746f6f206c6f7760701b604482015260640161057b565b60fe8190556040518181527ffab5bcbec79a8b5888e114fd4b378427aa58d9b237d85056f0ee5b3ea57df8c59060200160405180910390a150565b61090082826105ce565b61058e57610918816001600160a01b03166014610dd4565b610923836020610dd4565b604051602001610934929190611821565b60408051601f198184030181529082905262461bcd60e51b825261057b91600401611896565b61096482826105ce565b61058e5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561099c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6109ea82826105ce565b1561058e5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361058e81336104fb565b6000610aa57f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050610ab084610fb6565b600083511180610abd5750815b15610ace57610acc848461105b565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661086057805460ff191660011781556040516001600160a01b0383166024820152610b4d90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b17905261105b565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b03838116911614610bea5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b606482015260840161057b565b61086085611146565b60fc54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b158015610c3857600080fd5b505afa158015610c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7091906117ba565b905090565b60fb546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610c3857600080fd5b6000818310610cc85781610cca565b825b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261050a908490611186565b610d4d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336108f6565b565b600054610100900460ff1680610d68575060005460ff16155b610d845760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff16158015610da6576000805461ffff19166101011790555b610dae611258565b610db66112db565b610dbf82611339565b801561058e576000805461ff00191690555050565b60606000610de383600261194f565b610dee906002611917565b67ffffffffffffffff811115610e1457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610e3e576020820181803683370190505b509050600360fc1b81600081518110610e6757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610ea457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610ec884600261194f565b610ed3906001611917565b90505b6001811115610f67576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610f1557634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110610f3957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93610f608161199a565b9050610ed6565b508315610cca5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161057b565b803b61101a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161057b565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6110ba5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161057b565b600080846001600160a01b0316846040516110d59190611805565b600060405180830381855af49150503d8060008114611110576040519150601f19603f3d011682016040523d82523d6000602084013e611115565b606091505b509150915061113d82826040518060600160405280602781526020016119de60279139611402565b95945050505050565b61114f81610fb6565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006111db826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661143b9092919063ffffffff16565b80519091501561050a57808060200190518101906111f9919061172f565b61050a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161057b565b600054610100900460ff1680611271575060005460ff16155b61128d5760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff161580156112af576000805461ffff19166101011790555b6112b7611452565b6112bf611452565b6112c7611452565b80156105b6576000805461ff001916905550565b600054610100900460ff16806112f4575060005460ff16155b6113105760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff161580156112b7576000805461ffff19166101011790556112bf611452565b600054610100900460ff1680611352575060005460ff16155b61136e5760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff16158015611390576000805461ffff19166101011790555b6001600160a01b0382166113a357600080fd5b6113ae6000836114bc565b6113d87fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775836114bc565b610dbf7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3836114bc565b60608315611411575081610cca565b8251156114215782518084602001fd5b8160405162461bcd60e51b815260040161057b9190611896565b606061144a84846000856114c6565b949350505050565b600054610100900460ff168061146b575060005460ff16155b6114875760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff161580156112c7576000805461ffff191661010117905580156105b6576000805461ff001916905550565b61058e828261095a565b6060824710156115275760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161057b565b843b6115755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161057b565b600080866001600160a01b031685876040516115919190611805565b60006040518083038185875af1925050503d80600081146115ce576040519150601f19603f3d011682016040523d82523d6000602084013e6115d3565b606091505b50915091506115e3828286611402565b979650505050505050565b80356001600160a01b038116811461046f57600080fd5b600060208284031215611616578081fd5b610cca826115ee565b60008060008060808587031215611634578283fd5b61163d856115ee565b935061164b602086016115ee565b9250611659604086016115ee565b9150611667606086016115ee565b905092959194509250565b60008060408385031215611684578182fd5b61168d836115ee565b9150602083013567ffffffffffffffff808211156116a9578283fd5b818501915085601f8301126116bc578283fd5b8135818111156116ce576116ce6119c7565b604051601f8201601f19908116603f011681019083821181831017156116f6576116f66119c7565b8160405282815288602084870101111561170e578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600060208284031215611740578081fd5b81518015158114610cca578182fd5b600060208284031215611760578081fd5b5035919050565b60008060408385031215611779578182fd5b82359150611789602084016115ee565b90509250929050565b6000602082840312156117a3578081fd5b81356001600160e01b031981168114610cca578182fd5b6000602082840312156117cb578081fd5b5051919050565b600080604083850312156117e4578182fd5b823563ffffffff811681146117f7578283fd5b946020939093013593505050565b6000825161181781846020870161196e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008252835161185981601785016020880161196e565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161188a81602884016020880161196e565b01602801949350505050565b60006020825282518060208401526118b581604085016020870161196e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561192a5761192a6119b1565b500190565b60008261194a57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611969576119696119b1565b500290565b60005b83811015611989578181015183820152602001611971565b838111156107315750506000910152565b6000816119a9576119a96119b1565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200751baaf5eb84fb56af5e2e9a2566a20965cf18b7fd33cd61861883e83964ec164736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101355760003560e01c8063941e670f116100ab578063c7876ea41161006f578063c7876ea414610371578063d547741f14610387578063eae5a8d9146103a7578063f72c0d8b146103c7578063f8c8765e146103fb578063fd5baa881461041b57610135565b8063941e670f146102ee5780639c0057111461030e578063a217fddf1461032e578063b18c00bd14610343578063ba311ae61461035c57610135565b80633013ce29116100fd5780633013ce291461022757806336568abe146102475780633659cfe6146102675780634f1ef2861461028757806375b238fc1461029a57806391d14854146102ce57610135565b806301ffc9a71461013a5780630e11b60e1461016f578063248a9ca31461019157806329949872146101cf5780632f2ff15d14610207575b600080fd5b34801561014657600080fd5b5061015a610155366004611792565b61043b565b60405190151581526020015b60405180910390f35b34801561017b57600080fd5b5061018f61018a3660046117d2565b610474565b005b34801561019d57600080fd5b506101c16101ac36600461174f565b60009081526065602052604090206001015490565b604051908152602001610166565b3480156101db57600080fd5b5060fd546101ef906001600160a01b031681565b6040516001600160a01b039091168152602001610166565b34801561021357600080fd5b5061018f610222366004611767565b6104e3565b34801561023357600080fd5b5060fb546101ef906001600160a01b031681565b34801561025357600080fd5b5061018f610262366004611767565b61050f565b34801561027357600080fd5b5061018f610282366004611605565b610592565b61018f610295366004611672565b6105b9565b3480156102a657600080fd5b506101c17fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102da57600080fd5b5061015a6102e9366004611767565b6105ce565b3480156102fa57600080fd5b5061018f61030936600461174f565b6105f9565b34801561031a57600080fd5b5061018f6103293660046117d2565b610737565b34801561033a57600080fd5b506101c1600081565b34801561034f57600080fd5b5060ff805461015a911681565b34801561036857600080fd5b5061018f610774565b34801561037d57600080fd5b506101c160fe5481565b34801561039357600080fd5b5061018f6103a2366004611767565b61078b565b3480156103b357600080fd5b5060fc546101ef906001600160a01b031681565b3480156103d357600080fd5b506101c17f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b34801561040757600080fd5b5061018f61041636600461161f565b6107b1565b34801561042757600080fd5b5061018f61043636600461174f565b610867565b60006001600160e01b03198216637965db0b60e01b148061046c57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60fd5460405163c2e1247160e01b815263ffffffff84166004820152602481018390526001600160a01b039091169063c2e12471906044015b600060405180830381600087803b1580156104c757600080fd5b505af11580156104db573d6000803e3d6000fd5b505050505050565b60008281526065602052604090206001015461050081335b6108f6565b61050a838361095a565b505050565b6001600160a01b03811633146105845760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61058e82826109e0565b5050565b61059b81610a47565b6105b681604051806020016040528060008152506000610a72565b50565b6105c282610a47565b61058e82826001610a72565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60ff8054166106555760405162461bcd60e51b815260206004820152602260248201527f726564656d7074696f6e7320686176656e2774206265656e2061637469766174604482015261195960f21b606482015260840161057b565b600061065f610bf3565b610667610c75565b61067990670de0b6b3a764000061194f565b610683919061192f565b905060006106938260fe54610cb9565b90506000670de0b6b3a76400006106aa858461194f565b6106b4919061192f565b60fc5460405163079cc67960e41b8152336004820152602481018790529192506001600160a01b0316906379cc679090604401600060405180830381600087803b15801561070157600080fd5b505af1158015610715573d6000803e3d6000fd5b505060fb5461073192506001600160a01b031690503383610cd1565b50505050565b60fd54604051630735b02760e51b815263ffffffff84166004820152602481018390526001600160a01b039091169063e6b604e0906044016104ad565b61077c610d23565b60ff805460ff19166001179055565b6000828152606560205260409020600101546107a781336104fb565b61050a83836109e0565b600054610100900460ff16806107ca575060005460ff16155b6107e65760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff16158015610808576000805461ffff19166101011790555b61081185610d4f565b60fb80546001600160a01b038087166001600160a01b03199283161790925560fc805486841690831617905560fd8054928516929091169190911790558015610860576000805461ff00191690555b5050505050565b61086f610d23565b6702c68af0bb14000081116108bb5760405162461bcd60e51b81526020600482015260126024820152716261736520707269636520746f6f206c6f7760701b604482015260640161057b565b60fe8190556040518181527ffab5bcbec79a8b5888e114fd4b378427aa58d9b237d85056f0ee5b3ea57df8c59060200160405180910390a150565b61090082826105ce565b61058e57610918816001600160a01b03166014610dd4565b610923836020610dd4565b604051602001610934929190611821565b60408051601f198184030181529082905262461bcd60e51b825261057b91600401611896565b61096482826105ce565b61058e5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561099c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6109ea82826105ce565b1561058e5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361058e81336104fb565b6000610aa57f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050610ab084610fb6565b600083511180610abd5750815b15610ace57610acc848461105b565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661086057805460ff191660011781556040516001600160a01b0383166024820152610b4d90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b17905261105b565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b03838116911614610bea5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b606482015260840161057b565b61086085611146565b60fc54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b158015610c3857600080fd5b505afa158015610c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7091906117ba565b905090565b60fb546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610c3857600080fd5b6000818310610cc85781610cca565b825b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261050a908490611186565b610d4d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336108f6565b565b600054610100900460ff1680610d68575060005460ff16155b610d845760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff16158015610da6576000805461ffff19166101011790555b610dae611258565b610db66112db565b610dbf82611339565b801561058e576000805461ff00191690555050565b60606000610de383600261194f565b610dee906002611917565b67ffffffffffffffff811115610e1457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610e3e576020820181803683370190505b509050600360fc1b81600081518110610e6757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610ea457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610ec884600261194f565b610ed3906001611917565b90505b6001811115610f67576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610f1557634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110610f3957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93610f608161199a565b9050610ed6565b508315610cca5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161057b565b803b61101a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161057b565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6110ba5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161057b565b600080846001600160a01b0316846040516110d59190611805565b600060405180830381855af49150503d8060008114611110576040519150601f19603f3d011682016040523d82523d6000602084013e611115565b606091505b509150915061113d82826040518060600160405280602781526020016119de60279139611402565b95945050505050565b61114f81610fb6565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006111db826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661143b9092919063ffffffff16565b80519091501561050a57808060200190518101906111f9919061172f565b61050a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161057b565b600054610100900460ff1680611271575060005460ff16155b61128d5760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff161580156112af576000805461ffff19166101011790555b6112b7611452565b6112bf611452565b6112c7611452565b80156105b6576000805461ff001916905550565b600054610100900460ff16806112f4575060005460ff16155b6113105760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff161580156112b7576000805461ffff19166101011790556112bf611452565b600054610100900460ff1680611352575060005460ff16155b61136e5760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff16158015611390576000805461ffff19166101011790555b6001600160a01b0382166113a357600080fd5b6113ae6000836114bc565b6113d87fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775836114bc565b610dbf7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3836114bc565b60608315611411575081610cca565b8251156114215782518084602001fd5b8160405162461bcd60e51b815260040161057b9190611896565b606061144a84846000856114c6565b949350505050565b600054610100900460ff168061146b575060005460ff16155b6114875760405162461bcd60e51b815260040161057b906118c9565b600054610100900460ff161580156112c7576000805461ffff191661010117905580156105b6576000805461ff001916905550565b61058e828261095a565b6060824710156115275760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161057b565b843b6115755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161057b565b600080866001600160a01b031685876040516115919190611805565b60006040518083038185875af1925050503d80600081146115ce576040519150601f19603f3d011682016040523d82523d6000602084013e6115d3565b606091505b50915091506115e3828286611402565b979650505050505050565b80356001600160a01b038116811461046f57600080fd5b600060208284031215611616578081fd5b610cca826115ee565b60008060008060808587031215611634578283fd5b61163d856115ee565b935061164b602086016115ee565b9250611659604086016115ee565b9150611667606086016115ee565b905092959194509250565b60008060408385031215611684578182fd5b61168d836115ee565b9150602083013567ffffffffffffffff808211156116a9578283fd5b818501915085601f8301126116bc578283fd5b8135818111156116ce576116ce6119c7565b604051601f8201601f19908116603f011681019083821181831017156116f6576116f66119c7565b8160405282815288602084870101111561170e578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600060208284031215611740578081fd5b81518015158114610cca578182fd5b600060208284031215611760578081fd5b5035919050565b60008060408385031215611779578182fd5b82359150611789602084016115ee565b90509250929050565b6000602082840312156117a3578081fd5b81356001600160e01b031981168114610cca578182fd5b6000602082840312156117cb578081fd5b5051919050565b600080604083850312156117e4578182fd5b823563ffffffff811681146117f7578283fd5b946020939093013593505050565b6000825161181781846020870161196e565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008252835161185981601785016020880161196e565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161188a81602884016020880161196e565b01602801949350505050565b60006020825282518060208401526118b581604085016020870161196e565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561192a5761192a6119b1565b500190565b60008261194a57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611969576119696119b1565b500290565b60005b83811015611989578181015183820152602001611971565b838111156107315750506000910152565b6000816119a9576119a96119b1565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200751baaf5eb84fb56af5e2e9a2566a20965cf18b7fd33cd61861883e83964ec164736f6c63430008030033", + "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." + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "Treasury Contract ", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 16936, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "paymentToken", + "offset": 0, + "slot": "251", + "type": "t_address" + }, + { + "astId": 16938, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "floatToken", + "offset": 0, + "slot": "252", + "type": "t_address" + }, + { + "astId": 16940, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "longShort", + "offset": 0, + "slot": "253", + "type": "t_address" + }, + { + "astId": 16942, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "basePrice", + "offset": 0, + "slot": "254", + "type": "t_uint256" + }, + { + "astId": 16944, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "redemptionsActivated", + "offset": 0, + "slot": "255", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/TreasuryAlpha.sol:TreasuryAlpha", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/polygon/TreasuryAlpha_Proxy.json b/deployments/polygon/TreasuryAlpha_Proxy.json new file mode 100644 index 0000000..6571232 --- /dev/null +++ b/deployments/polygon/TreasuryAlpha_Proxy.json @@ -0,0 +1,192 @@ +{ + "address": "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "transactionIndex": 70, + "gasUsed": "417883", + "logsBloom": "0x00000004000000000000000000000000400000000020000000000000400000000000000000000000000000028000000000008000000000000000000400000000000004000000000000000000200002800000000020000000000100000000000000000000020000000100000000000800800000000000000880010000000000000000000000000000800000000000004000000000800000000000000000000000200000000000000000000000000400000000000000000020001000000000004000000020000008000011000000000000000000000000000100100000000020000080000000000200000000000000000000000000000000000000000000100000", + "blockHash": "0x4cb193cf25dfc8913db1cff628d97ce5583ac2da8fdf8e275b84b8a0ffa6bd2b", + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "logs": [ + { + "transactionIndex": 70, + "blockNumber": 19059221, + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "address": "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000d0667fdb16f184708fa54bbccbff346ef037e67c" + ], + "data": "0x", + "logIndex": 281, + "blockHash": "0x4cb193cf25dfc8913db1cff628d97ce5583ac2da8fdf8e275b84b8a0ffa6bd2b" + }, + { + "transactionIndex": 70, + "blockNumber": 19059221, + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "address": "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 282, + "blockHash": "0x4cb193cf25dfc8913db1cff628d97ce5583ac2da8fdf8e275b84b8a0ffa6bd2b" + }, + { + "transactionIndex": 70, + "blockNumber": 19059221, + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "address": "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 283, + "blockHash": "0x4cb193cf25dfc8913db1cff628d97ce5583ac2da8fdf8e275b84b8a0ffa6bd2b" + }, + { + "transactionIndex": 70, + "blockNumber": 19059221, + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "address": "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 284, + "blockHash": "0x4cb193cf25dfc8913db1cff628d97ce5583ac2da8fdf8e275b84b8a0ffa6bd2b" + }, + { + "transactionIndex": 70, + "blockNumber": 19059221, + "transactionHash": "0x4b28b58aa0ac6614bcb42f949f861a24192723bc49e0820eec8d8b40ba09b7ff", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" + ], + "data": "0x000000000000000000000000000000000000000000000000000ed89fadba0c000000000000000000000000000000000000000000000000000cbe755d62be7342000000000000000000000000000000000000000000006e203af761940dcb03410000000000000000000000000000000000000000000000000caf9cbdb5046742000000000000000000000000000000000000000000006e203b063a33bb850f41", + "logIndex": 285, + "blockHash": "0x4cb193cf25dfc8913db1cff628d97ce5583ac2da8fdf8e275b84b8a0ffa6bd2b" + } + ], + "blockNumber": 19059221, + "cumulativeGasUsed": "9720035", + "status": 1, + "byzantium": true + }, + "args": [ + "0xd0667FdB16f184708Fa54BbCcBff346ef037E67C", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0xf8c8765e000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee00000000000000000000000008f3cf7ad23cd3cadbd9735aff958023239c6a06300000000000000000000000001309a1ec476871760d9ea454628500bccc1e011000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/YieldManagerF3.json b/deployments/polygon/YieldManagerF3.json new file mode 100644 index 0000000..4cbc648 --- /dev/null +++ b/deployments/polygon/YieldManagerF3.json @@ -0,0 +1,780 @@ +{ + "address": "0xce5da4bebBA980BeC39da5b118750A47a23D4B85", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ClaimAaveRewardTokenToTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "WithdrawTreasuryFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unrealizedYield", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "YieldDistributed", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aaveIncentivesController", + "outputs": [ + { + "internalType": "contract IAaveIncentivesController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "amountReservedInCaseOfInsufficientAaveLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimAaveRewardsToTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositPaymentToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "totalValueRealizedForMarket", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "distributeYieldForTreasuryAndReturnMarketAllocation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_aToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_lendingPoolAddressesProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "_aaveIncentivesController", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_aaveReferralCode", + "type": "uint16" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeForMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lendingPoolAddressesProvider", + "outputs": [ + { + "internalType": "contract ILendingPoolAddressesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paymentToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "removePaymentTokenFromMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalReservedForTreasury", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferPaymentTokensToUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateLatestLendingPoolAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawTreasuryFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xce5da4bebBA980BeC39da5b118750A47a23D4B85", + "transactionIndex": 23, + "gasUsed": "525546", + "logsBloom": "0x00000004000000000000000000000000400000000000000000000000400000080000004000000000000000008000000000008000000000002000000000600000000000000000000000000800200002800000000020000000000300000000000000000000020022000100000000000800000000000000000880014000000000000000400000000000000004000000004000000000800010000000080000000000220000000000000000000000000000000000100000000000001000000000004080000120000008000001000000000000000000000000800100100000000020000090000000000200000000000000000000000000000000000000040000100000", + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4", + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "logs": [ + { + "transactionIndex": 23, + "blockNumber": 19059812, + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "address": "0xce5da4bebBA980BeC39da5b118750A47a23D4B85", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000009d638d66bc4eaa770bd091e9c2339fb39af70168" + ], + "data": "0x", + "logIndex": 125, + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4" + }, + { + "transactionIndex": 23, + "blockNumber": 19059812, + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "address": "0xce5da4bebBA980BeC39da5b118750A47a23D4B85", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 126, + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4" + }, + { + "transactionIndex": 23, + "blockNumber": 19059812, + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "address": "0xce5da4bebBA980BeC39da5b118750A47a23D4B85", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 127, + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4" + }, + { + "transactionIndex": 23, + "blockNumber": 19059812, + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "address": "0xce5da4bebBA980BeC39da5b118750A47a23D4B85", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 128, + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4" + }, + { + "transactionIndex": 23, + "blockNumber": 19059812, + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "address": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000ce5da4bebba980bec39da5b118750a47a23d4b85", + "0x0000000000000000000000008dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf" + ], + "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "logIndex": 129, + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4" + }, + { + "transactionIndex": 23, + "blockNumber": 19059812, + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000b79fad4ca981472442f53d16365fdf0305ffd8e9" + ], + "data": "0x0000000000000000000000000000000000000000000000000012abd0226e68000000000000000000000000000000000000000000000000000b6226c6ee5bab420000000000000000000000000000000000000000000043010141be1d4d5e51f10000000000000000000000000000000000000000000000000b4f7af6cbed4342000000000000000000000000000000000000000000004301015469ed6fccb9f1", + "logIndex": 130, + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4" + } + ], + "blockNumber": 19059812, + "cumulativeGasUsed": "7201512", + "status": 1, + "byzantium": true + }, + "args": [ + "0x9D638d66bc4EaA770bD091E9C2339fB39Af70168", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0x5d3a3890000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733000000000000000000000000eb1bb399997463d8fd0cb85c89da0fc9580064410000000000000000000000008f3cf7ad23cd3cadbd9735aff958023239c6a06300000000000000000000000027f8d03b3a2196956ed754badc28d73be8830a6e000000000000000000000000d05e3e715d945b59290df0ae8ef85c1bdb684744000000000000000000000000357d51124f59836ded84c8a1730d72b749d8bc230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "execute": { + "methodName": "initialize", + "args": [ + "0x168a5d1217AEcd258b03018d5bF1A1677A07b733", + "0xeb1bB399997463d8Fd0cb85C89Da0fc958006441", + "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063", + "0x27F8D03b3a2196956ED754baDc28D73be8830A6e", + "0xd05e3E715d945B59290df0ae8eF85c1BdB684744", + "0x357D51124f59836DeD84c8a1730D72B749d8BC23", + 0, + "0xcfcCB5e6b3882b7795eb1B1A9f18831A842d4eE0" + ] + }, + "implementation": "0x9D638d66bc4EaA770bD091E9C2339fB39Af70168", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/YieldManagerF3_Implementation.json b/deployments/polygon/YieldManagerF3_Implementation.json new file mode 100644 index 0000000..222aa0f --- /dev/null +++ b/deployments/polygon/YieldManagerF3_Implementation.json @@ -0,0 +1,1034 @@ +{ + "address": "0x9D638d66bc4EaA770bD091E9C2339fB39Af70168", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ClaimAaveRewardTokenToTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "WithdrawTreasuryFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unrealizedYield", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "YieldDistributed", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aaveIncentivesController", + "outputs": [ + { + "internalType": "contract IAaveIncentivesController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "amountReservedInCaseOfInsufficientAaveLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimAaveRewardsToTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositPaymentToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "totalValueRealizedForMarket", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "treasuryYieldPercent_e18", + "type": "uint256" + } + ], + "name": "distributeYieldForTreasuryAndReturnMarketAllocation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_longShort", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_aToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_lendingPoolAddressesProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "_aaveIncentivesController", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_aaveReferralCode", + "type": "uint16" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeForMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lendingPoolAddressesProvider", + "outputs": [ + { + "internalType": "contract ILendingPoolAddressesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "longShort", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paymentToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "removePaymentTokenFromMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalReservedForTreasury", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferPaymentTokensToUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateLatestLendingPoolAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawTreasuryFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x323b037de2e0ca456b0c29d0b8ac732e92e9aff12840da685d049a076e2897fb", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0x9D638d66bc4EaA770bD091E9C2339fB39Af70168", + "transactionIndex": 25, + "gasUsed": "2004865", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000002000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000010000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000008000001000000000000000000000000000000100000000000000000000000000200000000000000000000000000000000000000040000100000", + "blockHash": "0x60afd326b239ab3fa598bfff59c6d56b065d2f9dc6cb8c33e71a8be94a27c61d", + "transactionHash": "0x323b037de2e0ca456b0c29d0b8ac732e92e9aff12840da685d049a076e2897fb", + "logs": [ + { + "transactionIndex": 25, + "blockNumber": 19059808, + "transactionHash": "0x323b037de2e0ca456b0c29d0b8ac732e92e9aff12840da685d049a076e2897fb", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000b79fad4ca981472442f53d16365fdf0305ffd8e9" + ], + "data": "0x00000000000000000000000000000000000000000000000000473a241579e4000000000000000000000000000000000000000000000000000ba960eb03d58f42000000000000000000000000000000000000000000004300e0eca2cb86932ff40000000000000000000000000000000000000000000000000b6226c6ee5bab42000000000000000000000000000000000000000000004300e133dcef9c0d13f4", + "logIndex": 112, + "blockHash": "0x60afd326b239ab3fa598bfff59c6d56b065d2f9dc6cb8c33e71a8be94a27c61d" + } + ], + "blockNumber": 19059808, + "cumulativeGasUsed": "5445141", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ClaimAaveRewardTokenToTreasury\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"WithdrawTreasuryFunds\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unrealizedYield\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryYieldPercent_e18\",\"type\":\"uint256\"}],\"name\":\"YieldDistributed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"aToken\",\"outputs\":[{\"internalType\":\"contract IERC20Upgradeable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"aaveIncentivesController\",\"outputs\":[{\"internalType\":\"contract IAaveIncentivesController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amountReservedInCaseOfInsufficientAaveLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimAaveRewardsToTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositPaymentToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"totalValueRealizedForMarket\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"treasuryYieldPercent_e18\",\"type\":\"uint256\"}],\"name\":\"distributeYieldForTreasuryAndReturnMarketAllocation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_longShort\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_treasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_paymentToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_aToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_lendingPoolAddressesProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_aaveIncentivesController\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_aaveReferralCode\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeForMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lendingPoolAddressesProvider\",\"outputs\":[{\"internalType\":\"contract ILendingPoolAddressesProvider\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"longShort\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paymentToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"removePaymentTokenFromMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalReservedForTreasury\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferPaymentTokensToUser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateLatestLendingPoolAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawTreasuryFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"https://docs.aave.com/portal/\",\"kind\":\"dev\",\"methods\":{\"claimAaveRewardsToTreasury()\":{\"details\":\"This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued\"},\"depositPaymentToken(uint256)\":{\"params\":{\"amount\":\"Amount of payment token to deposit\"}},\"distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)\":{\"details\":\"treasuryPercent = 1 - marketPercent\",\"params\":{\"totalValueRealizedForMarket\":\"total value of long and short side of the market\",\"treasuryYieldPercent_e18\":\"Percentage of yield in base 1e18 that is allocated to the treasury\"},\"returns\":{\"_0\":\"The market allocation of the yield\"}},\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address,address,address,address,uint16,address)\":{\"details\":\"referral code will be set to 0, depricated Aave feature\",\"params\":{\"_aToken\":\"address of the interest accruing token linked to the payment token\",\"_aaveReferralCode\":\"unique code for aave referrals\",\"_admin\":\"admin for the contract\",\"_lendingPoolAddressesProvider\":\"address of the aave lending pool address provider contract\",\"_longShort\":\"address of the longShort contract\",\"_paymentToken\":\"address of the payment token\",\"_treasury\":\"address of the treasury contract\"}},\"removePaymentTokenFromMarket(uint256)\":{\"details\":\"This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave. This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.\",\"params\":{\"amount\":\"Amount of payment token to withdraw\"}},\"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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"transferPaymentTokensToUser(address,uint256)\":{\"params\":{\"amount\":\"Amount of payment token to pay to user\",\"user\":\"User to recieve the payout\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"stateVariables\":{\"aToken\":{\"details\":\"ADAI token\"},\"amountReservedInCaseOfInsufficientAaveLiquidity\":{\"details\":\"This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal. In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available.\"},\"paymentToken\":{\"details\":\"DAI token\"},\"referralCode\":{\"details\":\"An aave specific referralCode that has been a depricated feature. This will be set to 0 for \\\"no referral\\\" at deployment\"}},\"title\":\"YieldManagerAave\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"aToken()\":{\"notice\":\"The token representing the interest accruing payment token position from Aave\"},\"aaveIncentivesController()\":{\"notice\":\"The specific Aave incentives controller contract\"},\"claimAaveRewardsToTreasury()\":{\"notice\":\"Allows for withdrawal of aave rewards to the treasury contract\"},\"depositPaymentToken(uint256)\":{\"notice\":\"Allows the LongShort contract to deposit tokens into the aave pool\"},\"distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)\":{\"notice\":\"Calculates and updates the yield allocation to the treasury and the market\"},\"initialize(address,address,address,address,address,address,uint16,address)\":{\"notice\":\"Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts\"},\"initializeForMarket()\":{\"notice\":\"Initializes a specific yield manager to a given market\"},\"isInitialized()\":{\"notice\":\"boolean to prevent markets using an already initialized market\"},\"lendingPoolAddressesProvider()\":{\"notice\":\"The specific Aave lending pool address provider contract\"},\"longShort()\":{\"notice\":\"address of longShort contract\"},\"paymentToken()\":{\"notice\":\"The payment token the yield manager supports\"},\"removePaymentTokenFromMarket(uint256)\":{\"notice\":\"Allows the LongShort contract to redeem aTokens for the payment token\"},\"totalReservedForTreasury()\":{\"notice\":\"distributed yield not yet transferred to the treasury\"},\"transferPaymentTokensToUser(address,uint256)\":{\"notice\":\"Allows the LongShort pay out a user from tokens already withdrawn from Aave\"},\"treasury()\":{\"notice\":\"address of treasury contract - this is the address that can claim aave incentives rewards\"},\"withdrawTreasuryFunds()\":{\"notice\":\"Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\"}},\"notice\":\"contract is used to manage the yield generated by the underlying tokens. YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol. Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that continuously accrues interest based on a lend/borrow liquidity ratio.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/YieldManagerAave.sol\":\"YieldManagerAave\"},\"evmVersion\":\"istanbul\",\"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\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal initializer {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n _functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xcc3fca7831523600d2cac44ec77ee7e079f70c6910b6d7229ff774eaa5f04cdc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\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\":\"0xce27d2053e9b7a970532947213c84eed0289ada2d9a91c92b7e1e15f3a466c54\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal initializer {\\n __ERC1967Upgrade_init_unchained();\\n __UUPSUpgradeable_init_unchained();\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal initializer {\\n }\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallSecure(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x57e153cdc803037ecf68a916c6d7eb38d7e4ddbc7ceb6e37c0bee45a5aef9709\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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 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\":\"0x946f08c0a132c5877d458d7af7956da60607f20a5c03dd75760708c848aae6b7\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 StorageSlotUpgradeable {\\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\":\"0xc15eeb888d421aa4dedf46768a0502590d88911cfe5750d3ab9f644a7e5ada95\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"contracts/YieldManagerAave.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\n\\nimport \\\"hardhat/console.sol\\\";\\n\\nimport \\\"./interfaces/IYieldManager.sol\\\";\\nimport \\\"./interfaces/aave/ILendingPool.sol\\\";\\nimport \\\"./interfaces/aave/ILendingPoolAddressesProvider.sol\\\";\\nimport \\\"./interfaces/aave/IAaveIncentivesController.sol\\\";\\nimport \\\"./abstract/AccessControlledAndUpgradeable.sol\\\";\\n\\n/** @title YieldManagerAave\\n @notice contract is used to manage the yield generated by the underlying tokens.\\n YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol.\\n Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that\\n continuously accrues interest based on a lend/borrow liquidity ratio.\\n @dev https://docs.aave.com/portal/\\n */\\ncontract YieldManagerAave is IYieldManager, AccessControlledAndUpgradeable {\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 VARIABLES \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @notice address of longShort contract\\n address public longShort;\\n /// @notice address of treasury contract - this is the address that can claim aave incentives rewards\\n address public treasury;\\n\\n /// @notice boolean to prevent markets using an already initialized market\\n bool public isInitialized;\\n\\n /// @notice The payment token the yield manager supports\\n /// @dev DAI token\\n IERC20 public paymentToken;\\n /// @notice The token representing the interest accruing payment token position from Aave\\n /// @dev ADAI token\\n IERC20Upgradeable public aToken;\\n /// @notice The specific Aave lending pool address provider contract\\n ILendingPoolAddressesProvider public lendingPoolAddressesProvider;\\n /// @notice The specific Aave incentives controller contract\\n IAaveIncentivesController public aaveIncentivesController;\\n\\n /// @dev An aave specific referralCode that has been a depricated feature. This will be set to 0 for \\\"no referral\\\" at deployment\\n uint16 referralCode;\\n\\n /// @notice distributed yield not yet transferred to the treasury\\n uint256 public override totalReservedForTreasury;\\n\\n /// @dev This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal.\\n /// In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available.\\n uint256 public amountReservedInCaseOfInsufficientAaveLiquidity;\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 MODIFIERS \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /// @dev only allow longShort contract to execute modified functions\\n modifier longShortOnly() {\\n require(msg.sender == longShort, \\\"Not longShort\\\");\\n _;\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 CONTRACT SET-UP \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts\\n @param _longShort address of the longShort contract\\n @param _treasury address of the treasury contract\\n @param _paymentToken address of the payment token\\n @param _aToken address of the interest accruing token linked to the payment token\\n @param _lendingPoolAddressesProvider address of the aave lending pool address provider contract\\n @param _aaveReferralCode unique code for aave referrals\\n @param _admin admin for the contract\\n @dev referral code will be set to 0, depricated Aave feature\\n */\\n function initialize(\\n address _longShort,\\n address _treasury,\\n address _paymentToken,\\n address _aToken,\\n address _lendingPoolAddressesProvider,\\n address _aaveIncentivesController,\\n uint16 _aaveReferralCode,\\n address _admin\\n ) external initializer {\\n require(\\n _longShort != address(0) &&\\n _treasury != address(0) &&\\n _paymentToken != address(0) &&\\n _aToken != address(0) &&\\n _lendingPoolAddressesProvider != address(0) &&\\n _aaveIncentivesController != address(0) &&\\n _admin != address(0)\\n );\\n\\n longShort = _longShort;\\n treasury = _treasury;\\n\\n _AccessControlledAndUpgradeable_init(_admin);\\n\\n referralCode = _aaveReferralCode;\\n\\n paymentToken = IERC20(_paymentToken);\\n aToken = IERC20Upgradeable(_aToken);\\n lendingPoolAddressesProvider = ILendingPoolAddressesProvider(_lendingPoolAddressesProvider);\\n aaveIncentivesController = IAaveIncentivesController(_aaveIncentivesController);\\n\\n // Approve tokens for aave lending pool maximally.\\n IERC20(_paymentToken).approve(\\n ILendingPoolAddressesProvider(_lendingPoolAddressesProvider).getLendingPool(),\\n type(uint256).max\\n );\\n }\\n\\n function updateLatestLendingPoolAddress() external {\\n IERC20(paymentToken).approve(lendingPoolAddressesProvider.getLendingPool(), type(uint256).max);\\n }\\n\\n /*\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n \\u2551 IMPLEMENTATION \\u2551\\n \\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d*/\\n\\n /**\\n @notice Allows the LongShort contract to deposit tokens into the aave pool\\n @param amount Amount of payment token to deposit\\n */\\n function depositPaymentToken(uint256 amount) external override longShortOnly {\\n // If amountReservedInCaseOfInsufficientAaveLiquidity isn't zero, then efficiently net the difference between the amount\\n // It basically always be zero besides extreme and unlikely situations with aave.\\n if (amountReservedInCaseOfInsufficientAaveLiquidity != 0) {\\n if (amountReservedInCaseOfInsufficientAaveLiquidity >= amount) {\\n amountReservedInCaseOfInsufficientAaveLiquidity -= amount;\\n // Return early, nothing to deposit into the lending pool\\n return;\\n } else {\\n amount -= amountReservedInCaseOfInsufficientAaveLiquidity;\\n amountReservedInCaseOfInsufficientAaveLiquidity = 0;\\n }\\n }\\n\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).deposit(\\n address(paymentToken),\\n amount,\\n address(this),\\n referralCode\\n );\\n }\\n\\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\\n /// @param user User to recieve the payout\\n /// @param amount Amount of payment token to pay to user\\n function transferPaymentTokensToUser(address user, uint256 amount)\\n external\\n override\\n longShortOnly\\n {\\n try paymentToken.transfer(user, amount) returns (bool transferSuccess) {\\n if (transferSuccess) {\\n // If the transfer is successful return early, otherwise try pay the user out with the amountReservedInCaseOfInsufficientAaveLiquidity\\n return;\\n }\\n } catch {}\\n\\n amountReservedInCaseOfInsufficientAaveLiquidity -= amount;\\n\\n // If this reverts (ie aave unable to make payout), then the whole transaction will revert. User will have to wait until sufficient liquidity available.\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\\n address(paymentToken),\\n amount,\\n user\\n );\\n }\\n\\n /// @notice Allows the LongShort contract to redeem aTokens for the payment token\\n /// @param amount Amount of payment token to withdraw\\n /// @dev This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave.\\n /// This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.\\n function removePaymentTokenFromMarket(uint256 amount) external override longShortOnly {\\n try\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\\n address(paymentToken),\\n amount,\\n address(this)\\n )\\n {} catch {\\n // In theory we should only catch `VL_CURRENT_AVAILABLE_LIQUIDITY_NOT_ENOUGH` errors.\\n // Safe to revert on all errors, if aave completely blocks withdrawals the amountReservedInCaseOfInsufficientAaveLiquidity can grow until it is fixed without problems.\\n amountReservedInCaseOfInsufficientAaveLiquidity += amount;\\n }\\n }\\n\\n /**\\n @notice Allows for withdrawal of aave rewards to the treasury contract\\n @dev This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued\\n */\\n function claimAaveRewardsToTreasury() external {\\n IAaveIncentivesController _aaveIncentivesController = IAaveIncentivesController(\\n aaveIncentivesController\\n );\\n uint256 amount = _aaveIncentivesController.getUserUnclaimedRewards(address(this));\\n\\n address[] memory aTokenAddresses = new address[](1);\\n aTokenAddresses[0] = address(aToken);\\n\\n _aaveIncentivesController.claimRewards(aTokenAddresses, amount, treasury);\\n\\n emit ClaimAaveRewardTokenToTreasury(amount);\\n }\\n\\n /**\\n @notice Calculates and updates the yield allocation to the treasury and the market\\n @dev treasuryPercent = 1 - marketPercent\\n @param totalValueRealizedForMarket total value of long and short side of the market\\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\\n @return The market allocation of the yield\\n */\\n function distributeYieldForTreasuryAndReturnMarketAllocation(\\n uint256 totalValueRealizedForMarket,\\n uint256 treasuryYieldPercent_e18\\n ) external override longShortOnly returns (uint256) {\\n uint256 totalHeld = aToken.balanceOf(address(this));\\n uint256 _totalReservedForTreasury = totalReservedForTreasury;\\n\\n uint256 totalRealized = totalValueRealizedForMarket +\\n _totalReservedForTreasury +\\n amountReservedInCaseOfInsufficientAaveLiquidity;\\n\\n if (totalRealized == totalHeld) {\\n return 0;\\n }\\n\\n // will revert in case totalRealized > totalHeld which should never occur since yield is always possitive with aave.\\n uint256 unrealizedYield = totalHeld - totalRealized;\\n\\n uint256 amountForTreasury = (unrealizedYield * treasuryYieldPercent_e18) / 1e18;\\n uint256 amountForMarketIncentives = unrealizedYield - amountForTreasury;\\n\\n totalReservedForTreasury = _totalReservedForTreasury + amountForTreasury;\\n\\n emit YieldDistributed(unrealizedYield, treasuryYieldPercent_e18);\\n\\n return amountForMarketIncentives;\\n }\\n\\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\\n function withdrawTreasuryFunds() external override {\\n uint256 amountToWithdrawForTreasury = totalReservedForTreasury;\\n totalReservedForTreasury = 0;\\n\\n // Redeem aToken for payment tokens.\\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\\n address(paymentToken),\\n amountToWithdrawForTreasury,\\n treasury\\n );\\n\\n emit WithdrawTreasuryFunds();\\n }\\n\\n /// @notice Initializes a specific yield manager to a given market\\n function initializeForMarket() external override longShortOnly {\\n require(!isInitialized, \\\"Yield Manager is already in use\\\");\\n isInitialized = true;\\n }\\n}\\n\",\"keccak256\":\"0xd3a5c43ccb432cbffbbeed4df6a43898269be3869b9639d14a15db75d29531ce\",\"license\":\"BUSL-1.1\"},\"contracts/abstract/AccessControlledAndUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nabstract contract AccessControlledAndUpgradeable is\\n Initializable,\\n AccessControlUpgradeable,\\n UUPSUpgradeable\\n{\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n\\n /// @notice Initializes the contract when called by parent initializers.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\\n __AccessControl_init();\\n __UUPSUpgradeable_init();\\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\\n }\\n\\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\\n /// and _UUPSUpgradeable_init when initializing.\\n /// @param initialAdmin The initial admin who will hold all roles.\\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\\n internal\\n initializer\\n {\\n require(initialAdmin != address(0));\\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\\n _setupRole(ADMIN_ROLE, initialAdmin);\\n _setupRole(UPGRADER_ROLE, initialAdmin);\\n }\\n\\n /// @notice Authorizes an upgrade to a new address.\\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\\n}\\n\",\"keccak256\":\"0x1e82a4f784ef106965824647b8498fd8a93bdb75ea46d0cdefd27d08af0b75fe\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IYieldManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.8.3;\\n\\n/// @notice Manages yield accumulation for the LongShort contract. Each market is deployed with its own yield manager to simplify the bookkeeping, as different markets may share a payment token and yield pool.\\nabstract contract IYieldManager {\\n event ClaimAaveRewardTokenToTreasury(uint256 amount);\\n\\n event YieldDistributed(uint256 unrealizedYield, uint256 treasuryYieldPercent_e18);\\n\\n /// @dev This is purely saving some gas, but the subgraph will know how much is due for the treasury at all times - no need to include in event.\\n event WithdrawTreasuryFunds();\\n\\n /// @notice distributed yield not yet transferred to the treasury\\n function totalReservedForTreasury() external virtual returns (uint256);\\n\\n /// @notice Deposits the given amount of payment tokens into this yield manager.\\n /// @param amount Amount of payment token to deposit\\n function depositPaymentToken(uint256 amount) external virtual;\\n\\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\\n /// @param user User to recieve the payout\\n /// @param amount Amount of payment token to pay to user\\n function transferPaymentTokensToUser(address user, uint256 amount) external virtual;\\n\\n /// @notice Withdraws the given amount of tokens from this yield manager.\\n /// @param amount Amount of payment token to withdraw\\n function removePaymentTokenFromMarket(uint256 amount) external virtual;\\n\\n /** \\n @notice Calculates and updates the yield allocation to the treasury and the market\\n @dev treasuryPercent = 1 - marketPercent\\n @param totalValueRealizedForMarket total value of long and short side of the market\\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\\n @return amountForMarketIncentives The market allocation of the yield\\n */\\n function distributeYieldForTreasuryAndReturnMarketAllocation(\\n uint256 totalValueRealizedForMarket,\\n uint256 treasuryYieldPercent_e18\\n ) external virtual returns (uint256 amountForMarketIncentives);\\n\\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\\n function withdrawTreasuryFunds() external virtual;\\n\\n /// @notice Initializes a specific yield manager to a given market\\n function initializeForMarket() external virtual;\\n}\\n\",\"keccak256\":\"0x20116e375d536c6ee7bec74d1ee5c1a552465a79fc8f1f2a9e2428078d3648f6\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/DataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\nlibrary DataTypes {\\n // refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.\\n struct ReserveData {\\n //stores the reserve configuration\\n ReserveConfigurationMap configuration;\\n //the liquidity index. Expressed in ray\\n uint128 liquidityIndex;\\n //variable borrow index. Expressed in ray\\n uint128 variableBorrowIndex;\\n //the current supply rate. Expressed in ray\\n uint128 currentLiquidityRate;\\n //the current variable borrow rate. Expressed in ray\\n uint128 currentVariableBorrowRate;\\n //the current stable borrow rate. Expressed in ray\\n uint128 currentStableBorrowRate;\\n uint40 lastUpdateTimestamp;\\n //tokens addresses\\n address aTokenAddress;\\n address stableDebtTokenAddress;\\n address variableDebtTokenAddress;\\n //address of the interest rate strategy\\n address interestRateStrategyAddress;\\n //the id of the reserve. Represents the position in the list of the active reserves\\n uint8 id;\\n }\\n\\n struct ReserveConfigurationMap {\\n //bit 0-15: LTV\\n //bit 16-31: Liq. threshold\\n //bit 32-47: Liq. bonus\\n //bit 48-55: Decimals\\n //bit 56: Reserve is active\\n //bit 57: reserve is frozen\\n //bit 58: borrowing is enabled\\n //bit 59: stable rate borrowing enabled\\n //bit 60-63: reserved\\n //bit 64-79: reserve factor\\n uint256 data;\\n }\\n\\n struct UserConfigurationMap {\\n uint256 data;\\n }\\n\\n enum InterestRateMode {\\n NONE,\\n STABLE,\\n VARIABLE\\n }\\n}\\n\",\"keccak256\":\"0xdfb8a94fa45a4d85eb7003871c10282ce4cbd709becb01a6cba988f6444fdbfd\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/IAaveIncentivesController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\ninterface IAaveIncentivesController {\\n event RewardsClaimed(address indexed user, address indexed to, uint256 amount);\\n\\n function claimRewards(\\n address[] calldata assets,\\n uint256 amount,\\n address to\\n ) external returns (uint256);\\n\\n function getUserUnclaimedRewards(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xad57de8f82dee132c99314f6e7d80a003082aa7354671f09e45ed496fc56fc02\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/ILendingPool.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\nimport {ILendingPoolAddressesProvider} from \\\"./ILendingPoolAddressesProvider.sol\\\";\\nimport {DataTypes} from \\\"./DataTypes.sol\\\";\\n\\ninterface ILendingPool {\\n /**\\n * @dev Emitted on deposit()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address initiating the deposit\\n * @param onBehalfOf The beneficiary of the deposit, receiving the aTokens\\n * @param amount The amount deposited\\n * @param referral The referral code used\\n **/\\n event Deposit(\\n address indexed reserve,\\n address user,\\n address indexed onBehalfOf,\\n uint256 amount,\\n uint16 indexed referral\\n );\\n\\n /**\\n * @dev Emitted on withdraw()\\n * @param reserve The address of the underlyng asset being withdrawn\\n * @param user The address initiating the withdrawal, owner of aTokens\\n * @param to Address that will receive the underlying\\n * @param amount The amount to be withdrawn\\n **/\\n event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);\\n\\n /**\\n * @dev Emitted on borrow() and flashLoan() when debt needs to be opened\\n * @param reserve The address of the underlying asset being borrowed\\n * @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just\\n * initiator of the transaction on flashLoan()\\n * @param onBehalfOf The address that will be getting the debt\\n * @param amount The amount borrowed out\\n * @param borrowRateMode The rate mode: 1 for Stable, 2 for Variable\\n * @param borrowRate The numeric rate at which the user has borrowed\\n * @param referral The referral code used\\n **/\\n event Borrow(\\n address indexed reserve,\\n address user,\\n address indexed onBehalfOf,\\n uint256 amount,\\n uint256 borrowRateMode,\\n uint256 borrowRate,\\n uint16 indexed referral\\n );\\n\\n /**\\n * @dev Emitted on repay()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The beneficiary of the repayment, getting his debt reduced\\n * @param repayer The address of the user initiating the repay(), providing the funds\\n * @param amount The amount repaid\\n **/\\n event Repay(\\n address indexed reserve,\\n address indexed user,\\n address indexed repayer,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Emitted on swapBorrowRateMode()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user swapping his rate mode\\n * @param rateMode The rate mode that the user wants to swap to\\n **/\\n event Swap(address indexed reserve, address indexed user, uint256 rateMode);\\n\\n /**\\n * @dev Emitted on setUserUseReserveAsCollateral()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user enabling the usage as collateral\\n **/\\n event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on setUserUseReserveAsCollateral()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user enabling the usage as collateral\\n **/\\n event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on rebalanceStableBorrowRate()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user for which the rebalance has been executed\\n **/\\n event RebalanceStableBorrowRate(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on flashLoan()\\n * @param target The address of the flash loan receiver contract\\n * @param initiator The address initiating the flash loan\\n * @param asset The address of the asset being flash borrowed\\n * @param amount The amount flash borrowed\\n * @param premium The fee flash borrowed\\n * @param referralCode The referral code used\\n **/\\n event FlashLoan(\\n address indexed target,\\n address indexed initiator,\\n address indexed asset,\\n uint256 amount,\\n uint256 premium,\\n uint16 referralCode\\n );\\n\\n /**\\n * @dev Emitted when the pause is triggered.\\n */\\n event Paused();\\n\\n /**\\n * @dev Emitted when the pause is lifted.\\n */\\n event Unpaused();\\n\\n /**\\n * @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via\\n * LendingPoolCollateral manager using a DELEGATECALL\\n * This allows to have the events in the generated ABI for LendingPool.\\n * @param collateralAsset The address of the underlying asset used as collateral,\\n * to receive as result of the liquidation.\\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\\n * @param user The address of the borrower getting liquidated\\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\\n * @param liquidatedCollateralAmount The amount of collateral received by the liiquidator\\n * @param liquidator The address of the liquidator\\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\\n * to receive the underlying collateral asset directly\\n **/\\n event LiquidationCall(\\n address indexed collateralAsset,\\n address indexed debtAsset,\\n address indexed user,\\n uint256 debtToCover,\\n uint256 liquidatedCollateralAmount,\\n address liquidator,\\n bool receiveAToken\\n );\\n\\n /**\\n * @dev Emitted when the state of a reserve is updated. NOTE: This event is actually declared\\n * in the ReserveLogic library and emitted in the updateInterestRates() function. Since the function is internal,\\n * the event will actually be fired by the LendingPool contract. The event is therefore replicated here so it\\n * gets added to the LendingPool ABI\\n * @param reserve The address of the underlying asset of the reserve\\n * @param liquidityRate The new liquidity rate\\n * @param stableBorrowRate The new stable borrow rate\\n * @param variableBorrowRate The new variable borrow rate\\n * @param liquidityIndex The new liquidity index\\n * @param variableBorrowIndex The new variable borrow index\\n **/\\n event ReserveDataUpdated(\\n address indexed reserve,\\n uint256 liquidityRate,\\n uint256 stableBorrowRate,\\n uint256 variableBorrowRate,\\n uint256 liquidityIndex,\\n uint256 variableBorrowIndex\\n );\\n\\n /**\\n * @dev Deposits an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\\n * - E.g. User deposits 100 USDC and gets in return 100 aUSDC\\n * @param asset The address of the underlying asset to deposit\\n * @param amount The amount to be deposited\\n * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\\n * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\\n * is a different wallet\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n **/\\n function deposit(\\n address asset,\\n uint256 amount,\\n address onBehalfOf,\\n uint16 referralCode\\n ) external;\\n\\n /**\\n * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned\\n * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC\\n * @param asset The address of the underlying asset to withdraw\\n * @param amount The underlying amount to be withdrawn\\n * - Send the value type(uint256).max in order to withdraw the whole aToken balance\\n * @param to Address that will receive the underlying, same as msg.sender if the user\\n * wants to receive it on his own wallet, or a different address if the beneficiary is a\\n * different wallet\\n * @return The final amount withdrawn\\n **/\\n function withdraw(\\n address asset,\\n uint256 amount,\\n address to\\n ) external returns (uint256);\\n\\n /**\\n * @dev Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower\\n * already deposited enough collateral, or he was given enough allowance by a credit delegator on the\\n * corresponding debt token (StableDebtToken or VariableDebtToken)\\n * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet\\n * and 100 stable/variable debt tokens, depending on the `interestRateMode`\\n * @param asset The address of the underlying asset to borrow\\n * @param amount The amount to be borrowed\\n * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n * @param onBehalfOf Address of the user who will receive the debt. Should be the address of the borrower itself\\n * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator\\n * if he has been given credit delegation allowance\\n **/\\n function borrow(\\n address asset,\\n uint256 amount,\\n uint256 interestRateMode,\\n uint16 referralCode,\\n address onBehalfOf\\n ) external;\\n\\n /**\\n * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned\\n * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address\\n * @param asset The address of the borrowed underlying asset previously borrowed\\n * @param amount The amount to repay\\n * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\\n * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable\\n * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the\\n * user calling the function if he wants to reduce/remove his own debt, or the address of any other\\n * other borrower whose debt should be removed\\n * @return The final amount repaid\\n **/\\n function repay(\\n address asset,\\n uint256 amount,\\n uint256 rateMode,\\n address onBehalfOf\\n ) external returns (uint256);\\n\\n /**\\n * @dev Allows a borrower to swap his debt between stable and variable mode, or viceversa\\n * @param asset The address of the underlying asset borrowed\\n * @param rateMode The rate mode that the user wants to swap to\\n **/\\n function swapBorrowRateMode(address asset, uint256 rateMode) external;\\n\\n /**\\n * @dev Rebalances the stable interest rate of a user to the current stable rate defined on the reserve.\\n * - Users can be rebalanced if the following conditions are satisfied:\\n * 1. Usage ratio is above 95%\\n * 2. the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate,\\n * which means that too much has been borrowed at a stable rate and depositors are not earning enough\\n * @param asset The address of the underlying asset borrowed\\n * @param user The address of the user to be rebalanced\\n **/\\n function rebalanceStableBorrowRate(address asset, address user) external;\\n\\n /**\\n * @dev Allows depositors to enable/disable a specific deposited asset as collateral\\n * @param asset The address of the underlying asset deposited\\n * @param useAsCollateral `true` if the user wants to use the deposit as collateral, `false` otherwise\\n **/\\n function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external;\\n\\n /**\\n * @dev Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1\\n * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives\\n * a proportionally amount of the `collateralAsset` plus a bonus to cover market risk\\n * @param collateralAsset The address of the underlying asset used as collateral,\\n * to receive as result of the liquidation.\\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\\n * @param user The address of the borrower getting liquidated\\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\\n * to receive the underlying collateral asset directly\\n **/\\n function liquidationCall(\\n address collateralAsset,\\n address debtAsset,\\n address user,\\n uint256 debtToCover,\\n bool receiveAToken\\n ) external;\\n\\n /**\\n * @dev Allows smartcontracts to access the liquidity of the pool within one transaction,\\n * as long as the amount taken plus a fee is returned.\\n * IMPORTANT There are security concerns for developers of flashloan receiver\\n * contracts that must be kept into consideration.\\n * For further details please visit https://developers.aave.com\\n * @param receiverAddress The address of the contract receiving the funds,\\n * implementing the IFlashLoanReceiver interface.\\n * @param assets The addresses of the assets being flash-borrowed\\n * @param amounts The amounts amounts being flash-borrowed\\n * @param modes Types of the debt to open if the flash loan is not returned:\\n * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver\\n * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\\n * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\\n * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2\\n * @param params Variadic packed params to pass to the receiver as extra information\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n **/\\n function flashLoan(\\n address receiverAddress,\\n address[] calldata assets,\\n uint256[] calldata amounts,\\n uint256[] calldata modes,\\n address onBehalfOf,\\n bytes calldata params,\\n uint16 referralCode\\n ) external;\\n\\n /**\\n * @dev Returns the user account data across all the reserves\\n * @param user The address of the user\\n * @return totalCollateralETH the total collateral in ETH of the user\\n * @return totalDebtETH the total debt in ETH of the user\\n * @return availableBorrowsETH the borrowing power left of the user\\n * @return currentLiquidationThreshold the liquidation threshold of the user\\n * @return ltv the loan to value of the user\\n * @return healthFactor the current health factor of the user\\n **/\\n function getUserAccountData(address user)\\n external\\n view\\n returns (\\n uint256 totalCollateralETH,\\n uint256 totalDebtETH,\\n uint256 availableBorrowsETH,\\n uint256 currentLiquidationThreshold,\\n uint256 ltv,\\n uint256 healthFactor\\n );\\n\\n function initReserve(\\n address reserve,\\n address aTokenAddress,\\n address stableDebtAddress,\\n address variableDebtAddress,\\n address interestRateStrategyAddress\\n ) external;\\n\\n function setReserveInterestRateStrategyAddress(address reserve, address rateStrategyAddress)\\n external;\\n\\n function setConfiguration(address reserve, uint256 configuration) external;\\n\\n /**\\n * @dev Returns the configuration of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The configuration of the reserve\\n **/\\n function getConfiguration(address asset)\\n external\\n view\\n returns (DataTypes.ReserveConfigurationMap memory);\\n\\n /**\\n * @dev Returns the configuration of the user across all the reserves\\n * @param user The user address\\n * @return The configuration of the user\\n **/\\n function getUserConfiguration(address user)\\n external\\n view\\n returns (DataTypes.UserConfigurationMap memory);\\n\\n /**\\n * @dev Returns the normalized income normalized income of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The reserve's normalized income\\n */\\n function getReserveNormalizedIncome(address asset) external view returns (uint256);\\n\\n /**\\n * @dev Returns the normalized variable debt per unit of asset\\n * @param asset The address of the underlying asset of the reserve\\n * @return The reserve normalized variable debt\\n */\\n function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);\\n\\n /**\\n * @dev Returns the state and configuration of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The state of the reserve\\n **/\\n function getReserveData(address asset) external view returns (DataTypes.ReserveData memory);\\n\\n function finalizeTransfer(\\n address asset,\\n address from,\\n address to,\\n uint256 amount,\\n uint256 balanceFromAfter,\\n uint256 balanceToBefore\\n ) external;\\n\\n function getReservesList() external view returns (address[] memory);\\n\\n function getAddressesProvider() external view returns (ILendingPoolAddressesProvider);\\n\\n function setPause(bool val) external;\\n\\n function paused() external view returns (bool);\\n}\\n\",\"keccak256\":\"0xdf61949ab12c334f8ae028eafec802ef963fa96c9107309a178e5c7a46b1de37\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/aave/ILendingPoolAddressesProvider.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.3;\\n\\n/**\\n * @title LendingPoolAddressesProvider contract\\n * @dev Main registry of addresses part of or connected to the protocol, including permissioned roles\\n * - Acting also as factory of proxies and admin of those, so with right to change its implementations\\n * - Owned by the Aave Governance\\n * @author Aave\\n **/\\ninterface ILendingPoolAddressesProvider {\\n // event MarketIdSet(string newMarketId);\\n // event LendingPoolUpdated(address indexed newAddress);\\n // event ConfigurationAdminUpdated(address indexed newAddress);\\n // event EmergencyAdminUpdated(address indexed newAddress);\\n // event LendingPoolConfiguratorUpdated(address indexed newAddress);\\n // event LendingPoolCollateralManagerUpdated(address indexed newAddress);\\n // event PriceOracleUpdated(address indexed newAddress);\\n // event LendingRateOracleUpdated(address indexed newAddress);\\n // event ProxyCreated(bytes32 id, address indexed newAddress);\\n // event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy);\\n\\n // function getMarketId() external view returns (string memory);\\n\\n // function setMarketId(string calldata marketId) external;\\n\\n // function setAddress(bytes32 id, address newAddress) external;\\n\\n // function setAddressAsProxy(bytes32 id, address impl) external;\\n\\n // function getAddress(bytes32 id) external view returns (address);\\n\\n function getLendingPool() external view returns (address);\\n\\n // function setLendingPoolImpl(address pool) external;\\n\\n // function getLendingPoolConfigurator() external view returns (address);\\n\\n // function setLendingPoolConfiguratorImpl(address configurator) external;\\n\\n // function getLendingPoolCollateralManager() external view returns (address);\\n\\n // function setLendingPoolCollateralManager(address manager) external;\\n\\n // function getPoolAdmin() external view returns (address);\\n\\n // function setPoolAdmin(address admin) external;\\n\\n // function getEmergencyAdmin() external view returns (address);\\n\\n // function setEmergencyAdmin(address admin) external;\\n\\n // function getPriceOracle() external view returns (address);\\n\\n // function setPriceOracle(address priceOracle) external;\\n\\n // function getLendingRateOracle() external view returns (address);\\n\\n // function setLendingRateOracle(address lendingRateOracle) external;\\n}\\n\",\"keccak256\":\"0x706ba21943e504614721ec3a797cfac48edf00cb4c705c4522616f76d3306ff7\",\"license\":\"BUSL-1.1\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061234f806100206000396000f3fe6080604052600436106101c25760003560e01c80634f1ef286116100f757806391d1485411610095578063d547741f11610064578063d547741f146104ff578063eb6bffa21461051f578063edf565cc1461053f578063f72c0d8b14610554576101c2565b806391d148541461048a578063a0c1f15e146104aa578063a217fddf146104ca578063bba00ba5146104df576101c2565b806361d027b3116100d157806361d027b3146103f657806375b238fc146104165780638a5599b21461044a5780639063ee201461046a576101c2565b80634f1ef286146103a25780635d3a3890146103b55780635f2475ca146103d5576101c2565b80632f2ff15d1161016457806336568abe1161013e57806336568abe1461032c5780633659cfe61461034c578063392e53cd1461036c578063447479db1461038d576101c2565b80632f2ff15d146102d75780633013ce29146102f757806334944bb014610317576101c2565b80632429e535116101a05780632429e53514610233578063248a9ca31461025857806329949872146102885780632ae320cb146102c0576101c2565b806301ffc9a7146101c757806315429969146101fc5780631c499b5514610213575b600080fd5b3480156101d357600080fd5b506101e76101e2366004611ffe565b610588565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b506102116105bf565b005b34801561021f57600080fd5b5061021161022e366004611fb7565b6106ca565b34801561023f57600080fd5b5061024a6101015481565b6040519081526020016101f3565b34801561026457600080fd5b5061024a610273366004611fb7565b60009081526065602052604090206001015490565b34801561029457600080fd5b5060fb546102a8906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b3480156102cc57600080fd5b5061024a6101025481565b3480156102e357600080fd5b506102116102f2366004611fcf565b61082c565b34801561030357600080fd5b5060fd546102a8906001600160a01b031681565b34801561032357600080fd5b50610211610858565b34801561033857600080fd5b50610211610347366004611fcf565b6109fa565b34801561035857600080fd5b50610211610367366004611dc7565b610a74565b34801561037857600080fd5b5060fc546101e790600160a01b900460ff1681565b34801561039957600080fd5b50610211610a98565b6102116103b0366004611ead565b610bdc565b3480156103c157600080fd5b506102116103d0366004611dff565b610bf1565b3480156103e157600080fd5b50610100546102a8906001600160a01b031681565b34801561040257600080fd5b5060fc546102a8906001600160a01b031681565b34801561042257600080fd5b5061024a7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561045657600080fd5b5061024a61046536600461203e565b610e88565b34801561047657600080fd5b50610211610485366004611fb7565b610ffa565b34801561049657600080fd5b506101e76104a5366004611fcf565b61116a565b3480156104b657600080fd5b5060fe546102a8906001600160a01b031681565b3480156104d657600080fd5b5061024a600081565b3480156104eb57600080fd5b5060ff546102a8906001600160a01b031681565b34801561050b57600080fd5b5061021161051a366004611fcf565b611195565b34801561052b57600080fd5b5061021161053a366004611f6c565b6111bb565b34801561054b57600080fd5b5061021161139c565b34801561056057600080fd5b5061024a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806105b957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60fd5460ff5460408051630261bf8b60e01b815290516001600160a01b039384169363095ea7b3931691630261bf8b916004808301926020929190829003018186803b15801561060e57600080fd5b505afa158015610622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106469190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611f97565b50565b60fb546001600160a01b031633146106fd5760405162461bcd60e51b81526004016106f490612187565b60405180910390fd5b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561074b57600080fd5b505afa15801561075f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107839190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018490523060448201529116906369328dec90606401602060405180830381600087803b1580156107d657600080fd5b505af1925050508015610806575060408051601f3d908101601f1916820190925261080391810190612026565b60015b6108285780610102600082825461081d91906121fc565b909155506106c79050565b5050565b60008281526065602052604090206001015461084981335b611435565b6108538383611499565b505050565b61010054604051630cc7d40f60e11b81523060048201526001600160a01b0390911690600090829063198fa81e9060240160206040518083038186803b1580156108a157600080fd5b505afa1580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190612026565b6040805160018082528183019092529192506000919060208083019080368337505060fe5482519293506001600160a01b03169183915060009061092d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260fc54604051633111e7b360e01b815285831692633111e7b39261096f928692889216906004016120f0565b602060405180830381600087803b15801561098957600080fd5b505af115801561099d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c19190612026565b506040518281527fbdeb6031c2eac1ba6d1bd54a501b8942cf452ed6eb9f9a58512591a1faea22a49060200160405180910390a1505050565b6001600160a01b0381163314610a6a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106f4565b610828828261151f565b610a7d81611586565b6106c7816040518060200160405280600081525060006115b1565b6101018054600090915560ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b158015610ae757600080fd5b505afa158015610afb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1f9190611de3565b60fd5460fc54604051631a4ca37b60e21b81526001600160a01b0392831660048201526024810185905290821660448201529116906369328dec90606401602060405180830381600087803b158015610b7757600080fd5b505af1158015610b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610baf9190612026565b506040517f5b1d5b57337c7653ccd178787bc6e5aa6f8a6ee09b781e7a624d776e69d044cb90600090a150565b610be582611586565b610828828260016115b1565b600054610100900460ff1680610c0a575060005460ff16155b610c265760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015610c48576000805461ffff19166101011790555b6001600160a01b03891615801590610c6857506001600160a01b03881615155b8015610c7c57506001600160a01b03871615155b8015610c9057506001600160a01b03861615155b8015610ca457506001600160a01b03851615155b8015610cb857506001600160a01b03841615155b8015610ccc57506001600160a01b03821615155b610cd557600080fd5b60fb80546001600160a01b03808c166001600160a01b03199283161790925560fc8054928b1692909116919091179055610d0e82611732565b610100805460fd80546001600160a01b03808c166001600160a01b0319928316811790935560fe80548c831690841617905560ff80548b8316908416811790915590891661ffff8916600160a01b02929092166001600160b01b0319909416939093171790925560408051630261bf8b60e01b8152905163095ea7b39291630261bf8b916004808301926020929190829003018186803b158015610db157600080fd5b505afa158015610dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de99190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b158015610e3257600080fd5b505af1158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611f97565b508015610e7d576000805461ff00191690555b505050505050505050565b60fb546000906001600160a01b03163314610eb55760405162461bcd60e51b81526004016106f490612187565b60fe546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610ef957600080fd5b505afa158015610f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f319190612026565b610101546101025491925090600090610f4a83886121fc565b610f5491906121fc565b905082811415610f6a57600093505050506105b9565b6000610f768285612253565b90506000670de0b6b3a7640000610f8d8884612234565b610f979190612214565b90506000610fa58284612253565b9050610fb182866121fc565b6101015560408051848152602081018a90527ffe4996cd48c364c468cee70dd6b9061874ff01b05c5ea49311cbcabd9b9cb615910160405180910390a198975050505050505050565b60fb546001600160a01b031633146110245760405162461bcd60e51b81526004016106f490612187565b61010254156110615780610102541061104a5780610102600082825461081d9190612253565b610102546110589082612253565b60006101025590505b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110af57600080fd5b505afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190611de3565b60fd546101005460405163e8eda9df60e01b81526001600160a01b03928316600482015260248101859052306044820152600160a01b90910461ffff16606482015291169063e8eda9df90608401600060405180830381600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b5050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152606560205260409020600101546111b18133610844565b610853838361151f565b60fb546001600160a01b031633146111e55760405162461bcd60e51b81526004016106f490612187565b60fd5460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561123357600080fd5b505af1925050508015611263575060408051601f3d908101601f1916820190925261126091810190611f97565b60015b61126c5761127a565b80156112785750610828565b505b80610102600082825461128d9190612253565b909155505060ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b1580156112d757600080fd5b505afa1580156112eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130f9190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b0391821660048201526024810184905284821660448201529116906369328dec90606401602060405180830381600087803b15801561136457600080fd5b505af1158015611378573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190612026565b60fb546001600160a01b031633146113c65760405162461bcd60e51b81526004016106f490612187565b60fc54600160a01b900460ff16156114205760405162461bcd60e51b815260206004820152601f60248201527f5969656c64204d616e6167657220697320616c726561647920696e207573650060448201526064016106f4565b60fc805460ff60a01b1916600160a01b179055565b61143f828261116a565b61082857611457816001600160a01b031660146117b7565b6114628360206117b7565b60405160200161147392919061207b565b60408051601f198184030181529082905262461bcd60e51b82526106f491600401612154565b6114a3828261116a565b6108285760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556114db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611529828261116a565b156108285760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108288133610844565b60006115e47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506115ef846119a0565b6000835111806115fc5750815b1561160d5761160b8484611a45565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661116357805460ff191660011781556040516001600160a01b038316602482015261168c90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611a45565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146117295760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016106f4565b61116385611b30565b600054610100900460ff168061174b575060005460ff16155b6117675760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611789576000805461ffff19166101011790555b611791611b70565b611799611bf3565b6117a282611c51565b8015610828576000805461ff00191690555050565b606060006117c6836002612234565b6117d19060026121fc565b67ffffffffffffffff8111156117f757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611821576020820181803683370190505b509050600360fc1b8160008151811061184a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061188757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006118ab846002612234565b6118b69060016121fc565b90505b600181111561194a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106118f857634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061191c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936119438161229a565b90506118b9565b5083156119995760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106f4565b9392505050565b803b611a045760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016106f4565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611aa45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016106f4565b600080846001600160a01b031684604051611abf919061205f565b600060405180830381855af49150503d8060008114611afa576040519150601f19603f3d011682016040523d82523d6000602084013e611aff565b606091505b5091509150611b2782826040518060600160405280602781526020016122f360279139611d1a565b95945050505050565b611b39816119a0565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611b89575060005460ff16155b611ba55760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bc7576000805461ffff19166101011790555b611bcf611d53565b611bd7611d53565b611bdf611d53565b80156106c7576000805461ff001916905550565b600054610100900460ff1680611c0c575060005460ff16155b611c285760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bcf576000805461ffff1916610101179055611bd7611d53565b600054610100900460ff1680611c6a575060005460ff16155b611c865760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611ca8576000805461ffff19166101011790555b6001600160a01b038216611cbb57600080fd5b611cc6600083611dbd565b611cf07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583611dbd565b6117a27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383611dbd565b60608315611d29575081611999565b825115611d395782518084602001fd5b8160405162461bcd60e51b81526004016106f49190612154565b600054610100900460ff1680611d6c575060005460ff16155b611d885760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bdf576000805461ffff191661010117905580156106c7576000805461ff001916905550565b6108288282611499565b600060208284031215611dd8578081fd5b8135611999816122dd565b600060208284031215611df4578081fd5b8151611999816122dd565b600080600080600080600080610100898b031215611e1b578384fd5b8835611e26816122dd565b97506020890135611e36816122dd565b96506040890135611e46816122dd565b95506060890135611e56816122dd565b94506080890135611e66816122dd565b935060a0890135611e76816122dd565b925060c089013561ffff81168114611e8c578283fd5b915060e0890135611e9c816122dd565b809150509295985092959890939650565b60008060408385031215611ebf578182fd5b8235611eca816122dd565b9150602083013567ffffffffffffffff80821115611ee6578283fd5b818501915085601f830112611ef9578283fd5b813581811115611f0b57611f0b6122c7565b604051601f8201601f19908116603f01168101908382118183101715611f3357611f336122c7565b81604052828152886020848701011115611f4b578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215611f7e578182fd5b8235611f89816122dd565b946020939093013593505050565b600060208284031215611fa8578081fd5b81518015158114611999578182fd5b600060208284031215611fc8578081fd5b5035919050565b60008060408385031215611fe1578182fd5b823591506020830135611ff3816122dd565b809150509250929050565b60006020828403121561200f578081fd5b81356001600160e01b031981168114611999578182fd5b600060208284031215612037578081fd5b5051919050565b60008060408385031215612050578182fd5b50508035926020909101359150565b6000825161207181846020870161226a565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516120b381601785016020880161226a565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120e481602884016020880161226a565b01602801949350505050565b606080825284519082018190526000906020906080840190828801845b828110156121325781516001600160a01b03168452928401929084019060010161210d565b50505090830194909452506001600160a01b0391909116604090910152919050565b600060208252825180602084015261217381604085016020870161226a565b601f01601f19169190910160400192915050565b6020808252600d908201526c139bdd081b1bdb99d4da1bdc9d609a1b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561220f5761220f6122b1565b500190565b60008261222f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561224e5761224e6122b1565b500290565b600082821015612265576122656122b1565b500390565b60005b8381101561228557818101518382015260200161226d565b83811115612294576000848401525b50505050565b6000816122a9576122a96122b1565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146106c757600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122061c70aab4ceb80431078b3b8a133042e3380167471ee409f8beb381cd0e586b464736f6c63430008030033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c80634f1ef286116100f757806391d1485411610095578063d547741f11610064578063d547741f146104ff578063eb6bffa21461051f578063edf565cc1461053f578063f72c0d8b14610554576101c2565b806391d148541461048a578063a0c1f15e146104aa578063a217fddf146104ca578063bba00ba5146104df576101c2565b806361d027b3116100d157806361d027b3146103f657806375b238fc146104165780638a5599b21461044a5780639063ee201461046a576101c2565b80634f1ef286146103a25780635d3a3890146103b55780635f2475ca146103d5576101c2565b80632f2ff15d1161016457806336568abe1161013e57806336568abe1461032c5780633659cfe61461034c578063392e53cd1461036c578063447479db1461038d576101c2565b80632f2ff15d146102d75780633013ce29146102f757806334944bb014610317576101c2565b80632429e535116101a05780632429e53514610233578063248a9ca31461025857806329949872146102885780632ae320cb146102c0576101c2565b806301ffc9a7146101c757806315429969146101fc5780631c499b5514610213575b600080fd5b3480156101d357600080fd5b506101e76101e2366004611ffe565b610588565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b506102116105bf565b005b34801561021f57600080fd5b5061021161022e366004611fb7565b6106ca565b34801561023f57600080fd5b5061024a6101015481565b6040519081526020016101f3565b34801561026457600080fd5b5061024a610273366004611fb7565b60009081526065602052604090206001015490565b34801561029457600080fd5b5060fb546102a8906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b3480156102cc57600080fd5b5061024a6101025481565b3480156102e357600080fd5b506102116102f2366004611fcf565b61082c565b34801561030357600080fd5b5060fd546102a8906001600160a01b031681565b34801561032357600080fd5b50610211610858565b34801561033857600080fd5b50610211610347366004611fcf565b6109fa565b34801561035857600080fd5b50610211610367366004611dc7565b610a74565b34801561037857600080fd5b5060fc546101e790600160a01b900460ff1681565b34801561039957600080fd5b50610211610a98565b6102116103b0366004611ead565b610bdc565b3480156103c157600080fd5b506102116103d0366004611dff565b610bf1565b3480156103e157600080fd5b50610100546102a8906001600160a01b031681565b34801561040257600080fd5b5060fc546102a8906001600160a01b031681565b34801561042257600080fd5b5061024a7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561045657600080fd5b5061024a61046536600461203e565b610e88565b34801561047657600080fd5b50610211610485366004611fb7565b610ffa565b34801561049657600080fd5b506101e76104a5366004611fcf565b61116a565b3480156104b657600080fd5b5060fe546102a8906001600160a01b031681565b3480156104d657600080fd5b5061024a600081565b3480156104eb57600080fd5b5060ff546102a8906001600160a01b031681565b34801561050b57600080fd5b5061021161051a366004611fcf565b611195565b34801561052b57600080fd5b5061021161053a366004611f6c565b6111bb565b34801561054b57600080fd5b5061021161139c565b34801561056057600080fd5b5061024a7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b14806105b957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60fd5460ff5460408051630261bf8b60e01b815290516001600160a01b039384169363095ea7b3931691630261bf8b916004808301926020929190829003018186803b15801561060e57600080fd5b505afa158015610622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106469190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611f97565b50565b60fb546001600160a01b031633146106fd5760405162461bcd60e51b81526004016106f490612187565b60405180910390fd5b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561074b57600080fd5b505afa15801561075f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107839190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018490523060448201529116906369328dec90606401602060405180830381600087803b1580156107d657600080fd5b505af1925050508015610806575060408051601f3d908101601f1916820190925261080391810190612026565b60015b6108285780610102600082825461081d91906121fc565b909155506106c79050565b5050565b60008281526065602052604090206001015461084981335b611435565b6108538383611499565b505050565b61010054604051630cc7d40f60e11b81523060048201526001600160a01b0390911690600090829063198fa81e9060240160206040518083038186803b1580156108a157600080fd5b505afa1580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190612026565b6040805160018082528183019092529192506000919060208083019080368337505060fe5482519293506001600160a01b03169183915060009061092d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260fc54604051633111e7b360e01b815285831692633111e7b39261096f928692889216906004016120f0565b602060405180830381600087803b15801561098957600080fd5b505af115801561099d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c19190612026565b506040518281527fbdeb6031c2eac1ba6d1bd54a501b8942cf452ed6eb9f9a58512591a1faea22a49060200160405180910390a1505050565b6001600160a01b0381163314610a6a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106f4565b610828828261151f565b610a7d81611586565b6106c7816040518060200160405280600081525060006115b1565b6101018054600090915560ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b158015610ae757600080fd5b505afa158015610afb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1f9190611de3565b60fd5460fc54604051631a4ca37b60e21b81526001600160a01b0392831660048201526024810185905290821660448201529116906369328dec90606401602060405180830381600087803b158015610b7757600080fd5b505af1158015610b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610baf9190612026565b506040517f5b1d5b57337c7653ccd178787bc6e5aa6f8a6ee09b781e7a624d776e69d044cb90600090a150565b610be582611586565b610828828260016115b1565b600054610100900460ff1680610c0a575060005460ff16155b610c265760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015610c48576000805461ffff19166101011790555b6001600160a01b03891615801590610c6857506001600160a01b03881615155b8015610c7c57506001600160a01b03871615155b8015610c9057506001600160a01b03861615155b8015610ca457506001600160a01b03851615155b8015610cb857506001600160a01b03841615155b8015610ccc57506001600160a01b03821615155b610cd557600080fd5b60fb80546001600160a01b03808c166001600160a01b03199283161790925560fc8054928b1692909116919091179055610d0e82611732565b610100805460fd80546001600160a01b03808c166001600160a01b0319928316811790935560fe80548c831690841617905560ff80548b8316908416811790915590891661ffff8916600160a01b02929092166001600160b01b0319909416939093171790925560408051630261bf8b60e01b8152905163095ea7b39291630261bf8b916004808301926020929190829003018186803b158015610db157600080fd5b505afa158015610dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de99190611de3565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b158015610e3257600080fd5b505af1158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611f97565b508015610e7d576000805461ff00191690555b505050505050505050565b60fb546000906001600160a01b03163314610eb55760405162461bcd60e51b81526004016106f490612187565b60fe546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610ef957600080fd5b505afa158015610f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f319190612026565b610101546101025491925090600090610f4a83886121fc565b610f5491906121fc565b905082811415610f6a57600093505050506105b9565b6000610f768285612253565b90506000670de0b6b3a7640000610f8d8884612234565b610f979190612214565b90506000610fa58284612253565b9050610fb182866121fc565b6101015560408051848152602081018a90527ffe4996cd48c364c468cee70dd6b9061874ff01b05c5ea49311cbcabd9b9cb615910160405180910390a198975050505050505050565b60fb546001600160a01b031633146110245760405162461bcd60e51b81526004016106f490612187565b61010254156110615780610102541061104a5780610102600082825461081d9190612253565b610102546110589082612253565b60006101025590505b60ff60009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110af57600080fd5b505afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190611de3565b60fd546101005460405163e8eda9df60e01b81526001600160a01b03928316600482015260248101859052306044820152600160a01b90910461ffff16606482015291169063e8eda9df90608401600060405180830381600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b5050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152606560205260409020600101546111b18133610844565b610853838361151f565b60fb546001600160a01b031633146111e55760405162461bcd60e51b81526004016106f490612187565b60fd5460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561123357600080fd5b505af1925050508015611263575060408051601f3d908101601f1916820190925261126091810190611f97565b60015b61126c5761127a565b80156112785750610828565b505b80610102600082825461128d9190612253565b909155505060ff5460408051630261bf8b60e01b815290516001600160a01b0390921691630261bf8b91600480820192602092909190829003018186803b1580156112d757600080fd5b505afa1580156112eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130f9190611de3565b60fd54604051631a4ca37b60e21b81526001600160a01b0391821660048201526024810184905284821660448201529116906369328dec90606401602060405180830381600087803b15801561136457600080fd5b505af1158015611378573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190612026565b60fb546001600160a01b031633146113c65760405162461bcd60e51b81526004016106f490612187565b60fc54600160a01b900460ff16156114205760405162461bcd60e51b815260206004820152601f60248201527f5969656c64204d616e6167657220697320616c726561647920696e207573650060448201526064016106f4565b60fc805460ff60a01b1916600160a01b179055565b61143f828261116a565b61082857611457816001600160a01b031660146117b7565b6114628360206117b7565b60405160200161147392919061207b565b60408051601f198184030181529082905262461bcd60e51b82526106f491600401612154565b6114a3828261116a565b6108285760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556114db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611529828261116a565b156108285760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e36108288133610844565b60006115e47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b90506115ef846119a0565b6000835111806115fc5750815b1561160d5761160b8484611a45565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661116357805460ff191660011781556040516001600160a01b038316602482015261168c90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052611a45565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b038381169116146117295760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016106f4565b61116385611b30565b600054610100900460ff168061174b575060005460ff16155b6117675760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611789576000805461ffff19166101011790555b611791611b70565b611799611bf3565b6117a282611c51565b8015610828576000805461ff00191690555050565b606060006117c6836002612234565b6117d19060026121fc565b67ffffffffffffffff8111156117f757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611821576020820181803683370190505b509050600360fc1b8160008151811061184a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061188757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006118ab846002612234565b6118b69060016121fc565b90505b600181111561194a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106118f857634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061191c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936119438161229a565b90506118b9565b5083156119995760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106f4565b9392505050565b803b611a045760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016106f4565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b611aa45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016106f4565b600080846001600160a01b031684604051611abf919061205f565b600060405180830381855af49150503d8060008114611afa576040519150601f19603f3d011682016040523d82523d6000602084013e611aff565b606091505b5091509150611b2782826040518060600160405280602781526020016122f360279139611d1a565b95945050505050565b611b39816119a0565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600054610100900460ff1680611b89575060005460ff16155b611ba55760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bc7576000805461ffff19166101011790555b611bcf611d53565b611bd7611d53565b611bdf611d53565b80156106c7576000805461ff001916905550565b600054610100900460ff1680611c0c575060005460ff16155b611c285760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bcf576000805461ffff1916610101179055611bd7611d53565b600054610100900460ff1680611c6a575060005460ff16155b611c865760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611ca8576000805461ffff19166101011790555b6001600160a01b038216611cbb57600080fd5b611cc6600083611dbd565b611cf07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583611dbd565b6117a27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e383611dbd565b60608315611d29575081611999565b825115611d395782518084602001fd5b8160405162461bcd60e51b81526004016106f49190612154565b600054610100900460ff1680611d6c575060005460ff16155b611d885760405162461bcd60e51b81526004016106f4906121ae565b600054610100900460ff16158015611bdf576000805461ffff191661010117905580156106c7576000805461ff001916905550565b6108288282611499565b600060208284031215611dd8578081fd5b8135611999816122dd565b600060208284031215611df4578081fd5b8151611999816122dd565b600080600080600080600080610100898b031215611e1b578384fd5b8835611e26816122dd565b97506020890135611e36816122dd565b96506040890135611e46816122dd565b95506060890135611e56816122dd565b94506080890135611e66816122dd565b935060a0890135611e76816122dd565b925060c089013561ffff81168114611e8c578283fd5b915060e0890135611e9c816122dd565b809150509295985092959890939650565b60008060408385031215611ebf578182fd5b8235611eca816122dd565b9150602083013567ffffffffffffffff80821115611ee6578283fd5b818501915085601f830112611ef9578283fd5b813581811115611f0b57611f0b6122c7565b604051601f8201601f19908116603f01168101908382118183101715611f3357611f336122c7565b81604052828152886020848701011115611f4b578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215611f7e578182fd5b8235611f89816122dd565b946020939093013593505050565b600060208284031215611fa8578081fd5b81518015158114611999578182fd5b600060208284031215611fc8578081fd5b5035919050565b60008060408385031215611fe1578182fd5b823591506020830135611ff3816122dd565b809150509250929050565b60006020828403121561200f578081fd5b81356001600160e01b031981168114611999578182fd5b600060208284031215612037578081fd5b5051919050565b60008060408385031215612050578182fd5b50508035926020909101359150565b6000825161207181846020870161226a565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516120b381601785016020880161226a565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120e481602884016020880161226a565b01602801949350505050565b606080825284519082018190526000906020906080840190828801845b828110156121325781516001600160a01b03168452928401929084019060010161210d565b50505090830194909452506001600160a01b0391909116604090910152919050565b600060208252825180602084015261217381604085016020870161226a565b601f01601f19169190910160400192915050565b6020808252600d908201526c139bdd081b1bdb99d4da1bdc9d609a1b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000821982111561220f5761220f6122b1565b500190565b60008261222f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561224e5761224e6122b1565b500290565b600082821015612265576122656122b1565b500390565b60005b8381101561228557818101518382015260200161226d565b83811115612294576000848401525b50505050565b6000816122a9576122a96122b1565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146106c757600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122061c70aab4ceb80431078b3b8a133042e3380167471ee409f8beb381cd0e586b464736f6c63430008030033", + "devdoc": { + "details": "https://docs.aave.com/portal/", + "kind": "dev", + "methods": { + "claimAaveRewardsToTreasury()": { + "details": "This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued" + }, + "depositPaymentToken(uint256)": { + "params": { + "amount": "Amount of payment token to deposit" + } + }, + "distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)": { + "details": "treasuryPercent = 1 - marketPercent", + "params": { + "totalValueRealizedForMarket": "total value of long and short side of the market", + "treasuryYieldPercent_e18": "Percentage of yield in base 1e18 that is allocated to the treasury" + }, + "returns": { + "_0": "The market allocation of the yield" + } + }, + "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,address,address,address,address,address,uint16,address)": { + "details": "referral code will be set to 0, depricated Aave feature", + "params": { + "_aToken": "address of the interest accruing token linked to the payment token", + "_aaveReferralCode": "unique code for aave referrals", + "_admin": "admin for the contract", + "_lendingPoolAddressesProvider": "address of the aave lending pool address provider contract", + "_longShort": "address of the longShort contract", + "_paymentToken": "address of the payment token", + "_treasury": "address of the treasury contract" + } + }, + "removePaymentTokenFromMarket(uint256)": { + "details": "This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave. This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.", + "params": { + "amount": "Amount of payment token to withdraw" + } + }, + "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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "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." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "transferPaymentTokensToUser(address,uint256)": { + "params": { + "amount": "Amount of payment token to pay to user", + "user": "User to recieve the payout" + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "stateVariables": { + "aToken": { + "details": "ADAI token" + }, + "amountReservedInCaseOfInsufficientAaveLiquidity": { + "details": "This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal. In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available." + }, + "paymentToken": { + "details": "DAI token" + }, + "referralCode": { + "details": "An aave specific referralCode that has been a depricated feature. This will be set to 0 for \"no referral\" at deployment" + } + }, + "title": "YieldManagerAave", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "aToken()": { + "notice": "The token representing the interest accruing payment token position from Aave" + }, + "aaveIncentivesController()": { + "notice": "The specific Aave incentives controller contract" + }, + "claimAaveRewardsToTreasury()": { + "notice": "Allows for withdrawal of aave rewards to the treasury contract" + }, + "depositPaymentToken(uint256)": { + "notice": "Allows the LongShort contract to deposit tokens into the aave pool" + }, + "distributeYieldForTreasuryAndReturnMarketAllocation(uint256,uint256)": { + "notice": "Calculates and updates the yield allocation to the treasury and the market" + }, + "initialize(address,address,address,address,address,address,uint16,address)": { + "notice": "Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts" + }, + "initializeForMarket()": { + "notice": "Initializes a specific yield manager to a given market" + }, + "isInitialized()": { + "notice": "boolean to prevent markets using an already initialized market" + }, + "lendingPoolAddressesProvider()": { + "notice": "The specific Aave lending pool address provider contract" + }, + "longShort()": { + "notice": "address of longShort contract" + }, + "paymentToken()": { + "notice": "The payment token the yield manager supports" + }, + "removePaymentTokenFromMarket(uint256)": { + "notice": "Allows the LongShort contract to redeem aTokens for the payment token" + }, + "totalReservedForTreasury()": { + "notice": "distributed yield not yet transferred to the treasury" + }, + "transferPaymentTokensToUser(address,uint256)": { + "notice": "Allows the LongShort pay out a user from tokens already withdrawn from Aave" + }, + "treasury()": { + "notice": "address of treasury contract - this is the address that can claim aave incentives rewards" + }, + "withdrawTreasuryFunds()": { + "notice": "Withdraw treasury allocated accrued yield from the lending pool to the treasury contract" + } + }, + "notice": "contract is used to manage the yield generated by the underlying tokens. YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol. Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that continuously accrues interest based on a lend/borrow liquidity ratio.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1102, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1105, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3537, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4436, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 304, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)299_storage)" + }, + { + "astId": 589, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1085, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1218, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 17251, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "longShort", + "offset": 0, + "slot": "251", + "type": "t_address" + }, + { + "astId": 17254, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "treasury", + "offset": 0, + "slot": "252", + "type": "t_address" + }, + { + "astId": 17257, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "isInitialized", + "offset": 20, + "slot": "252", + "type": "t_bool" + }, + { + "astId": 17261, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "paymentToken", + "offset": 0, + "slot": "253", + "type": "t_contract(IERC20)7293" + }, + { + "astId": 17265, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "aToken", + "offset": 0, + "slot": "254", + "type": "t_contract(IERC20Upgradeable)1983" + }, + { + "astId": 17269, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "lendingPoolAddressesProvider", + "offset": 0, + "slot": "255", + "type": "t_contract(ILendingPoolAddressesProvider)18899" + }, + { + "astId": 17273, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "aaveIncentivesController", + "offset": 0, + "slot": "256", + "type": "t_contract(IAaveIncentivesController)18512" + }, + { + "astId": 17276, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "referralCode", + "offset": 20, + "slot": "256", + "type": "t_uint16" + }, + { + "astId": 17280, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "totalReservedForTreasury", + "offset": 0, + "slot": "257", + "type": "t_uint256" + }, + { + "astId": 17283, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "amountReservedInCaseOfInsufficientAaveLiquidity", + "offset": 0, + "slot": "258", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IAaveIncentivesController)18512": { + "encoding": "inplace", + "label": "contract IAaveIncentivesController", + "numberOfBytes": "20" + }, + "t_contract(IERC20)7293": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_contract(IERC20Upgradeable)1983": { + "encoding": "inplace", + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(ILendingPoolAddressesProvider)18899": { + "encoding": "inplace", + "label": "contract ILendingPoolAddressesProvider", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(RoleData)299_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)299_storage" + }, + "t_struct(RoleData)299_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 296, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 298, + "contract": "contracts/YieldManagerAave.sol:YieldManagerAave", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/polygon/YieldManagerF3_Proxy.json b/deployments/polygon/YieldManagerF3_Proxy.json new file mode 100644 index 0000000..408c7f4 --- /dev/null +++ b/deployments/polygon/YieldManagerF3_Proxy.json @@ -0,0 +1,206 @@ +{ + "address": "0xce5da4bebBA980BeC39da5b118750A47a23D4B85", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "receipt": { + "to": null, + "from": "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "contractAddress": "0xce5da4bebBA980BeC39da5b118750A47a23D4B85", + "transactionIndex": 23, + "gasUsed": "525546", + "logsBloom": "0x00000004000000000000000000000000400000000000000000000000400000080000004000000000000000008000000000008000000000002000000000600000000000000000000000000800200002800000000020000000000300000000000000000000020022000100000000000800000000000000000880014000000000000000400000000000000004000000004000000000800010000000080000000000220000000000000000000000000000000000100000000000001000000000004080000120000008000001000000000000000000000000800100100000000020000090000000000200000000000000000000000000000000000000040000100000", + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4", + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "logs": [ + { + "transactionIndex": 23, + "blockNumber": 19059812, + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "address": "0xce5da4bebBA980BeC39da5b118750A47a23D4B85", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000009d638d66bc4eaa770bd091e9c2339fb39af70168" + ], + "data": "0x", + "logIndex": 125, + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4" + }, + { + "transactionIndex": 23, + "blockNumber": 19059812, + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "address": "0xce5da4bebBA980BeC39da5b118750A47a23D4B85", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 126, + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4" + }, + { + "transactionIndex": 23, + "blockNumber": 19059812, + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "address": "0xce5da4bebBA980BeC39da5b118750A47a23D4B85", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 127, + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4" + }, + { + "transactionIndex": 23, + "blockNumber": 19059812, + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "address": "0xce5da4bebBA980BeC39da5b118750A47a23D4B85", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9" + ], + "data": "0x", + "logIndex": 128, + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4" + }, + { + "transactionIndex": 23, + "blockNumber": 19059812, + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "address": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000ce5da4bebba980bec39da5b118750a47a23d4b85", + "0x0000000000000000000000008dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf" + ], + "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "logIndex": 129, + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4" + }, + { + "transactionIndex": 23, + "blockNumber": 19059812, + "transactionHash": "0x618f3236921a16d207b9c03ef4076e33a12a27c0e290f0da43c1d98ce47fea86", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000921c380d6047f09a4e61d29d1fc054fb52259ca9", + "0x000000000000000000000000b79fad4ca981472442f53d16365fdf0305ffd8e9" + ], + "data": "0x0000000000000000000000000000000000000000000000000012abd0226e68000000000000000000000000000000000000000000000000000b6226c6ee5bab420000000000000000000000000000000000000000000043010141be1d4d5e51f10000000000000000000000000000000000000000000000000b4f7af6cbed4342000000000000000000000000000000000000000000004301015469ed6fccb9f1", + "logIndex": 130, + "blockHash": "0x98b2ee9c2777db49f5dc6066b17c2b10f73c5ce9a5b7465ba796429fe285f0c4" + } + ], + "blockNumber": 19059812, + "cumulativeGasUsed": "7201512", + "status": 1, + "byzantium": true + }, + "args": [ + "0x9D638d66bc4EaA770bD091E9C2339fB39Af70168", + "0x921c380d6047f09a4E61D29d1Fc054fB52259CA9", + "0x5d3a3890000000000000000000000000168a5d1217aecd258b03018d5bf1a1677a07b733000000000000000000000000eb1bb399997463d8fd0cb85c89da0fc9580064410000000000000000000000008f3cf7ad23cd3cadbd9735aff958023239c6a06300000000000000000000000027f8d03b3a2196956ed754badc28d73be8830a6e000000000000000000000000d05e3e715d945b59290df0ae8ef85c1bdb684744000000000000000000000000357d51124f59836ded84c8a1730d72b749d8bc230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cfccb5e6b3882b7795eb1b1a9f18831a842d4ee0" + ], + "solcInputHash": "52454279612323b6a360bfe353c18a08", + "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployment/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xca2eb23a188f213d914fad982985d07e491dbc9960a387d4469bfce5c48911b1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.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 _upgradeToAndCallSecure(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n address oldImplementation = _getImplementation();\\n\\n // Initial upgrade and setup call\\n _setImplementation(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n\\n // Perform rollback test if not already in progress\\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\\n if (!rollbackTesting.value) {\\n // Trigger rollback using upgradeTo from the new implementation\\n rollbackTesting.value = true;\\n Address.functionDelegateCall(\\n newImplementation,\\n abi.encodeWithSignature(\\\"upgradeTo(address)\\\", oldImplementation)\\n );\\n rollbackTesting.value = false;\\n // Check rollback was effective\\n require(oldImplementation == _getImplementation(), \\\"ERC1967Upgrade: upgrade breaks further upgrades\\\");\\n // Finally reset to the new implementation and log the upgrade\\n _upgradeTo(newImplementation);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcbccf806d646bd9e2594650917208245d45998b887d5fc914de424247f5f9f9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 internall 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\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5615339d191e77be7e46319b67856f9355786f705b7b3c4a7237ab70c1864ab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/deployment/UUPSProxy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\\ncontract UUPSProxy is ERC1967Proxy {\\n constructor(\\n address _logic,\\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {}\\n}\\n\",\"keccak256\":\"0x109f7ae9ed2dafd1e303caa3598acca07286d1a92c0507fd44ad2ce097449cee\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x60806040526040516107a83803806107a88339810160408190526100229161032a565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610445565b6000805160206107618339815191521461007957634e487b7160e01b600052600160045260246000fd5b6100858282600061008f565b50505050506104aa565b610098836100c5565b6000825111806100a55750805b156100c0576100be838361010560201b6100291760201c565b505b505050565b6100ce81610131565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061012a8383604051806060016040528060278152602001610781602791396101f1565b9392505050565b610144816102cd60201b6100551760201c565b6101ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101d060008051602061076183398151915260001b6102d760201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101fc846102cd565b6102575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101a2565b600080856001600160a01b03168560405161027291906103f6565b600060405180830381855af49150503d80600081146102ad576040519150601f19603f3d011682016040523d82523d6000602084013e6102b2565b606091505b5090925090506102c38282866102da565b9695505050505050565b803b15155b919050565b90565b606083156102e957508161012a565b8251156102f95782518084602001fd5b8160405162461bcd60e51b81526004016101a29190610412565b80516001600160a01b03811681146102d257600080fd5b60008060006060848603121561033e578283fd5b61034784610313565b925061035560208501610313565b60408501519092506001600160401b0380821115610371578283fd5b818601915086601f830112610384578283fd5b81518181111561039657610396610494565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610494565b816040528281528960208487010111156103d6578586fd5b6103e7836020830160208801610468565b80955050505050509250925092565b60008251610408818460208701610468565b9190910192915050565b6000602082528251806020840152610431816040850160208701610468565b601f01601f19169190910160400192915050565b60008282101561046357634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048357818101518382015260200161046b565b838111156100be5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104b96000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b600060208252825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122074d997a693dfb7b17b632a53e320829bb8f5bd102dc06adbc3dce150b3e92d5a64736f6c63430008030033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/polygon/solcInputs/52454279612323b6a360bfe353c18a08.json b/deployments/polygon/solcInputs/52454279612323b6a360bfe353c18a08.json new file mode 100644 index 0000000..47f7eb3 --- /dev/null +++ b/deployments/polygon/solcInputs/52454279612323b6a360bfe353c18a08.json @@ -0,0 +1,355 @@ +{ + "language": "Solidity", + "sources": { + "contracts/abstract/AccessControlledAndUpgradeable.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\nabstract contract AccessControlledAndUpgradeable is\n Initializable,\n AccessControlUpgradeable,\n UUPSUpgradeable\n{\n bytes32 public constant UPGRADER_ROLE = keccak256(\"UPGRADER_ROLE\");\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\");\n\n /// @notice Initializes the contract when called by parent initializers.\n /// @param initialAdmin The initial admin who will hold all roles.\n function _AccessControlledAndUpgradeable_init(address initialAdmin) internal initializer {\n __AccessControl_init();\n __UUPSUpgradeable_init();\n _AccessControlledAndUpgradeable_init_unchained(initialAdmin);\n }\n\n /// @notice Initializes the contract for contracts that already call both __AccessControl_init\n /// and _UUPSUpgradeable_init when initializing.\n /// @param initialAdmin The initial admin who will hold all roles.\n function _AccessControlledAndUpgradeable_init_unchained(address initialAdmin)\n internal\n initializer\n {\n require(initialAdmin != address(0));\n _setupRole(DEFAULT_ADMIN_ROLE, initialAdmin);\n _setupRole(ADMIN_ROLE, initialAdmin);\n _setupRole(UPGRADER_ROLE, initialAdmin);\n }\n\n /// @notice Authorizes an upgrade to a new address.\n /// @dev Can only be called by addresses wih UPGRADER_ROLE\n function _authorizeUpgrade(address) internal override onlyRole(UPGRADER_ROLE) {}\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\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, _msgSender());\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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967UpgradeUpgradeable.sol\";\nimport \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\n function __UUPSUpgradeable_init() internal initializer {\n __ERC1967Upgrade_init_unchained();\n __UUPSUpgradeable_init_unchained();\n }\n\n function __UUPSUpgradeable_init_unchained() internal initializer {\n }\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeTo(address newImplementation) external virtual {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallSecure(newImplementation, bytes(\"\"), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n * encoded in `data`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallSecure(newImplementation, data, true);\n }\n\n /**\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n * {upgradeTo} and {upgradeToAndCall}.\n *\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n *\n * ```solidity\n * function _authorizeUpgrade(address) internal override onlyOwner {}\n * ```\n */\n function _authorizeUpgrade(address newImplementation) internal virtual;\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeaconUpgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/StorageSlotUpgradeable.sol\";\nimport \"../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable {\n function __ERC1967Upgrade_init() internal initializer {\n __ERC1967Upgrade_init_unchained();\n }\n\n function __ERC1967Upgrade_init_unchained() internal initializer {\n }\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlotUpgradeable.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 _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 _upgradeToAndCallSecure(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n address oldImplementation = _getImplementation();\n\n // Initial upgrade and setup call\n _setImplementation(newImplementation);\n if (data.length > 0 || forceCall) {\n _functionDelegateCall(newImplementation, data);\n }\n\n // Perform rollback test if not already in progress\n StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\n if (!rollbackTesting.value) {\n // Trigger rollback using upgradeTo from the new implementation\n rollbackTesting.value = true;\n _functionDelegateCall(\n newImplementation,\n abi.encodeWithSignature(\"upgradeTo(address)\", oldImplementation)\n );\n rollbackTesting.value = false;\n // Check rollback was effective\n require(oldImplementation == _getImplementation(), \"ERC1967Upgrade: upgrade breaks further upgrades\");\n // Finally reset to the new implementation and log the upgrade\n _upgradeTo(newImplementation);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlotUpgradeable.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 _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\n }\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(address target, bytes memory data) private returns (bytes memory) {\n require(AddressUpgradeable.isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return AddressUpgradeable.verifyCallResult(success, returndata, \"Address: low-level delegate call failed\");\n }\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeaconUpgradeable {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 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 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" + }, + "@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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 StorageSlotUpgradeable {\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" + }, + "contracts/YieldManagerAave.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\nimport \"hardhat/console.sol\";\n\nimport \"./interfaces/IYieldManager.sol\";\nimport \"./interfaces/aave/ILendingPool.sol\";\nimport \"./interfaces/aave/ILendingPoolAddressesProvider.sol\";\nimport \"./interfaces/aave/IAaveIncentivesController.sol\";\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\n\n/** @title YieldManagerAave\n @notice contract is used to manage the yield generated by the underlying tokens.\n YieldManagerAave is an implementation of a yield manager that earns APY from the Aave protocol.\n Each fund's payment token (such as DAI) has a corresponding aToken (such as aDAI) that\n continuously accrues interest based on a lend/borrow liquidity ratio.\n @dev https://docs.aave.com/portal/\n */\ncontract YieldManagerAave is IYieldManager, AccessControlledAndUpgradeable {\n /*╔═════════════════════════════╗\n ║ VARIABLES ║\n ╚═════════════════════════════╝*/\n\n /// @notice address of longShort contract\n address public longShort;\n /// @notice address of treasury contract - this is the address that can claim aave incentives rewards\n address public treasury;\n\n /// @notice boolean to prevent markets using an already initialized market\n bool public isInitialized;\n\n /// @notice The payment token the yield manager supports\n /// @dev DAI token\n IERC20 public paymentToken;\n /// @notice The token representing the interest accruing payment token position from Aave\n /// @dev ADAI token\n IERC20Upgradeable public aToken;\n /// @notice The specific Aave lending pool address provider contract\n ILendingPoolAddressesProvider public lendingPoolAddressesProvider;\n /// @notice The specific Aave incentives controller contract\n IAaveIncentivesController public aaveIncentivesController;\n\n /// @dev An aave specific referralCode that has been a depricated feature. This will be set to 0 for \"no referral\" at deployment\n uint16 referralCode;\n\n /// @notice distributed yield not yet transferred to the treasury\n uint256 public override totalReservedForTreasury;\n\n /// @dev This value will likely remain zero forever. It exists to handle the rare edge case that Aave doesn't have enough liquidity for a withdrawal.\n /// In this case this variable would keep track of that so that the withdrawal can happen after the fact when liquidity becomes available.\n uint256 public amountReservedInCaseOfInsufficientAaveLiquidity;\n\n /*╔═════════════════════════════╗\n ║ MODIFIERS ║\n ╚═════════════════════════════╝*/\n\n /// @dev only allow longShort contract to execute modified functions\n modifier longShortOnly() {\n require(msg.sender == longShort, \"Not longShort\");\n _;\n }\n\n /*╔═════════════════════════════╗\n ║ CONTRACT SET-UP ║\n ╚═════════════════════════════╝*/\n\n /**\n @notice Constructor for initializing the aave yield manager with a given payment token and corresponding Aave contracts\n @param _longShort address of the longShort contract\n @param _treasury address of the treasury contract\n @param _paymentToken address of the payment token\n @param _aToken address of the interest accruing token linked to the payment token\n @param _lendingPoolAddressesProvider address of the aave lending pool address provider contract\n @param _aaveReferralCode unique code for aave referrals\n @param _admin admin for the contract\n @dev referral code will be set to 0, depricated Aave feature\n */\n function initialize(\n address _longShort,\n address _treasury,\n address _paymentToken,\n address _aToken,\n address _lendingPoolAddressesProvider,\n address _aaveIncentivesController,\n uint16 _aaveReferralCode,\n address _admin\n ) external initializer {\n require(\n _longShort != address(0) &&\n _treasury != address(0) &&\n _paymentToken != address(0) &&\n _aToken != address(0) &&\n _lendingPoolAddressesProvider != address(0) &&\n _aaveIncentivesController != address(0) &&\n _admin != address(0)\n );\n\n longShort = _longShort;\n treasury = _treasury;\n\n _AccessControlledAndUpgradeable_init(_admin);\n\n referralCode = _aaveReferralCode;\n\n paymentToken = IERC20(_paymentToken);\n aToken = IERC20Upgradeable(_aToken);\n lendingPoolAddressesProvider = ILendingPoolAddressesProvider(_lendingPoolAddressesProvider);\n aaveIncentivesController = IAaveIncentivesController(_aaveIncentivesController);\n\n // Approve tokens for aave lending pool maximally.\n IERC20(_paymentToken).approve(\n ILendingPoolAddressesProvider(_lendingPoolAddressesProvider).getLendingPool(),\n type(uint256).max\n );\n }\n\n function updateLatestLendingPoolAddress() external {\n IERC20(paymentToken).approve(lendingPoolAddressesProvider.getLendingPool(), type(uint256).max);\n }\n\n /*╔════════════════════════╗\n ║ IMPLEMENTATION ║\n ╚════════════════════════╝*/\n\n /**\n @notice Allows the LongShort contract to deposit tokens into the aave pool\n @param amount Amount of payment token to deposit\n */\n function depositPaymentToken(uint256 amount) external override longShortOnly {\n // If amountReservedInCaseOfInsufficientAaveLiquidity isn't zero, then efficiently net the difference between the amount\n // It basically always be zero besides extreme and unlikely situations with aave.\n if (amountReservedInCaseOfInsufficientAaveLiquidity != 0) {\n if (amountReservedInCaseOfInsufficientAaveLiquidity >= amount) {\n amountReservedInCaseOfInsufficientAaveLiquidity -= amount;\n // Return early, nothing to deposit into the lending pool\n return;\n } else {\n amount -= amountReservedInCaseOfInsufficientAaveLiquidity;\n amountReservedInCaseOfInsufficientAaveLiquidity = 0;\n }\n }\n\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).deposit(\n address(paymentToken),\n amount,\n address(this),\n referralCode\n );\n }\n\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\n /// @param user User to recieve the payout\n /// @param amount Amount of payment token to pay to user\n function transferPaymentTokensToUser(address user, uint256 amount)\n external\n override\n longShortOnly\n {\n try paymentToken.transfer(user, amount) returns (bool transferSuccess) {\n if (transferSuccess) {\n // If the transfer is successful return early, otherwise try pay the user out with the amountReservedInCaseOfInsufficientAaveLiquidity\n return;\n }\n } catch {}\n\n amountReservedInCaseOfInsufficientAaveLiquidity -= amount;\n\n // If this reverts (ie aave unable to make payout), then the whole transaction will revert. User will have to wait until sufficient liquidity available.\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\n address(paymentToken),\n amount,\n user\n );\n }\n\n /// @notice Allows the LongShort contract to redeem aTokens for the payment token\n /// @param amount Amount of payment token to withdraw\n /// @dev This will update the amountReservedInCaseOfInsufficientAaveLiquidity if not enough liquidity is avaiable on aave.\n /// This means that our system can continue to operate even if there is insufficient liquidity in Aave for any reason.\n function removePaymentTokenFromMarket(uint256 amount) external override longShortOnly {\n try\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\n address(paymentToken),\n amount,\n address(this)\n )\n {} catch {\n // In theory we should only catch `VL_CURRENT_AVAILABLE_LIQUIDITY_NOT_ENOUGH` errors.\n // Safe to revert on all errors, if aave completely blocks withdrawals the amountReservedInCaseOfInsufficientAaveLiquidity can grow until it is fixed without problems.\n amountReservedInCaseOfInsufficientAaveLiquidity += amount;\n }\n }\n\n /**\n @notice Allows for withdrawal of aave rewards to the treasury contract\n @dev This is specifically implemented to allow withdrawal of aave reward wMatic tokens accrued\n */\n function claimAaveRewardsToTreasury() external {\n IAaveIncentivesController _aaveIncentivesController = IAaveIncentivesController(\n aaveIncentivesController\n );\n uint256 amount = _aaveIncentivesController.getUserUnclaimedRewards(address(this));\n\n address[] memory aTokenAddresses = new address[](1);\n aTokenAddresses[0] = address(aToken);\n\n _aaveIncentivesController.claimRewards(aTokenAddresses, amount, treasury);\n\n emit ClaimAaveRewardTokenToTreasury(amount);\n }\n\n /**\n @notice Calculates and updates the yield allocation to the treasury and the market\n @dev treasuryPercent = 1 - marketPercent\n @param totalValueRealizedForMarket total value of long and short side of the market\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\n @return The market allocation of the yield\n */\n function distributeYieldForTreasuryAndReturnMarketAllocation(\n uint256 totalValueRealizedForMarket,\n uint256 treasuryYieldPercent_e18\n ) external override longShortOnly returns (uint256) {\n uint256 totalHeld = aToken.balanceOf(address(this));\n uint256 _totalReservedForTreasury = totalReservedForTreasury;\n\n uint256 totalRealized = totalValueRealizedForMarket +\n _totalReservedForTreasury +\n amountReservedInCaseOfInsufficientAaveLiquidity;\n\n if (totalRealized == totalHeld) {\n return 0;\n }\n\n // will revert in case totalRealized > totalHeld which should never occur since yield is always possitive with aave.\n uint256 unrealizedYield = totalHeld - totalRealized;\n\n uint256 amountForTreasury = (unrealizedYield * treasuryYieldPercent_e18) / 1e18;\n uint256 amountForMarketIncentives = unrealizedYield - amountForTreasury;\n\n totalReservedForTreasury = _totalReservedForTreasury + amountForTreasury;\n\n emit YieldDistributed(unrealizedYield, treasuryYieldPercent_e18);\n\n return amountForMarketIncentives;\n }\n\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\n function withdrawTreasuryFunds() external override {\n uint256 amountToWithdrawForTreasury = totalReservedForTreasury;\n totalReservedForTreasury = 0;\n\n // Redeem aToken for payment tokens.\n ILendingPool(lendingPoolAddressesProvider.getLendingPool()).withdraw(\n address(paymentToken),\n amountToWithdrawForTreasury,\n treasury\n );\n\n emit WithdrawTreasuryFunds();\n }\n\n /// @notice Initializes a specific yield manager to a given market\n function initializeForMarket() external override longShortOnly {\n require(!isInitialized, \"Yield Manager is already in use\");\n isInitialized = true;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n /**\n * @dev 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" + }, + "hardhat/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >= 0.4.22 <0.9.0;\n\nlibrary console {\n\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n\tfunction _sendLogPayload(bytes memory payload) private view {\n\t\tuint256 payloadLength = payload.length;\n\t\taddress consoleAddress = CONSOLE_ADDRESS;\n\t\tassembly {\n\t\t\tlet payloadStart := add(payload, 32)\n\t\t\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n\t\t}\n\t}\n\n\tfunction log() internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log()\"));\n\t}\n\n\tfunction logInt(int p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n\t}\n\n\tfunction logUint(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction logString(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction logBool(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction logAddress(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction logBytes(bytes memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n\t}\n\n\tfunction logBytes1(bytes1 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n\t}\n\n\tfunction logBytes2(bytes2 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n\t}\n\n\tfunction logBytes3(bytes3 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n\t}\n\n\tfunction logBytes4(bytes4 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n\t}\n\n\tfunction logBytes5(bytes5 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n\t}\n\n\tfunction logBytes6(bytes6 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n\t}\n\n\tfunction logBytes7(bytes7 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n\t}\n\n\tfunction logBytes8(bytes8 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n\t}\n\n\tfunction logBytes9(bytes9 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n\t}\n\n\tfunction logBytes10(bytes10 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n\t}\n\n\tfunction logBytes11(bytes11 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n\t}\n\n\tfunction logBytes12(bytes12 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n\t}\n\n\tfunction logBytes13(bytes13 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n\t}\n\n\tfunction logBytes14(bytes14 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n\t}\n\n\tfunction logBytes15(bytes15 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n\t}\n\n\tfunction logBytes16(bytes16 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n\t}\n\n\tfunction logBytes17(bytes17 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n\t}\n\n\tfunction logBytes18(bytes18 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n\t}\n\n\tfunction logBytes19(bytes19 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n\t}\n\n\tfunction logBytes20(bytes20 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n\t}\n\n\tfunction logBytes21(bytes21 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n\t}\n\n\tfunction logBytes22(bytes22 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n\t}\n\n\tfunction logBytes23(bytes23 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n\t}\n\n\tfunction logBytes24(bytes24 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n\t}\n\n\tfunction logBytes25(bytes25 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n\t}\n\n\tfunction logBytes26(bytes26 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n\t}\n\n\tfunction logBytes27(bytes27 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n\t}\n\n\tfunction logBytes28(bytes28 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n\t}\n\n\tfunction logBytes29(bytes29 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n\t}\n\n\tfunction logBytes30(bytes30 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n\t}\n\n\tfunction logBytes31(bytes31 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n\t}\n\n\tfunction logBytes32(bytes32 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n\t}\n\n\tfunction log(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction log(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction log(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction log(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction log(uint p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n\t}\n\n\tfunction log(address p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n\t}\n\n\tfunction log(address p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n\t}\n\n\tfunction log(address p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n\t}\n\n\tfunction log(address p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n}\n" + }, + "contracts/interfaces/IYieldManager.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\n/// @notice Manages yield accumulation for the LongShort contract. Each market is deployed with its own yield manager to simplify the bookkeeping, as different markets may share a payment token and yield pool.\nabstract contract IYieldManager {\n event ClaimAaveRewardTokenToTreasury(uint256 amount);\n\n event YieldDistributed(uint256 unrealizedYield, uint256 treasuryYieldPercent_e18);\n\n /// @dev This is purely saving some gas, but the subgraph will know how much is due for the treasury at all times - no need to include in event.\n event WithdrawTreasuryFunds();\n\n /// @notice distributed yield not yet transferred to the treasury\n function totalReservedForTreasury() external virtual returns (uint256);\n\n /// @notice Deposits the given amount of payment tokens into this yield manager.\n /// @param amount Amount of payment token to deposit\n function depositPaymentToken(uint256 amount) external virtual;\n\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\n /// @param user User to recieve the payout\n /// @param amount Amount of payment token to pay to user\n function transferPaymentTokensToUser(address user, uint256 amount) external virtual;\n\n /// @notice Withdraws the given amount of tokens from this yield manager.\n /// @param amount Amount of payment token to withdraw\n function removePaymentTokenFromMarket(uint256 amount) external virtual;\n\n /** \n @notice Calculates and updates the yield allocation to the treasury and the market\n @dev treasuryPercent = 1 - marketPercent\n @param totalValueRealizedForMarket total value of long and short side of the market\n @param treasuryYieldPercent_e18 Percentage of yield in base 1e18 that is allocated to the treasury\n @return amountForMarketIncentives The market allocation of the yield\n */\n function distributeYieldForTreasuryAndReturnMarketAllocation(\n uint256 totalValueRealizedForMarket,\n uint256 treasuryYieldPercent_e18\n ) external virtual returns (uint256 amountForMarketIncentives);\n\n /// @notice Withdraw treasury allocated accrued yield from the lending pool to the treasury contract\n function withdrawTreasuryFunds() external virtual;\n\n /// @notice Initializes a specific yield manager to a given market\n function initializeForMarket() external virtual;\n}\n" + }, + "contracts/interfaces/aave/ILendingPool.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.3;\n\nimport {ILendingPoolAddressesProvider} from \"./ILendingPoolAddressesProvider.sol\";\nimport {DataTypes} from \"./DataTypes.sol\";\n\ninterface ILendingPool {\n /**\n * @dev Emitted on deposit()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address initiating the deposit\n * @param onBehalfOf The beneficiary of the deposit, receiving the aTokens\n * @param amount The amount deposited\n * @param referral The referral code used\n **/\n event Deposit(\n address indexed reserve,\n address user,\n address indexed onBehalfOf,\n uint256 amount,\n uint16 indexed referral\n );\n\n /**\n * @dev Emitted on withdraw()\n * @param reserve The address of the underlyng asset being withdrawn\n * @param user The address initiating the withdrawal, owner of aTokens\n * @param to Address that will receive the underlying\n * @param amount The amount to be withdrawn\n **/\n event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);\n\n /**\n * @dev Emitted on borrow() and flashLoan() when debt needs to be opened\n * @param reserve The address of the underlying asset being borrowed\n * @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just\n * initiator of the transaction on flashLoan()\n * @param onBehalfOf The address that will be getting the debt\n * @param amount The amount borrowed out\n * @param borrowRateMode The rate mode: 1 for Stable, 2 for Variable\n * @param borrowRate The numeric rate at which the user has borrowed\n * @param referral The referral code used\n **/\n event Borrow(\n address indexed reserve,\n address user,\n address indexed onBehalfOf,\n uint256 amount,\n uint256 borrowRateMode,\n uint256 borrowRate,\n uint16 indexed referral\n );\n\n /**\n * @dev Emitted on repay()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The beneficiary of the repayment, getting his debt reduced\n * @param repayer The address of the user initiating the repay(), providing the funds\n * @param amount The amount repaid\n **/\n event Repay(\n address indexed reserve,\n address indexed user,\n address indexed repayer,\n uint256 amount\n );\n\n /**\n * @dev Emitted on swapBorrowRateMode()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address of the user swapping his rate mode\n * @param rateMode The rate mode that the user wants to swap to\n **/\n event Swap(address indexed reserve, address indexed user, uint256 rateMode);\n\n /**\n * @dev Emitted on setUserUseReserveAsCollateral()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address of the user enabling the usage as collateral\n **/\n event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);\n\n /**\n * @dev Emitted on setUserUseReserveAsCollateral()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address of the user enabling the usage as collateral\n **/\n event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);\n\n /**\n * @dev Emitted on rebalanceStableBorrowRate()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address of the user for which the rebalance has been executed\n **/\n event RebalanceStableBorrowRate(address indexed reserve, address indexed user);\n\n /**\n * @dev Emitted on flashLoan()\n * @param target The address of the flash loan receiver contract\n * @param initiator The address initiating the flash loan\n * @param asset The address of the asset being flash borrowed\n * @param amount The amount flash borrowed\n * @param premium The fee flash borrowed\n * @param referralCode The referral code used\n **/\n event FlashLoan(\n address indexed target,\n address indexed initiator,\n address indexed asset,\n uint256 amount,\n uint256 premium,\n uint16 referralCode\n );\n\n /**\n * @dev Emitted when the pause is triggered.\n */\n event Paused();\n\n /**\n * @dev Emitted when the pause is lifted.\n */\n event Unpaused();\n\n /**\n * @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via\n * LendingPoolCollateral manager using a DELEGATECALL\n * This allows to have the events in the generated ABI for LendingPool.\n * @param collateralAsset The address of the underlying asset used as collateral,\n * to receive as result of the liquidation.\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\n * @param user The address of the borrower getting liquidated\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\n * @param liquidatedCollateralAmount The amount of collateral received by the liiquidator\n * @param liquidator The address of the liquidator\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\n * to receive the underlying collateral asset directly\n **/\n event LiquidationCall(\n address indexed collateralAsset,\n address indexed debtAsset,\n address indexed user,\n uint256 debtToCover,\n uint256 liquidatedCollateralAmount,\n address liquidator,\n bool receiveAToken\n );\n\n /**\n * @dev Emitted when the state of a reserve is updated. NOTE: This event is actually declared\n * in the ReserveLogic library and emitted in the updateInterestRates() function. Since the function is internal,\n * the event will actually be fired by the LendingPool contract. The event is therefore replicated here so it\n * gets added to the LendingPool ABI\n * @param reserve The address of the underlying asset of the reserve\n * @param liquidityRate The new liquidity rate\n * @param stableBorrowRate The new stable borrow rate\n * @param variableBorrowRate The new variable borrow rate\n * @param liquidityIndex The new liquidity index\n * @param variableBorrowIndex The new variable borrow index\n **/\n event ReserveDataUpdated(\n address indexed reserve,\n uint256 liquidityRate,\n uint256 stableBorrowRate,\n uint256 variableBorrowRate,\n uint256 liquidityIndex,\n uint256 variableBorrowIndex\n );\n\n /**\n * @dev Deposits an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\n * - E.g. User deposits 100 USDC and gets in return 100 aUSDC\n * @param asset The address of the underlying asset to deposit\n * @param amount The amount to be deposited\n * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\n * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\n * is a different wallet\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n * 0 if the action is executed directly by the user, without any middle-man\n **/\n function deposit(\n address asset,\n uint256 amount,\n address onBehalfOf,\n uint16 referralCode\n ) external;\n\n /**\n * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned\n * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC\n * @param asset The address of the underlying asset to withdraw\n * @param amount The underlying amount to be withdrawn\n * - Send the value type(uint256).max in order to withdraw the whole aToken balance\n * @param to Address that will receive the underlying, same as msg.sender if the user\n * wants to receive it on his own wallet, or a different address if the beneficiary is a\n * different wallet\n * @return The final amount withdrawn\n **/\n function withdraw(\n address asset,\n uint256 amount,\n address to\n ) external returns (uint256);\n\n /**\n * @dev Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower\n * already deposited enough collateral, or he was given enough allowance by a credit delegator on the\n * corresponding debt token (StableDebtToken or VariableDebtToken)\n * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet\n * and 100 stable/variable debt tokens, depending on the `interestRateMode`\n * @param asset The address of the underlying asset to borrow\n * @param amount The amount to be borrowed\n * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n * 0 if the action is executed directly by the user, without any middle-man\n * @param onBehalfOf Address of the user who will receive the debt. Should be the address of the borrower itself\n * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator\n * if he has been given credit delegation allowance\n **/\n function borrow(\n address asset,\n uint256 amount,\n uint256 interestRateMode,\n uint16 referralCode,\n address onBehalfOf\n ) external;\n\n /**\n * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned\n * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address\n * @param asset The address of the borrowed underlying asset previously borrowed\n * @param amount The amount to repay\n * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\n * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable\n * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the\n * user calling the function if he wants to reduce/remove his own debt, or the address of any other\n * other borrower whose debt should be removed\n * @return The final amount repaid\n **/\n function repay(\n address asset,\n uint256 amount,\n uint256 rateMode,\n address onBehalfOf\n ) external returns (uint256);\n\n /**\n * @dev Allows a borrower to swap his debt between stable and variable mode, or viceversa\n * @param asset The address of the underlying asset borrowed\n * @param rateMode The rate mode that the user wants to swap to\n **/\n function swapBorrowRateMode(address asset, uint256 rateMode) external;\n\n /**\n * @dev Rebalances the stable interest rate of a user to the current stable rate defined on the reserve.\n * - Users can be rebalanced if the following conditions are satisfied:\n * 1. Usage ratio is above 95%\n * 2. the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate,\n * which means that too much has been borrowed at a stable rate and depositors are not earning enough\n * @param asset The address of the underlying asset borrowed\n * @param user The address of the user to be rebalanced\n **/\n function rebalanceStableBorrowRate(address asset, address user) external;\n\n /**\n * @dev Allows depositors to enable/disable a specific deposited asset as collateral\n * @param asset The address of the underlying asset deposited\n * @param useAsCollateral `true` if the user wants to use the deposit as collateral, `false` otherwise\n **/\n function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external;\n\n /**\n * @dev Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1\n * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives\n * a proportionally amount of the `collateralAsset` plus a bonus to cover market risk\n * @param collateralAsset The address of the underlying asset used as collateral,\n * to receive as result of the liquidation.\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\n * @param user The address of the borrower getting liquidated\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\n * to receive the underlying collateral asset directly\n **/\n function liquidationCall(\n address collateralAsset,\n address debtAsset,\n address user,\n uint256 debtToCover,\n bool receiveAToken\n ) external;\n\n /**\n * @dev Allows smartcontracts to access the liquidity of the pool within one transaction,\n * as long as the amount taken plus a fee is returned.\n * IMPORTANT There are security concerns for developers of flashloan receiver\n * contracts that must be kept into consideration.\n * For further details please visit https://developers.aave.com\n * @param receiverAddress The address of the contract receiving the funds,\n * implementing the IFlashLoanReceiver interface.\n * @param assets The addresses of the assets being flash-borrowed\n * @param amounts The amounts amounts being flash-borrowed\n * @param modes Types of the debt to open if the flash loan is not returned:\n * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver\n * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\n * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\n * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2\n * @param params Variadic packed params to pass to the receiver as extra information\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n * 0 if the action is executed directly by the user, without any middle-man\n **/\n function flashLoan(\n address receiverAddress,\n address[] calldata assets,\n uint256[] calldata amounts,\n uint256[] calldata modes,\n address onBehalfOf,\n bytes calldata params,\n uint16 referralCode\n ) external;\n\n /**\n * @dev Returns the user account data across all the reserves\n * @param user The address of the user\n * @return totalCollateralETH the total collateral in ETH of the user\n * @return totalDebtETH the total debt in ETH of the user\n * @return availableBorrowsETH the borrowing power left of the user\n * @return currentLiquidationThreshold the liquidation threshold of the user\n * @return ltv the loan to value of the user\n * @return healthFactor the current health factor of the user\n **/\n function getUserAccountData(address user)\n external\n view\n returns (\n uint256 totalCollateralETH,\n uint256 totalDebtETH,\n uint256 availableBorrowsETH,\n uint256 currentLiquidationThreshold,\n uint256 ltv,\n uint256 healthFactor\n );\n\n function initReserve(\n address reserve,\n address aTokenAddress,\n address stableDebtAddress,\n address variableDebtAddress,\n address interestRateStrategyAddress\n ) external;\n\n function setReserveInterestRateStrategyAddress(address reserve, address rateStrategyAddress)\n external;\n\n function setConfiguration(address reserve, uint256 configuration) external;\n\n /**\n * @dev Returns the configuration of the reserve\n * @param asset The address of the underlying asset of the reserve\n * @return The configuration of the reserve\n **/\n function getConfiguration(address asset)\n external\n view\n returns (DataTypes.ReserveConfigurationMap memory);\n\n /**\n * @dev Returns the configuration of the user across all the reserves\n * @param user The user address\n * @return The configuration of the user\n **/\n function getUserConfiguration(address user)\n external\n view\n returns (DataTypes.UserConfigurationMap memory);\n\n /**\n * @dev Returns the normalized income normalized income of the reserve\n * @param asset The address of the underlying asset of the reserve\n * @return The reserve's normalized income\n */\n function getReserveNormalizedIncome(address asset) external view returns (uint256);\n\n /**\n * @dev Returns the normalized variable debt per unit of asset\n * @param asset The address of the underlying asset of the reserve\n * @return The reserve normalized variable debt\n */\n function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);\n\n /**\n * @dev Returns the state and configuration of the reserve\n * @param asset The address of the underlying asset of the reserve\n * @return The state of the reserve\n **/\n function getReserveData(address asset) external view returns (DataTypes.ReserveData memory);\n\n function finalizeTransfer(\n address asset,\n address from,\n address to,\n uint256 amount,\n uint256 balanceFromAfter,\n uint256 balanceToBefore\n ) external;\n\n function getReservesList() external view returns (address[] memory);\n\n function getAddressesProvider() external view returns (ILendingPoolAddressesProvider);\n\n function setPause(bool val) external;\n\n function paused() external view returns (bool);\n}\n" + }, + "contracts/interfaces/aave/ILendingPoolAddressesProvider.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.3;\n\n/**\n * @title LendingPoolAddressesProvider contract\n * @dev Main registry of addresses part of or connected to the protocol, including permissioned roles\n * - Acting also as factory of proxies and admin of those, so with right to change its implementations\n * - Owned by the Aave Governance\n * @author Aave\n **/\ninterface ILendingPoolAddressesProvider {\n // event MarketIdSet(string newMarketId);\n // event LendingPoolUpdated(address indexed newAddress);\n // event ConfigurationAdminUpdated(address indexed newAddress);\n // event EmergencyAdminUpdated(address indexed newAddress);\n // event LendingPoolConfiguratorUpdated(address indexed newAddress);\n // event LendingPoolCollateralManagerUpdated(address indexed newAddress);\n // event PriceOracleUpdated(address indexed newAddress);\n // event LendingRateOracleUpdated(address indexed newAddress);\n // event ProxyCreated(bytes32 id, address indexed newAddress);\n // event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy);\n\n // function getMarketId() external view returns (string memory);\n\n // function setMarketId(string calldata marketId) external;\n\n // function setAddress(bytes32 id, address newAddress) external;\n\n // function setAddressAsProxy(bytes32 id, address impl) external;\n\n // function getAddress(bytes32 id) external view returns (address);\n\n function getLendingPool() external view returns (address);\n\n // function setLendingPoolImpl(address pool) external;\n\n // function getLendingPoolConfigurator() external view returns (address);\n\n // function setLendingPoolConfiguratorImpl(address configurator) external;\n\n // function getLendingPoolCollateralManager() external view returns (address);\n\n // function setLendingPoolCollateralManager(address manager) external;\n\n // function getPoolAdmin() external view returns (address);\n\n // function setPoolAdmin(address admin) external;\n\n // function getEmergencyAdmin() external view returns (address);\n\n // function setEmergencyAdmin(address admin) external;\n\n // function getPriceOracle() external view returns (address);\n\n // function setPriceOracle(address priceOracle) external;\n\n // function getLendingRateOracle() external view returns (address);\n\n // function setLendingRateOracle(address lendingRateOracle) external;\n}\n" + }, + "contracts/interfaces/aave/IAaveIncentivesController.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.3;\n\ninterface IAaveIncentivesController {\n event RewardsClaimed(address indexed user, address indexed to, uint256 amount);\n\n function claimRewards(\n address[] calldata assets,\n uint256 amount,\n address to\n ) external returns (uint256);\n\n function getUserUnclaimedRewards(address user) external view returns (uint256);\n}\n" + }, + "contracts/interfaces/aave/DataTypes.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.3;\n\nlibrary DataTypes {\n // refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.\n struct ReserveData {\n //stores the reserve configuration\n ReserveConfigurationMap configuration;\n //the liquidity index. Expressed in ray\n uint128 liquidityIndex;\n //variable borrow index. Expressed in ray\n uint128 variableBorrowIndex;\n //the current supply rate. Expressed in ray\n uint128 currentLiquidityRate;\n //the current variable borrow rate. Expressed in ray\n uint128 currentVariableBorrowRate;\n //the current stable borrow rate. Expressed in ray\n uint128 currentStableBorrowRate;\n uint40 lastUpdateTimestamp;\n //tokens addresses\n address aTokenAddress;\n address stableDebtTokenAddress;\n address variableDebtTokenAddress;\n //address of the interest rate strategy\n address interestRateStrategyAddress;\n //the id of the reserve. Represents the position in the list of the active reserves\n uint8 id;\n }\n\n struct ReserveConfigurationMap {\n //bit 0-15: LTV\n //bit 16-31: Liq. threshold\n //bit 32-47: Liq. bonus\n //bit 48-55: Decimals\n //bit 56: Reserve is active\n //bit 57: reserve is frozen\n //bit 58: borrowing is enabled\n //bit 59: stable rate borrowing enabled\n //bit 60-63: reserved\n //bit 64-79: reserve factor\n uint256 data;\n }\n\n struct UserConfigurationMap {\n uint256 data;\n }\n\n enum InterestRateMode {\n NONE,\n STABLE,\n VARIABLE\n }\n}\n" + }, + "contracts/mocks/YieldManagerMock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\";\n\nimport \"../interfaces/IYieldManager.sol\";\nimport \"../interfaces/aave/IAaveIncentivesController.sol\";\n\n/*\n * YieldManagerMock is an implementation of a yield manager that supports\n * configurable, deterministic token yields for testing. Note that the mock\n * needs to be able to mint the underlying token to simulate yield.\n */\ncontract YieldManagerMock is IYieldManager {\n // Admin contracts.\n address public admin;\n address public longShort;\n address public treasury;\n\n bool public isInitialized = false;\n\n // Fixed-precision scale for interest percentages and fees.\n uint256 public constant TEN_TO_THE_18 = 1e18;\n\n // Global state.\n ERC20PresetMinterPauser public token;\n ERC20PresetMinterPauser public tokenOtherRewardERC20;\n\n uint256 public override totalReservedForTreasury;\n uint256 public totalHeld;\n\n uint256 public yieldRate; // pcnt per sec\n uint256 public lastSettled; // secs after epoch\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier longShortOnly() {\n require(msg.sender == longShort, \"Not longShort\");\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n\n constructor(\n address _longShort,\n address _treasury,\n address _token\n ) {\n // Admin contracts.\n longShort = _longShort;\n treasury = _treasury;\n\n // Global state.\n token = ERC20PresetMinterPauser(_token);\n lastSettled = block.timestamp;\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n\n /**\n * Adds the token's accrued yield to the token holdings.\n */\n function settle() public {\n uint256 totalYieldRate = yieldRate * (block.timestamp - lastSettled);\n uint256 totalYield = (totalHeld * totalYieldRate) / TEN_TO_THE_18;\n\n lastSettled = block.timestamp;\n totalHeld = totalHeld + totalYield;\n if (totalYield > 0) {\n token.mint(address(this), totalYield);\n }\n }\n\n /**\n * Adds the given yield percent to the token holdings.\n */\n function settleWithYieldPercent(uint256 yieldPercent) external {\n uint256 totalYield = (totalHeld * yieldPercent) / TEN_TO_THE_18;\n\n lastSettled = block.timestamp;\n totalHeld = totalHeld + totalYield;\n token.mint(address(this), totalYield);\n }\n\n /**\n * Adds the given absolute yield to the token holdings.\n */\n function settleWithYieldAbsolute(uint256 totalYield) external {\n lastSettled = block.timestamp;\n totalHeld = totalHeld + totalYield;\n token.mint(address(this), totalYield);\n }\n\n /**\n * Sets the yield percentage per second for the given token.\n */\n function setYieldRate(uint256 _yieldRate) external {\n yieldRate = _yieldRate;\n }\n\n function depositPaymentToken(uint256 amount) external override longShortOnly {\n // Ensure token state is current.\n settle();\n\n // Transfer tokens to manager contract.\n totalHeld = totalHeld + amount;\n }\n\n /// @notice Allows the LongShort pay out a user from tokens already withdrawn from Aave\n /// @param user User to recieve the payout\n /// @param amount Amount of payment token to pay to user\n function transferPaymentTokensToUser(address user, uint256 amount)\n external\n override\n longShortOnly\n {\n // Transfer tokens back to LongShort contract.\n token.transfer(user, amount);\n }\n\n function removePaymentTokenFromMarket(uint256 amount) external override longShortOnly {\n // Ensure token state is current.\n settle();\n require(amount <= totalHeld);\n\n totalHeld = totalHeld - amount;\n }\n\n function distributeYieldForTreasuryAndReturnMarketAllocation(\n uint256 totalValueRealizedForMarket,\n uint256 treasuryYieldPercent_e18\n ) external override longShortOnly returns (uint256) {\n uint256 unrealizedYield = totalHeld - totalValueRealizedForMarket - totalReservedForTreasury;\n\n if (unrealizedYield == 0) {\n return 0;\n }\n\n uint256 amountForTreasury = (unrealizedYield * treasuryYieldPercent_e18) / TEN_TO_THE_18;\n uint256 amountForMarketIncentives = unrealizedYield - amountForTreasury;\n\n totalReservedForTreasury += amountForTreasury;\n\n return amountForMarketIncentives;\n }\n\n function withdrawTreasuryFunds() external override longShortOnly {}\n\n function initializeForMarket() external override longShortOnly {\n require(!isInitialized, \"Yield Manager is already in use\");\n isInitialized = true;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../extensions/ERC20Burnable.sol\";\nimport \"../extensions/ERC20Pausable.sol\";\nimport \"../../../access/AccessControlEnumerable.sol\";\nimport \"../../../utils/Context.sol\";\n\n/**\n * @dev {ERC20} token, including:\n *\n * - ability for holders to burn (destroy) their tokens\n * - a minter role that allows for token minting (creation)\n * - a pauser role that allows to stop all token transfers\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable {\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n /**\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\n * account that deploys the contract.\n *\n * See {ERC20-constructor}.\n */\n constructor(string memory name, string memory symbol) ERC20(name, symbol) {\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n _setupRole(MINTER_ROLE, _msgSender());\n _setupRole(PAUSER_ROLE, _msgSender());\n }\n\n /**\n * @dev Creates `amount` new tokens for `to`.\n *\n * See {ERC20-_mint}.\n *\n * Requirements:\n *\n * - the caller must have the `MINTER_ROLE`.\n */\n function mint(address to, uint256 amount) public virtual {\n require(hasRole(MINTER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have minter role to mint\");\n _mint(to, amount);\n }\n\n /**\n * @dev Pauses all token transfers.\n *\n * See {ERC20Pausable} and {Pausable-_pause}.\n *\n * Requirements:\n *\n * - the caller must have the `PAUSER_ROLE`.\n */\n function pause() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to pause\");\n _pause();\n }\n\n /**\n * @dev Unpauses all token transfers.\n *\n * See {ERC20Pausable} and {Pausable-_unpause}.\n *\n * Requirements:\n *\n * - the caller must have the `PAUSER_ROLE`.\n */\n function unpause() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to unpause\");\n _unpause();\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override(ERC20, ERC20Pausable) {\n super._beforeTokenTransfer(from, to, amount);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../utils/Context.sol\";\n\n/**\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\n * tokens and those that they have an allowance for, in a way that can be\n * recognized off-chain (via event analysis).\n */\nabstract contract ERC20Burnable is Context, ERC20 {\n /**\n * @dev Destroys `amount` tokens from the caller.\n *\n * See {ERC20-_burn}.\n */\n function burn(uint256 amount) public virtual {\n _burn(_msgSender(), amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\n * allowance.\n *\n * See {ERC20-_burn} and {ERC20-allowance}.\n *\n * Requirements:\n *\n * - the caller must have allowance for ``accounts``'s tokens of at least\n * `amount`.\n */\n function burnFrom(address account, uint256 amount) public virtual {\n uint256 currentAllowance = allowance(account, _msgSender());\n require(currentAllowance >= amount, \"ERC20: burn amount exceeds allowance\");\n unchecked {\n _approve(account, _msgSender(), currentAllowance - amount);\n }\n _burn(account, amount);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../security/Pausable.sol\";\n\n/**\n * @dev ERC20 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n */\nabstract contract ERC20Pausable is ERC20, Pausable {\n /**\n * @dev See {ERC20-_beforeTokenTransfer}.\n *\n * Requirements:\n *\n * - the contract must not be paused.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n require(!paused(), \"ERC20Pausable: token transfer while paused\");\n }\n}\n" + }, + "@openzeppelin/contracts/access/AccessControlEnumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlEnumerable.sol\";\nimport \"./AccessControl.sol\";\nimport \"../utils/structs/EnumerableSet.sol\";\n\n/**\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\n */\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\n using EnumerableSet for EnumerableSet.AddressSet;\n\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {\n return _roleMembers[role].at(index);\n }\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) public view override returns (uint256) {\n return _roleMembers[role].length();\n }\n\n /**\n * @dev Overload {grantRole} to track enumerable memberships\n */\n function grantRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) {\n super.grantRole(role, account);\n _roleMembers[role].add(account);\n }\n\n /**\n * @dev Overload {revokeRole} to track enumerable memberships\n */\n function revokeRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) {\n super.revokeRole(role, account);\n _roleMembers[role].remove(account);\n }\n\n /**\n * @dev Overload {renounceRole} to track enumerable memberships\n */\n function renounceRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) {\n super.renounceRole(role, account);\n _roleMembers[role].remove(account);\n }\n\n /**\n * @dev Overload {_setupRole} to track enumerable memberships\n */\n function _setupRole(bytes32 role, address account) internal virtual override {\n super._setupRole(role, account);\n _roleMembers[role].add(account);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n require(!paused(), \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n require(paused(), \"Pausable: not paused\");\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/access/IAccessControlEnumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\n\n/**\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\n */\ninterface IAccessControlEnumerable is IAccessControl {\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\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, _msgSender());\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(IAccessControl).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(uint160(account), 20),\n \" is missing role \",\n Strings.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastvalue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastvalue;\n // Update the index for the moved value\n set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n return _values(set._inner);\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "@openzeppelin/contracts/access/IAccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\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/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "contracts/testing/generated/LongShortMockable.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport \"../../interfaces/ITokenFactory.sol\";\nimport \"../../interfaces/ISyntheticToken.sol\";\nimport \"../../interfaces/IStaker.sol\";\nimport \"../../interfaces/ILongShort.sol\";\nimport \"../../interfaces/IYieldManager.sol\";\nimport \"../../interfaces/IOracleManager.sol\";\nimport \"../../abstract/AccessControlledAndUpgradeable.sol\";\nimport \"../../GEMS.sol\";\nimport \"hardhat/console.sol\";\n\nimport \"./LongShortForInternalMocking.sol\";\nimport \"../LongShortInternalStateSetters.sol\";\n\ncontract LongShortMockable is LongShortInternalStateSetters {\n LongShortForInternalMocking mocker;\n bool shouldUseMock;\n string functionToNotMock;\n\n function setMocker(LongShortForInternalMocking _mocker) external {\n mocker = _mocker;\n shouldUseMock = true;\n }\n\n function setFunctionToNotMock(string calldata _functionToNotMock) external {\n functionToNotMock = _functionToNotMock;\n shouldUseMock = true;\n }\n\n function adminOnlyModifierLogicExposed() external {\n return super.adminOnlyModifierLogic();\n }\n\n function adminOnlyModifierLogic() internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"adminOnlyModifierLogic\"))\n ) {\n return mocker.adminOnlyModifierLogicMock();\n } else {\n return super.adminOnlyModifierLogic();\n }\n }\n\n function requireMarketExistsModifierLogicExposed(uint32 marketIndex) external view {\n return super.requireMarketExistsModifierLogic(marketIndex);\n }\n\n function requireMarketExistsModifierLogic(uint32 marketIndex) internal view override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"requireMarketExistsModifierLogic\"))\n ) {\n return mocker.requireMarketExistsModifierLogicMock(marketIndex);\n } else {\n return super.requireMarketExistsModifierLogic(marketIndex);\n }\n }\n\n function gemCollectingModifierLogicExposed() external {\n return super.gemCollectingModifierLogic();\n }\n\n function gemCollectingModifierLogic() internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"gemCollectingModifierLogic\"))\n ) {\n return mocker.gemCollectingModifierLogicMock();\n } else {\n return super.gemCollectingModifierLogic();\n }\n }\n\n function _seedMarketInitiallyExposed(\n uint256 initialMarketSeedForEachMarketSide,\n uint32 marketIndex\n ) external {\n return super._seedMarketInitially(initialMarketSeedForEachMarketSide, marketIndex);\n }\n\n function _seedMarketInitially(uint256 initialMarketSeedForEachMarketSide, uint32 marketIndex)\n internal\n override\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_seedMarketInitially\"))\n ) {\n return mocker._seedMarketInitiallyMock(initialMarketSeedForEachMarketSide, marketIndex);\n } else {\n return super._seedMarketInitially(initialMarketSeedForEachMarketSide, marketIndex);\n }\n }\n\n function _getSyntheticTokenPriceExposed(\n uint256 amountPaymentTokenBackingSynth,\n uint256 amountSyntheticToken\n ) external pure returns (uint256 syntheticTokenPrice) {\n return super._getSyntheticTokenPrice(amountPaymentTokenBackingSynth, amountSyntheticToken);\n }\n\n function _getAmountPaymentTokenExposed(\n uint256 amountSyntheticToken,\n uint256 syntheticTokenPriceInPaymentTokens\n ) external pure returns (uint256 amountPaymentToken) {\n return super._getAmountPaymentToken(amountSyntheticToken, syntheticTokenPriceInPaymentTokens);\n }\n\n function _getAmountSyntheticTokenExposed(\n uint256 amountPaymentTokenBackingSynth,\n uint256 syntheticTokenPriceInPaymentTokens\n ) external pure returns (uint256 amountSyntheticToken) {\n return\n super._getAmountSyntheticToken(\n amountPaymentTokenBackingSynth,\n syntheticTokenPriceInPaymentTokens\n );\n }\n\n function _getEquivalentAmountSyntheticTokensOnTargetSideExposed(\n uint256 amountSyntheticTokens_originSide,\n uint256 syntheticTokenPrice_originSide,\n uint256 syntheticTokenPrice_targetSide\n ) external pure returns (uint256 equivalentAmountSyntheticTokensOnTargetSide) {\n return\n super._getEquivalentAmountSyntheticTokensOnTargetSide(\n amountSyntheticTokens_originSide,\n syntheticTokenPrice_originSide,\n syntheticTokenPrice_targetSide\n );\n }\n\n function getAmountSyntheticTokenToMintOnTargetSide(\n uint32 marketIndex,\n uint256 amountSyntheticToken_redeemOnOriginSide,\n bool isShiftFromLong,\n uint256 priceSnapshotIndex\n ) public view override returns (uint256 amountSyntheticTokensToMintOnTargetSide) {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"getAmountSyntheticTokenToMintOnTargetSide\"))\n ) {\n return\n mocker.getAmountSyntheticTokenToMintOnTargetSideMock(\n marketIndex,\n amountSyntheticToken_redeemOnOriginSide,\n isShiftFromLong,\n priceSnapshotIndex\n );\n } else {\n return\n super.getAmountSyntheticTokenToMintOnTargetSide(\n marketIndex,\n amountSyntheticToken_redeemOnOriginSide,\n isShiftFromLong,\n priceSnapshotIndex\n );\n }\n }\n\n function _getYieldSplitExposed(\n uint32 marketIndex,\n uint256 longValue,\n uint256 shortValue,\n uint256 totalValueLockedInMarket\n ) external view returns (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) {\n return super._getYieldSplit(marketIndex, longValue, shortValue, totalValueLockedInMarket);\n }\n\n function _getYieldSplit(\n uint32 marketIndex,\n uint256 longValue,\n uint256 shortValue,\n uint256 totalValueLockedInMarket\n )\n internal\n view\n override\n returns (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18)\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_getYieldSplit\"))\n ) {\n return\n mocker._getYieldSplitMock(marketIndex, longValue, shortValue, totalValueLockedInMarket);\n } else {\n return super._getYieldSplit(marketIndex, longValue, shortValue, totalValueLockedInMarket);\n }\n }\n\n function _claimAndDistributeYieldThenRebalanceMarketExposed(\n uint32 marketIndex,\n int256 newAssetPrice\n ) external returns (uint256 longValue, uint256 shortValue) {\n return super._claimAndDistributeYieldThenRebalanceMarket(marketIndex, newAssetPrice);\n }\n\n function _claimAndDistributeYieldThenRebalanceMarket(uint32 marketIndex, int256 newAssetPrice)\n internal\n override\n returns (uint256 longValue, uint256 shortValue)\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_claimAndDistributeYieldThenRebalanceMarket\"))\n ) {\n return mocker._claimAndDistributeYieldThenRebalanceMarketMock(marketIndex, newAssetPrice);\n } else {\n return super._claimAndDistributeYieldThenRebalanceMarket(marketIndex, newAssetPrice);\n }\n }\n\n function _updateSystemStateInternalExposed(uint32 marketIndex) external {\n return super._updateSystemStateInternal(marketIndex);\n }\n\n function _updateSystemStateInternal(uint32 marketIndex)\n internal\n override\n requireMarketExists(marketIndex)\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_updateSystemStateInternal\"))\n ) {\n return mocker._updateSystemStateInternalMock(marketIndex);\n } else {\n return super._updateSystemStateInternal(marketIndex);\n }\n }\n\n function _transferPaymentTokensFromUserToYieldManagerExposed(uint32 marketIndex, uint256 amount)\n external\n {\n return super._transferPaymentTokensFromUserToYieldManager(marketIndex, amount);\n }\n\n function _transferPaymentTokensFromUserToYieldManager(uint32 marketIndex, uint256 amount)\n internal\n override\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_transferPaymentTokensFromUserToYieldManager\"))\n ) {\n return mocker._transferPaymentTokensFromUserToYieldManagerMock(marketIndex, amount);\n } else {\n return super._transferPaymentTokensFromUserToYieldManager(marketIndex, amount);\n }\n }\n\n function _mintNextPriceExposed(\n uint32 marketIndex,\n uint256 amount,\n bool isLong\n ) external {\n return super._mintNextPrice(marketIndex, amount, isLong);\n }\n\n function _mintNextPrice(\n uint32 marketIndex,\n uint256 amount,\n bool isLong\n )\n internal\n override\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\n gemCollecting\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_mintNextPrice\"))\n ) {\n return mocker._mintNextPriceMock(marketIndex, amount, isLong);\n } else {\n return super._mintNextPrice(marketIndex, amount, isLong);\n }\n }\n\n function _redeemNextPriceExposed(\n uint32 marketIndex,\n uint256 tokens_redeem,\n bool isLong\n ) external {\n return super._redeemNextPrice(marketIndex, tokens_redeem, isLong);\n }\n\n function _redeemNextPrice(\n uint32 marketIndex,\n uint256 tokens_redeem,\n bool isLong\n )\n internal\n override\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\n gemCollecting\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_redeemNextPrice\"))\n ) {\n return mocker._redeemNextPriceMock(marketIndex, tokens_redeem, isLong);\n } else {\n return super._redeemNextPrice(marketIndex, tokens_redeem, isLong);\n }\n }\n\n function shiftPositionNextPrice(\n uint32 marketIndex,\n uint256 amountSyntheticTokensToShift,\n bool isShiftFromLong\n )\n public\n override\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\n gemCollecting\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"shiftPositionNextPrice\"))\n ) {\n return\n mocker.shiftPositionNextPriceMock(\n marketIndex,\n amountSyntheticTokensToShift,\n isShiftFromLong\n );\n } else {\n return\n super.shiftPositionNextPrice(marketIndex, amountSyntheticTokensToShift, isShiftFromLong);\n }\n }\n\n function _executeOutstandingNextPriceMintsExposed(\n uint32 marketIndex,\n address user,\n bool isLong\n ) external {\n return super._executeOutstandingNextPriceMints(marketIndex, user, isLong);\n }\n\n function _executeOutstandingNextPriceMints(\n uint32 marketIndex,\n address user,\n bool isLong\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_executeOutstandingNextPriceMints\"))\n ) {\n return mocker._executeOutstandingNextPriceMintsMock(marketIndex, user, isLong);\n } else {\n return super._executeOutstandingNextPriceMints(marketIndex, user, isLong);\n }\n }\n\n function _executeOutstandingNextPriceRedeemsExposed(\n uint32 marketIndex,\n address user,\n bool isLong\n ) external {\n return super._executeOutstandingNextPriceRedeems(marketIndex, user, isLong);\n }\n\n function _executeOutstandingNextPriceRedeems(\n uint32 marketIndex,\n address user,\n bool isLong\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_executeOutstandingNextPriceRedeems\"))\n ) {\n return mocker._executeOutstandingNextPriceRedeemsMock(marketIndex, user, isLong);\n } else {\n return super._executeOutstandingNextPriceRedeems(marketIndex, user, isLong);\n }\n }\n\n function _executeOutstandingNextPriceTokenShiftsExposed(\n uint32 marketIndex,\n address user,\n bool isShiftFromLong\n ) external {\n return super._executeOutstandingNextPriceTokenShifts(marketIndex, user, isShiftFromLong);\n }\n\n function _executeOutstandingNextPriceTokenShifts(\n uint32 marketIndex,\n address user,\n bool isShiftFromLong\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_executeOutstandingNextPriceTokenShifts\"))\n ) {\n return mocker._executeOutstandingNextPriceTokenShiftsMock(marketIndex, user, isShiftFromLong);\n } else {\n return super._executeOutstandingNextPriceTokenShifts(marketIndex, user, isShiftFromLong);\n }\n }\n\n function _executeOutstandingNextPriceSettlementsExposed(address user, uint32 marketIndex)\n external\n {\n return super._executeOutstandingNextPriceSettlements(user, marketIndex);\n }\n\n function _executeOutstandingNextPriceSettlements(address user, uint32 marketIndex)\n internal\n override\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_executeOutstandingNextPriceSettlements\"))\n ) {\n return mocker._executeOutstandingNextPriceSettlementsMock(user, marketIndex);\n } else {\n return super._executeOutstandingNextPriceSettlements(user, marketIndex);\n }\n }\n\n function _handleTotalPaymentTokenValueChangeForMarketWithYieldManagerExposed(\n uint32 marketIndex,\n int256 totalPaymentTokenValueChangeForMarket\n ) external {\n return\n super._handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\n marketIndex,\n totalPaymentTokenValueChangeForMarket\n );\n }\n\n function _handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\n uint32 marketIndex,\n int256 totalPaymentTokenValueChangeForMarket\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_handleTotalPaymentTokenValueChangeForMarketWithYieldManager\"))\n ) {\n return\n mocker._handleTotalPaymentTokenValueChangeForMarketWithYieldManagerMock(\n marketIndex,\n totalPaymentTokenValueChangeForMarket\n );\n } else {\n return\n super._handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\n marketIndex,\n totalPaymentTokenValueChangeForMarket\n );\n }\n }\n\n function _handleChangeInSyntheticTokensTotalSupplyExposed(\n uint32 marketIndex,\n bool isLong,\n int256 changeInSyntheticTokensTotalSupply\n ) external {\n return\n super._handleChangeInSyntheticTokensTotalSupply(\n marketIndex,\n isLong,\n changeInSyntheticTokensTotalSupply\n );\n }\n\n function _handleChangeInSyntheticTokensTotalSupply(\n uint32 marketIndex,\n bool isLong,\n int256 changeInSyntheticTokensTotalSupply\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_handleChangeInSyntheticTokensTotalSupply\"))\n ) {\n return\n mocker._handleChangeInSyntheticTokensTotalSupplyMock(\n marketIndex,\n isLong,\n changeInSyntheticTokensTotalSupply\n );\n } else {\n return\n super._handleChangeInSyntheticTokensTotalSupply(\n marketIndex,\n isLong,\n changeInSyntheticTokensTotalSupply\n );\n }\n }\n\n function _batchConfirmOutstandingPendingActionsExposed(\n uint32 marketIndex,\n uint256 syntheticTokenPrice_inPaymentTokens_long,\n uint256 syntheticTokenPrice_inPaymentTokens_short\n )\n external\n returns (\n int256 long_changeInMarketValue_inPaymentToken,\n int256 short_changeInMarketValue_inPaymentToken\n )\n {\n return\n super._batchConfirmOutstandingPendingActions(\n marketIndex,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short\n );\n }\n\n function _batchConfirmOutstandingPendingActions(\n uint32 marketIndex,\n uint256 syntheticTokenPrice_inPaymentTokens_long,\n uint256 syntheticTokenPrice_inPaymentTokens_short\n )\n internal\n override\n returns (\n int256 long_changeInMarketValue_inPaymentToken,\n int256 short_changeInMarketValue_inPaymentToken\n )\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_batchConfirmOutstandingPendingActions\"))\n ) {\n return\n mocker._batchConfirmOutstandingPendingActionsMock(\n marketIndex,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short\n );\n } else {\n return\n super._batchConfirmOutstandingPendingActions(\n marketIndex,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short\n );\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\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 / b + (a % b == 0 ? 0 : 1);\n }\n}\n" + }, + "contracts/interfaces/ITokenFactory.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\ninterface ITokenFactory {\n function createSyntheticToken(\n string calldata syntheticName,\n string calldata syntheticSymbol,\n address staker,\n uint32 marketIndex,\n bool isLong\n ) external returns (address);\n}\n" + }, + "contracts/interfaces/ISyntheticToken.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\n/**\n@title SyntheticToken\n@notice An ERC20 token that tracks or inversely tracks the price of an\n underlying asset with floating exposure.\n*/\ninterface ISyntheticToken {\n // function MINTER_ROLE() external returns (bytes32);\n\n /// @notice Allows users to stake their synthetic tokens to earn Float.\n function stake(uint256) external;\n\n function mint(address, uint256) external;\n\n function totalSupply() external returns (uint256);\n\n function transferFrom(\n address,\n address,\n uint256\n ) external returns (bool);\n\n function transfer(address, uint256) external returns (bool);\n\n function burn(uint256 amount) external;\n}\n" + }, + "contracts/interfaces/IStaker.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\ninterface IStaker {\n /*╔════════════════════════════╗\n ║ EVENTS ║\n ╚════════════════════════════╝*/\n\n event StakerV1(\n address admin,\n address floatTreasury,\n address floatCapital,\n address floatToken,\n uint256 floatPercentage\n );\n\n event MarketAddedToStaker(\n uint32 marketIndex,\n uint256 exitFee_e18,\n uint256 period,\n uint256 multiplier,\n uint256 balanceIncentiveExponent,\n int256 balanceIncentiveEquilibriumOffset,\n uint256 safeExponentBitShifting\n );\n\n event AccumulativeIssuancePerStakedSynthSnapshotCreated(\n uint32 marketIndex,\n uint256 accumulativeFloatIssuanceSnapshotIndex,\n uint256 accumulativeLong,\n uint256 accumulativeShort\n );\n\n event StakeAdded(address user, address token, uint256 amount, uint256 lastMintIndex);\n\n event StakeWithdrawn(address user, address token, uint256 amount);\n\n // Note: the `amountFloatMinted` isn't strictly needed by the graph, but it is good to add it to validate calculations are accurate.\n event FloatMinted(address user, uint32 marketIndex, uint256 amountFloatMinted);\n\n event MarketLaunchIncentiveParametersChanges(\n uint32 marketIndex,\n uint256 period,\n uint256 multiplier\n );\n\n event StakeWithdrawalFeeUpdated(uint32 marketIndex, uint256 stakeWithdralFee);\n\n event BalanceIncentiveParamsUpdated(\n uint32 marketIndex,\n uint256 balanceIncentiveExponent,\n int256 balanceIncentiveCurve_equilibriumOffset,\n uint256 safeExponentBitShifting\n );\n\n event FloatPercentageUpdated(uint256 floatPercentage);\n\n event NextPriceStakeShift(\n address user,\n uint32 marketIndex,\n uint256 amount,\n bool isShiftFromLong,\n uint256 userShiftIndex\n );\n\n // only for graph validation\n event StakeShifted(\n address user,\n uint32 marketIndex,\n uint256 newAmountStakedLong,\n uint256 newAmountStakedShort\n );\n\n function userAmountStaked(address, address) external view returns (uint256);\n\n function addNewStakingFund(\n uint32 marketIndex,\n address longTokenAddress,\n address shortTokenAddress,\n uint256 kInitialMultiplier,\n uint256 kPeriod,\n uint256 unstakeFee_e18,\n uint256 _balanceIncentiveCurve_exponent,\n int256 _balanceIncentiveCurve_equilibriumOffset\n ) external;\n\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\n uint32 marketIndex,\n uint256 marketUpdateIndex,\n uint256 longTokenPrice,\n uint256 shortTokenPrice,\n uint256 longValue,\n uint256 shortValue\n ) external;\n\n function stakeFromUser(address from, uint256 amount) external;\n\n function shiftTokens(\n uint256 amountSyntheticTokensToShift,\n uint32 marketIndex,\n bool isShiftFromLong\n ) external;\n}\n" + }, + "contracts/interfaces/ILongShort.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\ninterface ILongShort {\n /*╔════════════════════════════╗\n ║ EVENTS ║\n ╚════════════════════════════╝*/\n\n event LongShortV1(address admin, address tokenFactory, address staker);\n\n event SystemStateUpdated(\n uint32 marketIndex,\n uint256 updateIndex,\n int256 underlyingAssetPrice,\n uint256 longValue,\n uint256 shortValue,\n uint256 longPrice,\n uint256 shortPrice\n );\n\n event SyntheticMarketCreated(\n uint32 marketIndex,\n address longTokenAddress,\n address shortTokenAddress,\n address paymentToken,\n int256 initialAssetPrice,\n string name,\n string symbol,\n address oracleAddress,\n address yieldManagerAddress\n );\n\n event NextPriceRedeem(\n uint32 marketIndex,\n bool isLong,\n uint256 synthRedeemed,\n address user,\n uint256 oracleUpdateIndex\n );\n\n event NextPriceSyntheticPositionShift(\n uint32 marketIndex,\n bool isShiftFromLong,\n uint256 synthShifted,\n address user,\n uint256 oracleUpdateIndex\n );\n\n event NextPriceDeposit(\n uint32 marketIndex,\n bool isLong,\n uint256 depositAdded,\n address user,\n uint256 oracleUpdateIndex\n );\n\n event OracleUpdated(uint32 marketIndex, address oldOracleAddress, address newOracleAddress);\n\n event NewMarketLaunchedAndSeeded(uint32 marketIndex, uint256 initialSeed, uint256 marketLeverage);\n\n event ExecuteNextPriceSettlementsUser(address user, uint32 marketIndex);\n\n function syntheticTokens(uint32, bool) external view returns (address);\n\n function marketUpdateIndex(uint32) external view returns (uint256);\n\n function syntheticToken_priceSnapshot(\n uint32,\n bool,\n uint256\n ) external view returns (uint256);\n\n function marketSideValueInPaymentToken(uint32 marketIndex, bool isLong)\n external\n view\n returns (uint256 marketSideValueInPaymentToken);\n\n function updateSystemState(uint32 marketIndex) external;\n\n function updateSystemStateMulti(uint32[] calldata marketIndex) external;\n\n function getUsersConfirmedButNotSettledSynthBalance(\n address user,\n uint32 marketIndex,\n bool isLong\n ) external view returns (uint256 confirmedButNotSettledBalance);\n\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex) external;\n\n function shiftPositionNextPrice(\n uint32 marketIndex,\n uint256 amountSyntheticTokensToShift,\n bool isShiftFromLong\n ) external;\n\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\n external;\n\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\n external;\n\n function getAmountSyntheticTokenToMintOnTargetSide(\n uint32 marketIndex,\n uint256 amountSyntheticTokenShiftedFromOneSide,\n bool isShiftFromLong,\n uint256 priceSnapshotIndex\n ) external view returns (uint256 amountSynthShiftedToOtherSide);\n\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external;\n\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external;\n\n function redeemLongNextPrice(uint32 marketIndex, uint256 amount) external;\n\n function redeemShortNextPrice(uint32 marketIndex, uint256 amount) external;\n}\n" + }, + "contracts/interfaces/IOracleManager.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\n/*\n * Manages price feeds from different oracle implementations.\n */\ninterface IOracleManager {\n function updatePrice() external returns (int256);\n\n /*\n *Returns the latest price from the oracle feed.\n */\n function getLatestPrice() external view returns (int256);\n}\n" + }, + "contracts/GEMS.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\n\n/** Contract giving user GEMS*/\n\n// Inspired by https://github.com/andrecronje/rarity/blob/main/rarity.sol\n\n/** @title GEMS */\ncontract GEMS is AccessControlledAndUpgradeable {\n bytes32 public constant GEM_ROLE = keccak256(\"GEM_ROLE\");\n\n uint256 constant gems_per_day = 250e18;\n uint256 constant DAY = 1 days;\n\n mapping(address => uint256) public gems;\n mapping(address => uint256) public streak;\n mapping(address => uint256) public lastAction;\n\n event GemsCollected(address user, uint256 gems, uint256 streak);\n\n function initialize(\n address _admin,\n address _longShort,\n address _staker\n ) external initializer {\n _AccessControlledAndUpgradeable_init(_admin);\n _setupRole(GEM_ROLE, _longShort);\n _setupRole(GEM_ROLE, _staker);\n }\n\n // Say gm and get gems by performing an action in LongShort or Staker\n function gm(address user) external {\n if (hasRole(GEM_ROLE, msg.sender)) {\n uint256 usersLastAction = lastAction[user];\n uint256 blocktimestamp = block.timestamp;\n\n if (blocktimestamp - usersLastAction >= DAY) {\n // Award gems\n gems[user] += gems_per_day;\n\n // Increment streak\n if (blocktimestamp - usersLastAction < 2 * DAY) {\n streak[user] += 1;\n } else {\n streak[user] = 1; // reset streak to 1\n }\n\n lastAction[user] = blocktimestamp;\n }\n emit GemsCollected(user, gems[user], streak[user]);\n }\n }\n}\n" + }, + "contracts/testing/generated/LongShortForInternalMocking.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.3;\n\nimport \"./LongShortMockable.sol\";\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport \"../../interfaces/ITokenFactory.sol\";\nimport \"../../interfaces/ISyntheticToken.sol\";\nimport \"../../interfaces/IStaker.sol\";\nimport \"../../interfaces/ILongShort.sol\";\nimport \"../../interfaces/IYieldManager.sol\";\nimport \"../../interfaces/IOracleManager.sol\";\nimport \"../../abstract/AccessControlledAndUpgradeable.sol\";\nimport \"../../GEMS.sol\";\nimport \"hardhat/console.sol\";\n\ncontract LongShortForInternalMocking {\n function adminOnlyModifierLogicMock() public pure {\n return ();\n }\n\n function requireMarketExistsModifierLogicMock(uint32) public pure {\n return ();\n }\n\n function gemCollectingModifierLogicMock() public pure {\n return ();\n }\n\n function initializeMock(\n address,\n address,\n address,\n address\n ) public pure {\n return ();\n }\n\n function _seedMarketInitiallyMock(uint256, uint32) public pure {\n return ();\n }\n\n function _getSyntheticTokenPriceMock(uint256, uint256)\n public\n pure\n returns (uint256 syntheticTokenPrice)\n {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _getAmountPaymentTokenMock(uint256, uint256)\n public\n pure\n returns (uint256 amountPaymentToken)\n {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _getAmountSyntheticTokenMock(uint256, uint256)\n public\n pure\n returns (uint256 amountSyntheticToken)\n {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _getEquivalentAmountSyntheticTokensOnTargetSideMock(\n uint256,\n uint256,\n uint256\n ) public pure returns (uint256 equivalentAmountSyntheticTokensOnTargetSide) {\n return (abi.decode(\"\", (uint256)));\n }\n\n function getAmountSyntheticTokenToMintOnTargetSideMock(\n uint32,\n uint256,\n bool,\n uint256\n ) public pure returns (uint256 amountSyntheticTokensToMintOnTargetSide) {\n return (abi.decode(\"\", (uint256)));\n }\n\n function getUsersConfirmedButNotSettledSynthBalanceMock(\n address,\n uint32,\n bool\n ) public pure returns (uint256 confirmedButNotSettledBalance) {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _getYieldSplitMock(\n uint32,\n uint256,\n uint256,\n uint256\n ) public pure returns (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) {\n return (abi.decode(\"\", (bool)), abi.decode(\"\", (uint256)));\n }\n\n function _claimAndDistributeYieldThenRebalanceMarketMock(uint32, int256)\n public\n pure\n returns (uint256 longValue, uint256 shortValue)\n {\n return (abi.decode(\"\", (uint256)), abi.decode(\"\", (uint256)));\n }\n\n function _updateSystemStateInternalMock(uint32) public pure {\n return ();\n }\n\n function _transferPaymentTokensFromUserToYieldManagerMock(uint32, uint256) public pure {\n return ();\n }\n\n function _mintNextPriceMock(\n uint32,\n uint256,\n bool\n ) public pure {\n return ();\n }\n\n function _redeemNextPriceMock(\n uint32,\n uint256,\n bool\n ) public pure {\n return ();\n }\n\n function shiftPositionNextPriceMock(\n uint32,\n uint256,\n bool\n ) public pure {\n return ();\n }\n\n function _executeOutstandingNextPriceMintsMock(\n uint32,\n address,\n bool\n ) public pure {\n return ();\n }\n\n function _executeOutstandingNextPriceRedeemsMock(\n uint32,\n address,\n bool\n ) public pure {\n return ();\n }\n\n function _executeOutstandingNextPriceTokenShiftsMock(\n uint32,\n address,\n bool\n ) public pure {\n return ();\n }\n\n function _executeOutstandingNextPriceSettlementsMock(address, uint32) public pure {\n return ();\n }\n\n function _handleTotalPaymentTokenValueChangeForMarketWithYieldManagerMock(uint32, int256)\n public\n pure\n {\n return ();\n }\n\n function _handleChangeInSyntheticTokensTotalSupplyMock(\n uint32,\n bool,\n int256\n ) public pure {\n return ();\n }\n\n function _batchConfirmOutstandingPendingActionsMock(\n uint32,\n uint256,\n uint256\n )\n public\n pure\n returns (\n int256 long_changeInMarketValue_inPaymentToken,\n int256 short_changeInMarketValue_inPaymentToken\n )\n {\n return (abi.decode(\"\", (int256)), abi.decode(\"\", (int256)));\n }\n}\n" + }, + "contracts/testing/LongShortInternalStateSetters.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"../LongShort.sol\";\n\n/*\nNOTE: This contract is for testing purposes only!\n*/\n\ncontract LongShortInternalStateSetters is LongShort {\n function setInitializeMarketParams(\n uint32 marketIndex,\n bool marketIndexValue,\n uint32 _latestMarket,\n address _staker,\n address longAddress,\n address shortAddress\n ) public {\n latestMarket = _latestMarket;\n marketExists[marketIndex] = marketIndexValue;\n staker = (_staker);\n syntheticTokens[marketIndex][\n true /*short*/\n ] = (longAddress);\n syntheticTokens[marketIndex][\n false /*short*/\n ] = (shortAddress);\n }\n\n function setMarketExistsMulti(uint32[] calldata marketIndexes) external {\n uint256 length = marketIndexes.length;\n for (uint256 i = 0; i < length; i++) {\n marketExists[marketIndexes[i]] = true;\n }\n }\n\n function set_updateSystemStateInternalGlobals(\n uint32 marketIndex,\n uint256 _latestUpdateIndexForMarket,\n uint256 syntheticTokenPrice_inPaymentTokens_long,\n uint256 syntheticTokenPrice_inPaymentTokens_short,\n int256 _assetPrice,\n uint256 longValue,\n uint256 shortValue,\n address oracleManager,\n address _staker,\n address synthLong,\n address synthShort,\n uint256 stakerNextPrice_currentUpdateIndex\n ) public {\n marketExists[marketIndex] = true;\n marketUpdateIndex[marketIndex] = _latestUpdateIndexForMarket;\n syntheticToken_priceSnapshot[marketIndex][true][\n _latestUpdateIndexForMarket\n ] = syntheticTokenPrice_inPaymentTokens_long;\n syntheticToken_priceSnapshot[marketIndex][false][\n _latestUpdateIndexForMarket\n ] = syntheticTokenPrice_inPaymentTokens_short;\n\n marketSideValueInPaymentToken[marketIndex][true] = longValue;\n marketSideValueInPaymentToken[marketIndex][false] = shortValue;\n\n assetPrice[marketIndex] = _assetPrice;\n oracleManagers[marketIndex] = oracleManager;\n\n syntheticTokens[marketIndex][true] = synthLong;\n syntheticTokens[marketIndex][false] = synthShort;\n\n staker = _staker;\n\n userNextPrice_currentUpdateIndex[marketIndex][_staker] = stakerNextPrice_currentUpdateIndex;\n }\n\n function setGetUsersConfirmedButNotSettledBalanceGlobals(\n uint32 marketIndex,\n address user,\n bool isLong,\n uint256 _userNextPrice_currentUpdateIndex,\n uint256 _marketUpdateIndex,\n uint256 _userNextPrice_paymentToken_depositAmount_isLong,\n uint256 _syntheticToken_priceSnapshot_isLong,\n uint256 _syntheticToken_priceSnapshot_notIsLong,\n uint256 _userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong\n ) external {\n marketExists[marketIndex] = true;\n userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex;\n marketUpdateIndex[marketIndex] = _marketUpdateIndex;\n\n userNextPrice_paymentToken_depositAmount[marketIndex][isLong][\n user\n ] = _userNextPrice_paymentToken_depositAmount_isLong;\n userNextPrice_paymentToken_depositAmount[marketIndex][!isLong][user] = 0; // reset other side for good measure\n\n syntheticToken_priceSnapshot[marketIndex][isLong][\n _userNextPrice_currentUpdateIndex\n ] = _syntheticToken_priceSnapshot_isLong;\n syntheticToken_priceSnapshot[marketIndex][!isLong][\n _userNextPrice_currentUpdateIndex\n ] = _syntheticToken_priceSnapshot_notIsLong;\n\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][!isLong][\n user\n ] = _userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong;\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isLong][user] = 0; // reset other side for good measure\n }\n\n function setPerformOutstandingBatchedSettlementsGlobals(\n uint32 marketIndex,\n uint256 batched_amountPaymentToken_depositLong,\n uint256 batched_amountPaymentToken_depositShort,\n uint256 batched_amountSyntheticToken_redeemLong,\n uint256 batched_amountSyntheticToken_redeemShort,\n uint256 batchedAmountSyntheticTokenToShiftFromLong,\n uint256 batchedAmountSyntheticTokenToShiftFromShort\n ) external {\n batched_amountPaymentToken_deposit[marketIndex][true] = batched_amountPaymentToken_depositLong;\n batched_amountPaymentToken_deposit[marketIndex][\n false\n ] = batched_amountPaymentToken_depositShort;\n batched_amountSyntheticToken_redeem[marketIndex][\n true\n ] = batched_amountSyntheticToken_redeemLong;\n batched_amountSyntheticToken_redeem[marketIndex][\n false\n ] = batched_amountSyntheticToken_redeemShort;\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][\n true\n ] = batchedAmountSyntheticTokenToShiftFromLong;\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][\n false\n ] = batchedAmountSyntheticTokenToShiftFromShort;\n }\n\n function setHandleChangeInSyntheticTokensTotalSupplyGlobals(\n uint32 marketIndex,\n address longSyntheticToken,\n address shortSyntheticToken\n ) external {\n syntheticTokens[marketIndex][true] = longSyntheticToken;\n syntheticTokens[marketIndex][false] = shortSyntheticToken;\n }\n\n function setRedeemNextPriceGlobals(\n uint32 marketIndex,\n uint256 _marketUpdateIndex,\n address syntheticToken,\n bool isLong\n ) external {\n marketUpdateIndex[marketIndex] = _marketUpdateIndex;\n syntheticTokens[marketIndex][isLong] = syntheticToken;\n }\n\n function setShiftNextPriceGlobals(\n uint32 marketIndex,\n uint256 _marketUpdateIndex,\n address syntheticTokenShiftedFrom,\n bool isShiftFromLong\n ) external {\n marketUpdateIndex[marketIndex] = _marketUpdateIndex;\n syntheticTokens[marketIndex][isShiftFromLong] = syntheticTokenShiftedFrom;\n }\n\n function setExecuteOutstandingNextPriceMintsGlobals(\n uint32 marketIndex,\n address user,\n bool isLong,\n address syntheticToken,\n uint256 _userNextPrice_syntheticToken_redeemAmount,\n uint256 _userNextPrice_currentUpdateIndex,\n uint256 _syntheticToken_priceSnapshot\n ) external {\n userNextPrice_paymentToken_depositAmount[marketIndex][isLong][\n user\n ] = _userNextPrice_syntheticToken_redeemAmount;\n userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex;\n syntheticToken_priceSnapshot[marketIndex][isLong][\n _userNextPrice_currentUpdateIndex\n ] = _syntheticToken_priceSnapshot;\n syntheticTokens[marketIndex][isLong] = syntheticToken;\n }\n\n function setExecuteOutstandingNextPriceRedeemsGlobals(\n uint32 marketIndex,\n address user,\n bool isLong,\n address yieldManager,\n uint256 _userNextPrice_syntheticToken_redeemAmount,\n uint256 _userNextPrice_currentUpdateIndex,\n uint256 _syntheticToken_priceSnapshot\n ) external {\n userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][\n user\n ] = _userNextPrice_syntheticToken_redeemAmount;\n userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex;\n syntheticToken_priceSnapshot[marketIndex][isLong][\n _userNextPrice_currentUpdateIndex\n ] = _syntheticToken_priceSnapshot;\n yieldManagers[marketIndex] = yieldManager;\n }\n\n function setExecuteOutstandingNextPriceTokenShiftsGlobals(\n uint32 marketIndex,\n address user,\n bool isShiftFromLong,\n address syntheticTokenShiftedTo,\n uint256 _userNextPrice_syntheticToken_toShiftAwayFrom_marketSide,\n uint256 _userNextPrice_currentUpdateIndex,\n uint256 _syntheticToken_priceSnapshotShiftedFrom,\n uint256 _syntheticToken_priceSnapshotShiftedTo\n ) external {\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][\n user\n ] = _userNextPrice_syntheticToken_toShiftAwayFrom_marketSide;\n userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex;\n syntheticToken_priceSnapshot[marketIndex][isShiftFromLong][\n _userNextPrice_currentUpdateIndex\n ] = _syntheticToken_priceSnapshotShiftedFrom;\n syntheticToken_priceSnapshot[marketIndex][!isShiftFromLong][\n _userNextPrice_currentUpdateIndex\n ] = _syntheticToken_priceSnapshotShiftedTo;\n syntheticTokens[marketIndex][!isShiftFromLong] = syntheticTokenShiftedTo;\n }\n\n function setExecuteOutstandingNextPriceSettlementsGlobals(\n uint32 marketIndex,\n address user,\n uint256 _userNextPrice_currentUpdateIndex,\n uint256 _marketUpdateIndex\n ) external {\n userNextPrice_currentUpdateIndex[marketIndex][user] = _userNextPrice_currentUpdateIndex;\n marketUpdateIndex[marketIndex] = _marketUpdateIndex;\n }\n\n function setClaimAndDistributeYieldThenRebalanceMarketGlobals(\n uint32 marketIndex,\n uint256 _marketSideValueInPaymentTokenLong,\n uint256 _marketSideValueInPaymentTokenShort,\n address yieldManager\n ) external {\n marketSideValueInPaymentToken[marketIndex][true] = _marketSideValueInPaymentTokenLong;\n marketSideValueInPaymentToken[marketIndex][false] = _marketSideValueInPaymentTokenShort;\n yieldManagers[marketIndex] = yieldManager;\n }\n\n function setDepositFundsGlobals(\n uint32 marketIndex,\n address paymentToken,\n address yieldManager\n ) external {\n paymentTokens[marketIndex] = paymentToken;\n yieldManagers[marketIndex] = yieldManager;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 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" + }, + "contracts/LongShort.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/utils/math/Math.sol\";\n\nimport \"./interfaces/ITokenFactory.sol\";\nimport \"./interfaces/ISyntheticToken.sol\";\nimport \"./interfaces/IStaker.sol\";\nimport \"./interfaces/ILongShort.sol\";\nimport \"./interfaces/IYieldManager.sol\";\nimport \"./interfaces/IOracleManager.sol\";\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\nimport \"./GEMS.sol\";\n\n/**\n **** visit https://float.capital *****\n */\n\n/// @title Core logic of Float Protocal markets\n/// @author float.capital\n/// @notice visit https://float.capital for more info\n/// @dev All functions in this file are currently `virtual`. This is NOT to encourage inheritance.\n/// It is merely for convenince when unit testing.\n/// @custom:auditors This contract balances long and short sides.\ncontract LongShort is ILongShort, AccessControlledAndUpgradeable {\n //Using Open Zeppelin safe transfer library for token transfers\n using SafeERC20 for IERC20;\n\n /*╔═════════════════════════════╗\n ║ VARIABLES ║\n ╚═════════════════════════════╝*/\n\n /* ══════ Fixed-precision constants ══════ */\n /// @notice this is the address that permanently locked initial liquidity for markets is held by.\n /// These tokens will never move so market can never have zero liquidity on a side.\n /// @dev f10a7 spells float in hex - for fun - important part is that the private key for this address in not known.\n address public constant PERMANENT_INITIAL_LIQUIDITY_HOLDER =\n 0xf10A7_F10A7_f10A7_F10a7_F10A7_f10a7_F10A7_f10a7;\n\n /// @dev an empty allocation of storage for use in future upgrades - inspiration from OZ:\n /// https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/10f0f1a95b1b0fd5520351886bae7a03490f1056/contracts/token/ERC20/ERC20Upgradeable.sol#L361\n uint256[45] private __constantsGap;\n\n /* ══════ Global state ══════ */\n uint32 public latestMarket;\n\n address public staker;\n address public tokenFactory;\n address public gems;\n\n uint256[45] private __globalStateGap;\n\n /* ══════ Market specific ══════ */\n mapping(uint32 => bool) public marketExists;\n\n mapping(uint32 => int256) public assetPrice;\n mapping(uint32 => uint256) public override marketUpdateIndex;\n mapping(uint32 => uint256) public marketTreasurySplitGradient_e18;\n mapping(uint32 => uint256) public marketLeverage_e18;\n\n mapping(uint32 => address) public paymentTokens;\n mapping(uint32 => address) public yieldManagers;\n mapping(uint32 => address) public oracleManagers;\n uint256[45] private __marketStateGap;\n\n /* ══════ Market + position (long/short) specific ══════ */\n mapping(uint32 => mapping(bool => address)) public override syntheticTokens;\n mapping(uint32 => mapping(bool => uint256)) public override marketSideValueInPaymentToken;\n\n /// @notice synthetic token prices of a given market of a (long/short) at every previous price update\n mapping(uint32 => mapping(bool => mapping(uint256 => uint256)))\n public\n override syntheticToken_priceSnapshot;\n\n mapping(uint32 => mapping(bool => uint256)) public batched_amountPaymentToken_deposit;\n mapping(uint32 => mapping(bool => uint256)) public batched_amountSyntheticToken_redeem;\n mapping(uint32 => mapping(bool => uint256))\n public batched_amountSyntheticToken_toShiftAwayFrom_marketSide;\n uint256[45] private __marketPositonStateGap;\n\n /* ══════ User specific ══════ */\n mapping(uint32 => mapping(address => uint256)) public userNextPrice_currentUpdateIndex;\n\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\n public userNextPrice_paymentToken_depositAmount;\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\n public userNextPrice_syntheticToken_redeemAmount;\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\n public userNextPrice_syntheticToken_toShiftAwayFrom_marketSide;\n\n /*╔═════════════════════════════╗\n ║ MODIFIERS ║\n ╚═════════════════════════════╝*/\n\n function adminOnlyModifierLogic() internal virtual {\n _checkRole(ADMIN_ROLE, msg.sender);\n }\n\n modifier adminOnly() {\n adminOnlyModifierLogic();\n _;\n }\n\n function requireMarketExistsModifierLogic(uint32 marketIndex) internal view virtual {\n require(marketExists[marketIndex], \"market doesn't exist\");\n }\n\n modifier requireMarketExists(uint32 marketIndex) {\n requireMarketExistsModifierLogic(marketIndex);\n _;\n }\n\n modifier updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(\n address user,\n uint32 marketIndex\n ) {\n _updateSystemStateInternal(marketIndex);\n _executeOutstandingNextPriceSettlements(user, marketIndex);\n _;\n }\n\n function gemCollectingModifierLogic() internal virtual {\n if (msg.sender != staker) {\n GEMS(gems).gm(msg.sender);\n }\n }\n\n modifier gemCollecting() {\n gemCollectingModifierLogic();\n _;\n }\n\n /*╔═════════════════════════════╗\n ║ CONTRACT SET-UP ║\n ╚═════════════════════════════╝*/\n\n /// @notice Initializes the contract.\n /// @dev Calls OpenZeppelin's initializer modifier.\n /// @param _admin Address of the admin role.\n /// @param _tokenFactory Address of the contract which creates synthetic asset tokens.\n /// @param _staker Address of the contract which handles synthetic asset stakes.\n function initialize(\n address _admin,\n address _tokenFactory,\n address _staker,\n address _gems\n ) external virtual initializer {\n require(\n _admin != address(0) &&\n _tokenFactory != address(0) &&\n _staker != address(0) &&\n _gems != address(0)\n );\n _AccessControlledAndUpgradeable_init(_admin);\n tokenFactory = _tokenFactory;\n staker = _staker;\n gems = _gems;\n\n emit LongShortV1(_admin, _tokenFactory, _staker);\n }\n\n /*╔═══════════════════╗\n ║ ADMIN ║\n ╚═══════════════════╝*/\n\n /// @notice Update oracle for a market\n /// @dev Can only be called by the current admin.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param _newOracleManager Address of the replacement oracle manager.\n function updateMarketOracle(uint32 marketIndex, address _newOracleManager) external adminOnly {\n // If not a oracle contract this would break things.. Test's arn't validating this\n // Ie require isOracle interface - ERC165\n address previousOracleManager = oracleManagers[marketIndex];\n oracleManagers[marketIndex] = _newOracleManager;\n emit OracleUpdated(marketIndex, previousOracleManager, _newOracleManager);\n }\n\n /// @notice changes the gradient of the line for determining the yield split between market and treasury.\n function changeMarketTreasurySplitGradient(\n uint32 marketIndex,\n uint256 _marketTreasurySplitGradient_e18\n ) external adminOnly {\n marketTreasurySplitGradient_e18[marketIndex] = _marketTreasurySplitGradient_e18;\n }\n\n /*╔═════════════════════════════╗\n ║ MARKET CREATION ║\n ╚═════════════════════════════╝*/\n\n /// @notice Creates an entirely new long/short market tracking an underlying oracle price.\n /// Make sure the synthetic names/symbols are unique.\n /// @dev This does not make the market active.\n /// The `initializeMarket` function was split out separately to this function to reduce costs.\n /// @param syntheticName Name of the synthetic asset\n /// @param syntheticSymbol Symbol for the synthetic asset\n /// @param _paymentToken The address of the erc20 token used to buy this synthetic asset\n /// this will likely always be DAI\n /// @param _oracleManager The address of the oracle manager that provides the price feed for this market\n /// @param _yieldManager The contract that manages depositing the paymentToken into a yield bearing protocol\n function createNewSyntheticMarket(\n string calldata syntheticName,\n string calldata syntheticSymbol,\n address _paymentToken,\n address _oracleManager,\n address _yieldManager\n ) external adminOnly {\n require(\n _paymentToken != address(0) && _oracleManager != address(0) && _yieldManager != address(0)\n );\n\n uint32 marketIndex = ++latestMarket;\n address _staker = staker;\n\n // Ensure new markets don't use the same yield manager\n IYieldManager(_yieldManager).initializeForMarket();\n\n // Create new synthetic long token.\n syntheticTokens[marketIndex][true] = ITokenFactory(tokenFactory).createSyntheticToken(\n string(abi.encodePacked(\"Float Long \", syntheticName)),\n string(abi.encodePacked(\"fl\", syntheticSymbol)),\n _staker,\n marketIndex,\n true\n );\n\n // Create new synthetic short token.\n syntheticTokens[marketIndex][false] = ITokenFactory(tokenFactory).createSyntheticToken(\n string(abi.encodePacked(\"Float Short \", syntheticName)),\n string(abi.encodePacked(\"fs\", syntheticSymbol)),\n _staker,\n marketIndex,\n false\n );\n\n // Initial market state.\n paymentTokens[marketIndex] = _paymentToken;\n yieldManagers[marketIndex] = _yieldManager;\n oracleManagers[marketIndex] = _oracleManager;\n assetPrice[marketIndex] = IOracleManager(oracleManagers[marketIndex]).updatePrice();\n\n emit SyntheticMarketCreated(\n marketIndex,\n syntheticTokens[marketIndex][true],\n syntheticTokens[marketIndex][false],\n _paymentToken,\n assetPrice[marketIndex],\n syntheticName,\n syntheticSymbol,\n _oracleManager,\n _yieldManager\n );\n }\n\n /// @notice Creates an entirely new long/short market tracking an underlying oracle price.\n /// Uses already created synthetic tokens.\n /// @dev This does not make the market active.\n /// The `initializeMarket` function was split out separately to this function to reduce costs.\n /// @param syntheticName Name of the synthetic asset\n /// @param syntheticSymbol Symbol for the synthetic asset\n /// @param _longToken Address for the long token.\n /// @param _shortToken Address for the short token.\n /// @param _paymentToken The address of the erc20 token used to buy this synthetic asset\n /// this will likely always be DAI\n /// @param _oracleManager The address of the oracle manager that provides the price feed for this market\n /// @param _yieldManager The contract that manages depositing the paymentToken into a yield bearing protocol\n function createNewSyntheticMarketExternalSyntheticTokens(\n string calldata syntheticName,\n string calldata syntheticSymbol,\n address _longToken,\n address _shortToken,\n address _paymentToken,\n address _oracleManager,\n address _yieldManager\n ) external adminOnly {\n uint32 marketIndex = ++latestMarket;\n\n // Ensure new markets don't use the same yield manager\n IYieldManager(_yieldManager).initializeForMarket();\n\n // Assign new synthetic long token.\n syntheticTokens[marketIndex][true] = _longToken;\n\n // Assign new synthetic short token.\n syntheticTokens[marketIndex][false] = _shortToken;\n\n // Initial market state.\n paymentTokens[marketIndex] = _paymentToken;\n yieldManagers[marketIndex] = _yieldManager;\n oracleManagers[marketIndex] = _oracleManager;\n assetPrice[marketIndex] = IOracleManager(oracleManagers[marketIndex]).updatePrice();\n\n emit SyntheticMarketCreated(\n marketIndex,\n _longToken,\n _shortToken,\n _paymentToken,\n assetPrice[marketIndex],\n syntheticName,\n syntheticSymbol,\n _oracleManager,\n _yieldManager\n );\n }\n\n /// @notice Seeds a new market with initial capital.\n /// @dev Only called when initializing a market.\n /// @param initialMarketSeedForEachMarketSide Amount in wei for which to seed both sides of the market.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n function _seedMarketInitially(uint256 initialMarketSeedForEachMarketSide, uint32 marketIndex)\n internal\n virtual\n {\n require(\n // You require at least 1e18 (1 payment token with 18 decimal places) of the underlying payment token to seed the market.\n initialMarketSeedForEachMarketSide >= 1e18,\n \"Insufficient market seed\"\n );\n\n uint256 amountToLockInYieldManager = initialMarketSeedForEachMarketSide * 2;\n _transferPaymentTokensFromUserToYieldManager(marketIndex, amountToLockInYieldManager);\n IYieldManager(yieldManagers[marketIndex]).depositPaymentToken(amountToLockInYieldManager);\n\n ISyntheticToken(syntheticTokens[marketIndex][true]).mint(\n PERMANENT_INITIAL_LIQUIDITY_HOLDER,\n initialMarketSeedForEachMarketSide\n );\n ISyntheticToken(syntheticTokens[marketIndex][false]).mint(\n PERMANENT_INITIAL_LIQUIDITY_HOLDER,\n initialMarketSeedForEachMarketSide\n );\n\n marketSideValueInPaymentToken[marketIndex][true] = initialMarketSeedForEachMarketSide;\n marketSideValueInPaymentToken[marketIndex][false] = initialMarketSeedForEachMarketSide;\n }\n\n /// @notice Sets a market as active once it has already been setup by createNewSyntheticMarket.\n /// @dev Seperated from createNewSyntheticMarket due to gas considerations.\n /// @param marketIndex An int32 which uniquely identifies the market.\n /// @param kInitialMultiplier Linearly decreasing multiplier for Float token issuance for the market when staking synths.\n /// @param kPeriod Time which kInitialMultiplier will last\n /// @param unstakeFee_e18 Base 1e18 percentage fee levied when unstaking for the market.\n /// @param balanceIncentiveCurve_exponent Sets the degree to which Float token issuance differs\n /// for market sides in unbalanced markets. See Staker.sol\n /// @param balanceIncentiveCurve_equilibriumOffset An offset to account for naturally imbalanced markets\n /// when Float token issuance should differ for market sides. See Staker.sol\n /// @param initialMarketSeedForEachMarketSide Amount of payment token that will be deposited in each market side to seed the market.\n function initializeMarket(\n uint32 marketIndex,\n uint256 kInitialMultiplier,\n uint256 kPeriod,\n uint256 unstakeFee_e18,\n uint256 initialMarketSeedForEachMarketSide,\n uint256 balanceIncentiveCurve_exponent,\n int256 balanceIncentiveCurve_equilibriumOffset,\n uint256 _marketTreasurySplitGradient_e18,\n uint256 marketLeverage\n ) external adminOnly {\n require(\n kInitialMultiplier != 0 &&\n unstakeFee_e18 != 0 &&\n initialMarketSeedForEachMarketSide != 0 &&\n balanceIncentiveCurve_exponent != 0 &&\n _marketTreasurySplitGradient_e18 != 0\n );\n\n require(!marketExists[marketIndex], \"already initialized\");\n require(marketIndex <= latestMarket, \"index too high\");\n\n marketExists[marketIndex] = true;\n\n marketTreasurySplitGradient_e18[marketIndex] = _marketTreasurySplitGradient_e18;\n\n // Set this value to one initially - 0 is a null value and thus potentially bug prone.\n marketUpdateIndex[marketIndex] = 1;\n\n _seedMarketInitially(initialMarketSeedForEachMarketSide, marketIndex);\n\n marketLeverage_e18[marketIndex] = marketLeverage;\n\n // Add new staker funds with fresh synthetic tokens.\n IStaker(staker).addNewStakingFund(\n marketIndex,\n syntheticTokens[marketIndex][true],\n syntheticTokens[marketIndex][false],\n kInitialMultiplier,\n kPeriod,\n unstakeFee_e18,\n balanceIncentiveCurve_exponent,\n balanceIncentiveCurve_equilibriumOffset\n );\n\n IStaker(staker).pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\n marketIndex,\n 1,\n 1e18,\n 1e18,\n initialMarketSeedForEachMarketSide,\n initialMarketSeedForEachMarketSide\n );\n\n emit NewMarketLaunchedAndSeeded(\n marketIndex,\n initialMarketSeedForEachMarketSide,\n marketLeverage\n );\n }\n\n /*╔══════════════════════════════╗\n ║ GETTER FUNCTIONS ║\n ╚══════════════════════════════╝*/\n\n /// @notice Calculates the conversion rate from synthetic tokens to payment tokens.\n /// @dev Synth tokens have a fixed 18 decimals.\n /// @param amountPaymentTokenBackingSynth Amount of payment tokens in that token's lowest denomination.\n /// @param amountSyntheticToken Amount of synth token in wei.\n /// @return syntheticTokenPrice The calculated conversion rate in base 1e18.\n function _getSyntheticTokenPrice(\n uint256 amountPaymentTokenBackingSynth,\n uint256 amountSyntheticToken\n ) internal pure virtual returns (uint256 syntheticTokenPrice) {\n return (amountPaymentTokenBackingSynth * 1e18) / amountSyntheticToken;\n }\n\n /// @notice Converts synth token amounts to payment token amounts at a synth token price.\n /// @dev Price assumed base 1e18.\n /// @param amountSyntheticToken Amount of synth token in wei.\n /// @param syntheticTokenPriceInPaymentTokens The conversion rate from synth to payment tokens in base 1e18.\n /// @return amountPaymentToken The calculated amount of payment tokens in token's lowest denomination.\n function _getAmountPaymentToken(\n uint256 amountSyntheticToken,\n uint256 syntheticTokenPriceInPaymentTokens\n ) internal pure virtual returns (uint256 amountPaymentToken) {\n return (amountSyntheticToken * syntheticTokenPriceInPaymentTokens) / 1e18;\n }\n\n /// @notice Converts payment token amounts to synth token amounts at a synth token price.\n /// @dev Price assumed base 1e18.\n /// @param amountPaymentTokenBackingSynth Amount of payment tokens in that token's lowest denomination.\n /// @param syntheticTokenPriceInPaymentTokens The conversion rate from synth to payment tokens in base 1e18.\n /// @return amountSyntheticToken The calculated amount of synthetic token in wei.\n function _getAmountSyntheticToken(\n uint256 amountPaymentTokenBackingSynth,\n uint256 syntheticTokenPriceInPaymentTokens\n ) internal pure virtual returns (uint256 amountSyntheticToken) {\n return (amountPaymentTokenBackingSynth * 1e18) / syntheticTokenPriceInPaymentTokens;\n }\n\n /**\n @notice Calculate the amount of target side synthetic tokens that are worth the same\n amount of payment tokens as X many synthetic tokens on origin side.\n The resulting equation comes from simplifying this function\n\n _getAmountSyntheticToken(\n _getAmountPaymentToken(\n amountOriginSynth,\n priceOriginSynth\n ),\n priceTargetSynth)\n\n Unpacking the function we get:\n ((amountOriginSynth * priceOriginSynth) / 1e18) * 1e18 / priceTargetSynth\n And simplifying this we get:\n (amountOriginSynth * priceOriginSynth) / priceTargetSynth\n @param amountSyntheticTokens_originSide Amount of synthetic tokens on origin side\n @param syntheticTokenPrice_originSide Price of origin side's synthetic token\n @param syntheticTokenPrice_targetSide Price of target side's synthetic token\n @return equivalentAmountSyntheticTokensOnTargetSide Amount of synthetic token on target side\n */\n function _getEquivalentAmountSyntheticTokensOnTargetSide(\n uint256 amountSyntheticTokens_originSide,\n uint256 syntheticTokenPrice_originSide,\n uint256 syntheticTokenPrice_targetSide\n ) internal pure virtual returns (uint256 equivalentAmountSyntheticTokensOnTargetSide) {\n equivalentAmountSyntheticTokensOnTargetSide =\n (amountSyntheticTokens_originSide * syntheticTokenPrice_originSide) /\n syntheticTokenPrice_targetSide;\n }\n\n /// @notice Given an executed next price shift from tokens on one market side to the other,\n /// determines how many other side tokens the shift was worth.\n /// @dev Intended for use primarily by Staker.sol\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amountSyntheticToken_redeemOnOriginSide Amount of synth token in wei.\n /// @param isShiftFromLong Whether the token shift is from long to short (true), or short to long (false).\n /// @param priceSnapshotIndex Index which identifies which synth prices to use.\n /// @return amountSyntheticTokensToMintOnTargetSide The amount in wei of tokens for the other side that the shift was worth.\n function getAmountSyntheticTokenToMintOnTargetSide(\n uint32 marketIndex,\n uint256 amountSyntheticToken_redeemOnOriginSide,\n bool isShiftFromLong,\n uint256 priceSnapshotIndex\n ) public view virtual override returns (uint256 amountSyntheticTokensToMintOnTargetSide) {\n uint256 syntheticTokenPriceOnOriginSide = syntheticToken_priceSnapshot[marketIndex][\n isShiftFromLong\n ][priceSnapshotIndex];\n uint256 syntheticTokenPriceOnTargetSide = syntheticToken_priceSnapshot[marketIndex][\n !isShiftFromLong\n ][priceSnapshotIndex];\n\n amountSyntheticTokensToMintOnTargetSide = _getEquivalentAmountSyntheticTokensOnTargetSide(\n amountSyntheticToken_redeemOnOriginSide,\n syntheticTokenPriceOnOriginSide,\n syntheticTokenPriceOnTargetSide\n );\n }\n\n /**\n @notice The amount of a synth token a user is owed following a batch execution.\n 4 possible states for next price actions:\n - \"Pending\" - means the next price update hasn't happened or been enacted on by the updateSystemState function.\n - \"Confirmed\" - means the next price has been updated by the updateSystemState function. There is still\n - outstanding (lazy) computation that needs to be executed per user in the batch.\n - \"Settled\" - there is no more computation left for the user.\n - \"Non-existent\" - user has no next price actions.\n This function returns a calculated value only in the case of 'confirmed' next price actions.\n It should return zero for all other types of next price actions.\n @dev Used in SyntheticToken.sol balanceOf to allow for automatic reflection of next price actions.\n @param user The address of the user for whom to execute the function for.\n @param marketIndex An uint32 which uniquely identifies a market.\n @param isLong Whether it is for the long synthetic asset or the short synthetic asset.\n @return confirmedButNotSettledBalance The amount in wei of tokens that the user is owed.\n */\n function getUsersConfirmedButNotSettledSynthBalance(\n address user,\n uint32 marketIndex,\n bool isLong\n )\n external\n view\n virtual\n override\n requireMarketExists(marketIndex)\n returns (uint256 confirmedButNotSettledBalance)\n {\n uint256 currentMarketUpdateIndex = marketUpdateIndex[marketIndex];\n uint256 userNextPrice_currentUpdateIndex_forMarket = userNextPrice_currentUpdateIndex[\n marketIndex\n ][user];\n if (\n userNextPrice_currentUpdateIndex_forMarket != 0 &&\n userNextPrice_currentUpdateIndex_forMarket <= currentMarketUpdateIndex\n ) {\n uint256 amountPaymentTokenDeposited = userNextPrice_paymentToken_depositAmount[marketIndex][\n isLong\n ][user];\n\n if (amountPaymentTokenDeposited > 0) {\n uint256 syntheticTokenPrice = syntheticToken_priceSnapshot[marketIndex][isLong][\n userNextPrice_currentUpdateIndex_forMarket\n ];\n\n confirmedButNotSettledBalance = _getAmountSyntheticToken(\n amountPaymentTokenDeposited,\n syntheticTokenPrice\n );\n }\n\n uint256 amountSyntheticTokensToBeShiftedAwayFromOriginSide = userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[\n marketIndex\n ][!isLong][user];\n\n if (amountSyntheticTokensToBeShiftedAwayFromOriginSide > 0) {\n uint256 syntheticTokenPriceOnOriginSide = syntheticToken_priceSnapshot[marketIndex][\n !isLong\n ][userNextPrice_currentUpdateIndex_forMarket];\n uint256 syntheticTokenPriceOnTargetSide = syntheticToken_priceSnapshot[marketIndex][isLong][\n userNextPrice_currentUpdateIndex_forMarket\n ];\n\n confirmedButNotSettledBalance += _getEquivalentAmountSyntheticTokensOnTargetSide(\n amountSyntheticTokensToBeShiftedAwayFromOriginSide,\n syntheticTokenPriceOnOriginSide,\n syntheticTokenPriceOnTargetSide\n );\n }\n }\n }\n\n /**\n @notice Calculates the percentage in base 1e18 of how much of the accrued yield\n for a market should be allocated to treasury.\n @dev For gas considerations also returns whether the long side is imbalanced.\n @dev For gas considerations totalValueLockedInMarket is passed as a parameter as the function\n calling this function has pre calculated the value\n @param longValue The current total payment token value of the long side of the market.\n @param shortValue The current total payment token value of the short side of the market.\n @param totalValueLockedInMarket Total payment token value of both sides of the market.\n @return isLongSideUnderbalanced Whether the long side initially had less value than the short side.\n @return treasuryYieldPercent_e18 The percentage in base 1e18 of how much of the accrued yield\n for a market should be allocated to treasury.\n */\n function _getYieldSplit(\n uint32 marketIndex,\n uint256 longValue,\n uint256 shortValue,\n uint256 totalValueLockedInMarket\n ) internal view virtual returns (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) {\n isLongSideUnderbalanced = longValue < shortValue;\n uint256 imbalance;\n\n unchecked {\n if (isLongSideUnderbalanced) {\n imbalance = shortValue - longValue;\n } else {\n imbalance = longValue - shortValue;\n }\n }\n\n // marketTreasurySplitGradient_e18 may be adjusted to ensure yield is given\n // to the market at a desired rate e.g. if a market tends to become imbalanced\n // frequently then the gradient can be increased to funnel yield to the market\n // quicker.\n // See this equation in latex: https://ipfs.io/ipfs/QmXsW4cHtxpJ5BFwRcMSUw7s5G11Qkte13NTEfPLTKEx4x\n // Interact with this equation: https://www.desmos.com/calculator/pnl43tfv5b\n uint256 marketPercentCalculated_e18 = (imbalance *\n marketTreasurySplitGradient_e18[marketIndex]) / totalValueLockedInMarket;\n\n uint256 marketPercent_e18 = Math.min(marketPercentCalculated_e18, 1e18);\n\n unchecked {\n treasuryYieldPercent_e18 = 1e18 - marketPercent_e18;\n }\n }\n\n /*╔══════════════════════════════╗\n ║ HELPER FUNCTIONS ║\n ╚══════════════════════════════╝*/\n\n /// @notice First gets yield from the yield manager and allocates it to market and treasury.\n /// It then allocates the full market yield portion to the underbalanced side of the market.\n /// NB this function also adjusts the value of the long and short side based on the latest\n /// price of the underlying asset received from the oracle. This function should ideally be\n /// called everytime there is an price update from the oracle. We have built a bot that does this.\n /// The system is still perectly safe if not called every price update, the synthetic will just\n /// less closely track the underlying asset.\n /// @dev In one function as yield should be allocated before rebalancing.\n /// This prevents an attack whereby the user imbalances a side to capture all accrued yield.\n /// @param marketIndex The market for which to execute the function for.\n /// @param newAssetPrice The new asset price.\n /// @return longValue The value of the long side after rebalancing.\n /// @return shortValue The value of the short side after rebalancing.\n function _claimAndDistributeYieldThenRebalanceMarket(uint32 marketIndex, int256 newAssetPrice)\n internal\n virtual\n returns (uint256 longValue, uint256 shortValue)\n {\n int256 oldAssetPrice = assetPrice[marketIndex];\n // Claiming and distributing the yield\n longValue = marketSideValueInPaymentToken[marketIndex][true];\n shortValue = marketSideValueInPaymentToken[marketIndex][false];\n uint256 totalValueLockedInMarket = longValue + shortValue;\n\n (bool isLongSideUnderbalanced, uint256 treasuryYieldPercent_e18) = _getYieldSplit(\n marketIndex,\n longValue,\n shortValue,\n totalValueLockedInMarket\n );\n\n uint256 marketAmount = IYieldManager(yieldManagers[marketIndex])\n .distributeYieldForTreasuryAndReturnMarketAllocation(\n totalValueLockedInMarket,\n treasuryYieldPercent_e18\n );\n\n if (marketAmount > 0) {\n if (isLongSideUnderbalanced) {\n longValue += marketAmount;\n } else {\n shortValue += marketAmount;\n }\n }\n\n // Adjusting value of long and short pool based on price movement\n // The side/position with less liquidity has 100% percent exposure to the price movement.\n // The side/position with more liquidity will have exposure < 100% to the price movement.\n // I.e. Imagine $100 in longValue and $50 shortValue\n // long side would have $50/$100 = 50% exposure to price movements based on the liquidity imbalance.\n // min(longValue, shortValue) = $50 , therefore if the price change was -10% then\n // $50 * 10% = $5 gained for short side and conversely $5 lost for long side.\n int256 underbalancedSideValue = int256(Math.min(longValue, shortValue));\n\n // See this equation in latex: https://ipfs.io/ipfs/QmPeJ3SZdn1GfxqCD4GDYyWTJGPMSHkjPJaxrzk2qTTPSE\n // Interact with this equation: https://www.desmos.com/calculator/t8gr6j5vsq\n int256 valueChange = ((newAssetPrice - oldAssetPrice) *\n underbalancedSideValue *\n int256(marketLeverage_e18[marketIndex])) / (oldAssetPrice * 1e18);\n\n if (valueChange < 0) {\n valueChange = -valueChange; // make value change positive\n\n // handle 'impossible' edge case where underlying price feed changes more than 100% downwards gracefully.\n if (uint256(valueChange) > longValue) {\n valueChange = (int256(longValue) * 99999) / 100000;\n }\n longValue -= uint256(valueChange);\n shortValue += uint256(valueChange);\n } else {\n // handle 'impossible' edge case where underlying price feed changes more than 100% upwards gracefully.\n if (uint256(valueChange) > shortValue) {\n valueChange = (int256(shortValue) * 99999) / 100000;\n }\n longValue += uint256(valueChange);\n shortValue -= uint256(valueChange);\n }\n }\n\n /*╔═══════════════════════════════╗\n ║ UPDATING SYSTEM STATE ║\n ╚═══════════════════════════════╝*/\n\n /// @notice Updates the value of the long and short sides to account for latest oracle price updates\n /// and batches all next price actions.\n /// @dev To prevent front-running only executes on price change from an oracle.\n /// We assume the function will be called for each market at least once per price update.\n /// Note Even if not called on every price update, this won't affect security, it will only affect how closely\n /// the synthetic asset actually tracks the underlying asset.\n /// @param marketIndex The market index for which to update.\n function _updateSystemStateInternal(uint32 marketIndex)\n internal\n virtual\n requireMarketExists(marketIndex)\n {\n // If a negative int is return this should fail.\n int256 newAssetPrice = IOracleManager(oracleManagers[marketIndex]).updatePrice();\n\n uint256 currentMarketIndex = marketUpdateIndex[marketIndex];\n\n bool assetPriceHasChanged = assetPrice[marketIndex] != newAssetPrice;\n\n if (assetPriceHasChanged) {\n uint256 syntheticTokenPrice_inPaymentTokens_long = syntheticToken_priceSnapshot[marketIndex][\n true\n ][currentMarketIndex];\n uint256 syntheticTokenPrice_inPaymentTokens_short = syntheticToken_priceSnapshot[marketIndex][\n false\n ][currentMarketIndex];\n // if there is a price change and the 'staker' contract has pending updates, push the stakers price snapshot index to the staker\n // (so the staker can handle its internal accounting)\n\n (\n uint256 newLongPoolValue,\n uint256 newShortPoolValue\n ) = _claimAndDistributeYieldThenRebalanceMarket(marketIndex, newAssetPrice);\n\n syntheticTokenPrice_inPaymentTokens_long = _getSyntheticTokenPrice(\n newLongPoolValue,\n ISyntheticToken(syntheticTokens[marketIndex][true]).totalSupply()\n );\n syntheticTokenPrice_inPaymentTokens_short = _getSyntheticTokenPrice(\n newShortPoolValue,\n ISyntheticToken(syntheticTokens[marketIndex][false]).totalSupply()\n );\n\n assetPrice[marketIndex] = newAssetPrice;\n\n currentMarketIndex++;\n marketUpdateIndex[marketIndex] = currentMarketIndex;\n\n syntheticToken_priceSnapshot[marketIndex][true][\n currentMarketIndex\n ] = syntheticTokenPrice_inPaymentTokens_long;\n\n syntheticToken_priceSnapshot[marketIndex][false][\n currentMarketIndex\n ] = syntheticTokenPrice_inPaymentTokens_short;\n\n (\n int256 long_changeInMarketValue_inPaymentToken,\n int256 short_changeInMarketValue_inPaymentToken\n ) = _batchConfirmOutstandingPendingActions(\n marketIndex,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short\n );\n\n newLongPoolValue = uint256(\n int256(newLongPoolValue) + long_changeInMarketValue_inPaymentToken\n );\n newShortPoolValue = uint256(\n int256(newShortPoolValue) + short_changeInMarketValue_inPaymentToken\n );\n marketSideValueInPaymentToken[marketIndex][true] = newLongPoolValue;\n marketSideValueInPaymentToken[marketIndex][false] = newShortPoolValue;\n\n IStaker(staker).pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\n marketIndex,\n currentMarketIndex,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short,\n newLongPoolValue,\n newShortPoolValue\n );\n\n emit SystemStateUpdated(\n marketIndex,\n currentMarketIndex,\n newAssetPrice,\n newLongPoolValue,\n newShortPoolValue,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short\n );\n }\n }\n\n /// @notice Updates the state of a market to account for the latest oracle price update.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n function updateSystemState(uint32 marketIndex) external override {\n _updateSystemStateInternal(marketIndex);\n }\n\n /// @notice Updates the state of multiples markets to account for their latest oracle price updates.\n /// @param marketIndexes An array of int32s which uniquely identify markets.\n function updateSystemStateMulti(uint32[] calldata marketIndexes) external override {\n uint256 length = marketIndexes.length;\n for (uint256 i = 0; i < length; i++) {\n _updateSystemStateInternal(marketIndexes[i]);\n }\n }\n\n /*╔═══════════════════════════╗\n ║ DEPOSIT ║\n ╚═══════════════════════════╝*/\n\n /// @notice Transfers payment tokens for a market from msg.sender to this contract.\n /// @dev Tokens are transferred directly to this contract to be deposited by the yield manager in the batch to earn yield.\n /// Since we check the return value of the transferFrom method, all payment tokens we use must conform to the ERC20 standard.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amount Amount of payment tokens in that token's lowest denominationto deposit.\n function _transferPaymentTokensFromUserToYieldManager(uint32 marketIndex, uint256 amount)\n internal\n virtual\n {\n IERC20(paymentTokens[marketIndex]).safeTransferFrom(\n msg.sender,\n yieldManagers[marketIndex],\n amount\n );\n }\n\n /*╔═══════════════════════════╗\n ║ MINT POSITION ║\n ╚═══════════════════════════╝*/\n\n /// @notice Allows users to mint synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\n /// @dev Called by external functions to mint either long or short. If a user mints multiple times before a price update, these are treated as a single mint.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\n /// @param isLong Whether the mint is for a long or short synth.\n function _mintNextPrice(\n uint32 marketIndex,\n uint256 amount,\n bool isLong\n )\n internal\n virtual\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\n gemCollecting\n {\n _transferPaymentTokensFromUserToYieldManager(marketIndex, amount);\n\n batched_amountPaymentToken_deposit[marketIndex][isLong] += amount;\n userNextPrice_paymentToken_depositAmount[marketIndex][isLong][msg.sender] += amount;\n uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1;\n userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex;\n\n emit NextPriceDeposit(marketIndex, isLong, amount, msg.sender, nextUpdateIndex);\n }\n\n /// @notice Allows users to mint long synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\n function mintLongNextPrice(uint32 marketIndex, uint256 amount) external override {\n _mintNextPrice(marketIndex, amount, true);\n }\n\n /// @notice Allows users to mint short synthetic assets for a market. To prevent front-running these mints are executed on the next price update from the oracle.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amount Amount of payment tokens in that token's lowest denominationfor which to mint synthetic assets at next price.\n function mintShortNextPrice(uint32 marketIndex, uint256 amount) external override {\n _mintNextPrice(marketIndex, amount, false);\n }\n\n /*╔═══════════════════════════╗\n ║ REDEEM POSITION ║\n ╚═══════════════════════════╝*/\n\n /// @notice Allows users to redeem their synthetic tokens for payment tokens. To prevent front-running these redeems are executed on the next price update from the oracle.\n /// @dev Called by external functions to redeem either long or short. Payment tokens are actually transferred to the user when executeOutstandingNextPriceSettlements is called from a function call by the user.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param tokens_redeem Amount in wei of synth tokens to redeem.\n /// @param isLong Whether this redeem is for a long or short synth.\n function _redeemNextPrice(\n uint32 marketIndex,\n uint256 tokens_redeem,\n bool isLong\n )\n internal\n virtual\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\n gemCollecting\n {\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).transferFrom(\n msg.sender,\n address(this),\n tokens_redeem\n );\n\n userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][msg.sender] += tokens_redeem;\n uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1;\n userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex;\n\n batched_amountSyntheticToken_redeem[marketIndex][isLong] += tokens_redeem;\n\n emit NextPriceRedeem(marketIndex, isLong, tokens_redeem, msg.sender, nextUpdateIndex);\n }\n\n /// @notice Allows users to redeem long synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param tokens_redeem Amount in wei of synth tokens to redeem at the next oracle price.\n function redeemLongNextPrice(uint32 marketIndex, uint256 tokens_redeem) external override {\n _redeemNextPrice(marketIndex, tokens_redeem, true);\n }\n\n /// @notice Allows users to redeem short synthetic assets for a market. To prevent front-running these redeems are executed on the next price update from the oracle.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param tokens_redeem Amount in wei of synth tokens to redeem at the next oracle price.\n function redeemShortNextPrice(uint32 marketIndex, uint256 tokens_redeem) external override {\n _redeemNextPrice(marketIndex, tokens_redeem, false);\n }\n\n /*╔═══════════════════════════╗\n ║ SHIFT POSITION ║\n ╚═══════════════════════════╝*/\n\n /// @notice Allows users to shift their position from one side of the market to the other in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\n /// @dev Called by external functions to shift either way. Intended for primary use by Staker.sol\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from the one side to the other at the next oracle price update.\n /// @param isShiftFromLong Whether the token shift is from long to short (true), or short to long (false).\n function shiftPositionNextPrice(\n uint32 marketIndex,\n uint256 amountSyntheticTokensToShift,\n bool isShiftFromLong\n )\n public\n virtual\n override\n updateSystemStateMarketAndExecuteOutstandingNextPriceSettlements(msg.sender, marketIndex)\n gemCollecting\n {\n require(\n ISyntheticToken(syntheticTokens[marketIndex][isShiftFromLong]).transferFrom(\n msg.sender,\n address(this),\n amountSyntheticTokensToShift\n )\n );\n\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][\n msg.sender\n ] += amountSyntheticTokensToShift;\n uint256 nextUpdateIndex = marketUpdateIndex[marketIndex] + 1;\n userNextPrice_currentUpdateIndex[marketIndex][msg.sender] = nextUpdateIndex;\n\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][\n isShiftFromLong\n ] += amountSyntheticTokensToShift;\n\n emit NextPriceSyntheticPositionShift(\n marketIndex,\n isShiftFromLong,\n amountSyntheticTokensToShift,\n msg.sender,\n nextUpdateIndex\n );\n }\n\n /// @notice Allows users to shift their position from long to short in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from long to short the next oracle price update.\n function shiftPositionFromLongNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\n external\n override\n {\n shiftPositionNextPrice(marketIndex, amountSyntheticTokensToShift, true);\n }\n\n /// @notice Allows users to shift their position from short to long in a single transaction. To prevent front-running these shifts are executed on the next price update from the oracle.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param amountSyntheticTokensToShift Amount in wei of synthetic tokens to shift from the short to long at the next oracle price update.\n function shiftPositionFromShortNextPrice(uint32 marketIndex, uint256 amountSyntheticTokensToShift)\n external\n override\n {\n shiftPositionNextPrice(marketIndex, amountSyntheticTokensToShift, false);\n }\n\n /*╔════════════════════════════════╗\n ║ NEXT PRICE SETTLEMENTS ║\n ╚════════════════════════════════╝*/\n\n /// @notice Transfers outstanding synth tokens from a next price mint to the user.\n /// @dev The outstanding synths should already be reflected for the user due to balanceOf in SyntheticToken.sol, this just does the accounting.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param user The address of the user for whom to execute the function for.\n /// @param isLong Whether this is for the long or short synth for the market.\n function _executeOutstandingNextPriceMints(\n uint32 marketIndex,\n address user,\n bool isLong\n ) internal virtual {\n uint256 currentPaymentTokenDepositAmount = userNextPrice_paymentToken_depositAmount[\n marketIndex\n ][isLong][user];\n if (currentPaymentTokenDepositAmount > 0) {\n userNextPrice_paymentToken_depositAmount[marketIndex][isLong][user] = 0;\n uint256 amountSyntheticTokensToTransferToUser = _getAmountSyntheticToken(\n currentPaymentTokenDepositAmount,\n syntheticToken_priceSnapshot[marketIndex][isLong][\n userNextPrice_currentUpdateIndex[marketIndex][user]\n ]\n );\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).transfer(\n user,\n amountSyntheticTokensToTransferToUser\n );\n }\n }\n\n /// @notice Transfers outstanding payment tokens from a next price redemption to the user.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param user The address of the user for whom to execute the function for.\n /// @param isLong Whether this is for the long or short synth for the market.\n function _executeOutstandingNextPriceRedeems(\n uint32 marketIndex,\n address user,\n bool isLong\n ) internal virtual {\n uint256 currentSyntheticTokenRedemptions = userNextPrice_syntheticToken_redeemAmount[\n marketIndex\n ][isLong][user];\n if (currentSyntheticTokenRedemptions > 0) {\n userNextPrice_syntheticToken_redeemAmount[marketIndex][isLong][user] = 0;\n uint256 amountPaymentToken_toRedeem = _getAmountPaymentToken(\n currentSyntheticTokenRedemptions,\n syntheticToken_priceSnapshot[marketIndex][isLong][\n userNextPrice_currentUpdateIndex[marketIndex][user]\n ]\n );\n\n IYieldManager(yieldManagers[marketIndex]).transferPaymentTokensToUser(\n user,\n amountPaymentToken_toRedeem\n );\n }\n }\n\n /// @notice Transfers outstanding synth tokens from a next price position shift to the user.\n /// @dev The outstanding synths should already be reflected for the user due to balanceOf in SyntheticToken.sol, this just does the accounting.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param user The address of the user for whom to execute the function for.\n /// @param isShiftFromLong Whether the token shift was from long to short (true), or short to long (false).\n function _executeOutstandingNextPriceTokenShifts(\n uint32 marketIndex,\n address user,\n bool isShiftFromLong\n ) internal virtual {\n uint256 syntheticToken_toShiftAwayFrom_marketSide = userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[\n marketIndex\n ][isShiftFromLong][user];\n if (syntheticToken_toShiftAwayFrom_marketSide > 0) {\n uint256 syntheticToken_toShiftTowardsTargetSide = getAmountSyntheticTokenToMintOnTargetSide(\n marketIndex,\n syntheticToken_toShiftAwayFrom_marketSide,\n isShiftFromLong,\n userNextPrice_currentUpdateIndex[marketIndex][user]\n );\n\n userNextPrice_syntheticToken_toShiftAwayFrom_marketSide[marketIndex][isShiftFromLong][\n user\n ] = 0;\n\n require(\n ISyntheticToken(syntheticTokens[marketIndex][!isShiftFromLong]).transfer(\n user,\n syntheticToken_toShiftTowardsTargetSide\n )\n );\n }\n }\n\n /// @notice After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user.\n /// @dev Once the market has updated for the next price, should be guaranteed (through modifiers) to execute for a user before user initiation of new next price actions.\n /// @param user The address of the user for whom to execute the function.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n function _executeOutstandingNextPriceSettlements(address user, uint32 marketIndex)\n internal\n virtual\n {\n uint256 userCurrentUpdateIndex = userNextPrice_currentUpdateIndex[marketIndex][user];\n if (userCurrentUpdateIndex != 0 && userCurrentUpdateIndex <= marketUpdateIndex[marketIndex]) {\n _executeOutstandingNextPriceMints(marketIndex, user, true);\n _executeOutstandingNextPriceMints(marketIndex, user, false);\n _executeOutstandingNextPriceRedeems(marketIndex, user, true);\n _executeOutstandingNextPriceRedeems(marketIndex, user, false);\n _executeOutstandingNextPriceTokenShifts(marketIndex, user, true);\n _executeOutstandingNextPriceTokenShifts(marketIndex, user, false);\n\n userNextPrice_currentUpdateIndex[marketIndex][user] = 0;\n\n emit ExecuteNextPriceSettlementsUser(user, marketIndex);\n }\n }\n\n /// @notice After markets have been batched updated on a new oracle price, transfers any owed tokens to a user from their next price actions for that update to that user.\n /// @param user The address of the user for whom to execute the function.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n function executeOutstandingNextPriceSettlementsUser(address user, uint32 marketIndex)\n external\n override\n {\n _executeOutstandingNextPriceSettlements(user, marketIndex);\n }\n\n /// @notice Executes outstanding next price settlements for a user for multiple markets.\n /// @param user The address of the user for whom to execute the function.\n /// @param marketIndexes An array of int32s which each uniquely identify a market.\n function executeOutstandingNextPriceSettlementsUserMulti(\n address user,\n uint32[] memory marketIndexes\n ) external {\n uint256 length = marketIndexes.length;\n for (uint256 i = 0; i < length; i++) {\n _executeOutstandingNextPriceSettlements(user, marketIndexes[i]);\n }\n }\n\n /*╔═══════════════════════════════════════════╗\n ║ BATCHED NEXT PRICE SETTLEMENT ACTIONS ║\n ╚═══════════════════════════════════════════╝*/\n\n /// @notice Either transfers funds from the yield manager to this contract if redeems > deposits,\n /// and vice versa. The yield manager handles depositing and withdrawing the funds from a yield market.\n /// @dev When all batched next price actions are handled the total value in the market can either increase or decrease based on the value of mints and redeems.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param totalPaymentTokenValueChangeForMarket An int256 which indicates the magnitude and direction of the change in market value.\n function _handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\n uint32 marketIndex,\n int256 totalPaymentTokenValueChangeForMarket\n ) internal virtual {\n if (totalPaymentTokenValueChangeForMarket > 0) {\n IYieldManager(yieldManagers[marketIndex]).depositPaymentToken(\n uint256(totalPaymentTokenValueChangeForMarket)\n );\n } else if (totalPaymentTokenValueChangeForMarket < 0) {\n // NB there will be issues here if not enough liquidity exists to withdraw\n // Boolean should be returned from yield manager and think how to appropriately handle this\n IYieldManager(yieldManagers[marketIndex]).removePaymentTokenFromMarket(\n uint256(-totalPaymentTokenValueChangeForMarket)\n );\n }\n }\n\n /// @notice Given a desired change in synth token supply, either mints or burns tokens to achieve that desired change.\n /// @dev When all batched next price actions are executed total supply for a synth can either increase or decrease.\n /// @param marketIndex An uint32 which uniquely identifies a market.\n /// @param isLong Whether this function should execute for the long or short synth for the market.\n /// @param changeInSyntheticTokensTotalSupply The amount in wei by which synth token supply should change.\n function _handleChangeInSyntheticTokensTotalSupply(\n uint32 marketIndex,\n bool isLong,\n int256 changeInSyntheticTokensTotalSupply\n ) internal virtual {\n if (changeInSyntheticTokensTotalSupply > 0) {\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).mint(\n address(this),\n uint256(changeInSyntheticTokensTotalSupply)\n );\n } else if (changeInSyntheticTokensTotalSupply < 0) {\n ISyntheticToken(syntheticTokens[marketIndex][isLong]).burn(\n uint256(-changeInSyntheticTokensTotalSupply)\n );\n }\n }\n\n /**\n @notice Performs all batched next price actions on an oracle price update.\n @dev Mints or burns all synthetic tokens for this contract.\n\n After this function is executed all user actions in that batch are confirmed and can be settled individually by\n calling _executeOutstandingNexPriceSettlements for a given user.\n\n The maths here is safe from rounding errors since it always over estimates on the batch with division.\n (as an example (5/3) + (5/3) = 2 but (5+5)/3 = 10/3 = 3, so the batched action would mint one more)\n @param marketIndex An uint32 which uniquely identifies a market.\n @param syntheticTokenPrice_inPaymentTokens_long The long synthetic token price for this oracle price update.\n @param syntheticTokenPrice_inPaymentTokens_short The short synthetic token price for this oracle price update.\n @return long_changeInMarketValue_inPaymentToken The total value change for the long side after all batched actions are executed.\n @return short_changeInMarketValue_inPaymentToken The total value change for the short side after all batched actions are executed.\n */\n function _batchConfirmOutstandingPendingActions(\n uint32 marketIndex,\n uint256 syntheticTokenPrice_inPaymentTokens_long,\n uint256 syntheticTokenPrice_inPaymentTokens_short\n )\n internal\n virtual\n returns (\n int256 long_changeInMarketValue_inPaymentToken,\n int256 short_changeInMarketValue_inPaymentToken\n )\n {\n int256 changeInSupply_syntheticToken_long;\n int256 changeInSupply_syntheticToken_short;\n\n // NOTE: the only reason we are reusing amountForCurrentAction_workingVariable for all actions (redeemLong, redeemShort, mintLong, mintShort, shiftFromLong, shiftFromShort) is to reduce stack usage\n uint256 amountForCurrentAction_workingVariable = batched_amountPaymentToken_deposit[\n marketIndex\n ][true];\n\n // Handle batched deposits LONG\n if (amountForCurrentAction_workingVariable > 0) {\n long_changeInMarketValue_inPaymentToken = int256(amountForCurrentAction_workingVariable);\n\n batched_amountPaymentToken_deposit[marketIndex][true] = 0;\n\n changeInSupply_syntheticToken_long = int256(\n _getAmountSyntheticToken(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_long\n )\n );\n }\n\n // Handle batched deposits SHORT\n amountForCurrentAction_workingVariable = batched_amountPaymentToken_deposit[marketIndex][false];\n if (amountForCurrentAction_workingVariable > 0) {\n short_changeInMarketValue_inPaymentToken = int256(amountForCurrentAction_workingVariable);\n\n batched_amountPaymentToken_deposit[marketIndex][false] = 0;\n\n changeInSupply_syntheticToken_short = int256(\n _getAmountSyntheticToken(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_short\n )\n );\n }\n\n // Handle shift tokens from LONG to SHORT\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_toShiftAwayFrom_marketSide[\n marketIndex\n ][true];\n\n if (amountForCurrentAction_workingVariable > 0) {\n int256 paymentTokenValueChangeForShiftToShort = int256(\n _getAmountPaymentToken(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_long\n )\n );\n\n long_changeInMarketValue_inPaymentToken -= paymentTokenValueChangeForShiftToShort;\n short_changeInMarketValue_inPaymentToken += paymentTokenValueChangeForShiftToShort;\n\n changeInSupply_syntheticToken_long -= int256(amountForCurrentAction_workingVariable);\n changeInSupply_syntheticToken_short += int256(\n _getEquivalentAmountSyntheticTokensOnTargetSide(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_long,\n syntheticTokenPrice_inPaymentTokens_short\n )\n );\n\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][true] = 0;\n }\n\n // Handle shift tokens from SHORT to LONG\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_toShiftAwayFrom_marketSide[\n marketIndex\n ][false];\n if (amountForCurrentAction_workingVariable > 0) {\n int256 paymentTokenValueChangeForShiftToLong = int256(\n _getAmountPaymentToken(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_short\n )\n );\n\n short_changeInMarketValue_inPaymentToken -= paymentTokenValueChangeForShiftToLong;\n long_changeInMarketValue_inPaymentToken += paymentTokenValueChangeForShiftToLong;\n\n changeInSupply_syntheticToken_short -= int256(amountForCurrentAction_workingVariable);\n changeInSupply_syntheticToken_long += int256(\n _getEquivalentAmountSyntheticTokensOnTargetSide(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_short,\n syntheticTokenPrice_inPaymentTokens_long\n )\n );\n\n batched_amountSyntheticToken_toShiftAwayFrom_marketSide[marketIndex][false] = 0;\n }\n\n // Handle batched redeems LONG\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_redeem[marketIndex][true];\n if (amountForCurrentAction_workingVariable > 0) {\n long_changeInMarketValue_inPaymentToken -= int256(\n _getAmountPaymentToken(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_long\n )\n );\n changeInSupply_syntheticToken_long -= int256(amountForCurrentAction_workingVariable);\n\n batched_amountSyntheticToken_redeem[marketIndex][true] = 0;\n }\n\n // Handle batched redeems SHORT\n amountForCurrentAction_workingVariable = batched_amountSyntheticToken_redeem[marketIndex][\n false\n ];\n if (amountForCurrentAction_workingVariable > 0) {\n short_changeInMarketValue_inPaymentToken -= int256(\n _getAmountPaymentToken(\n amountForCurrentAction_workingVariable,\n syntheticTokenPrice_inPaymentTokens_short\n )\n );\n changeInSupply_syntheticToken_short -= int256(amountForCurrentAction_workingVariable);\n\n batched_amountSyntheticToken_redeem[marketIndex][false] = 0;\n }\n\n // Batch settle payment tokens\n _handleTotalPaymentTokenValueChangeForMarketWithYieldManager(\n marketIndex,\n long_changeInMarketValue_inPaymentToken + short_changeInMarketValue_inPaymentToken\n );\n // Batch settle synthetic tokens\n _handleChangeInSyntheticTokensTotalSupply(\n marketIndex,\n true,\n changeInSupply_syntheticToken_long\n );\n _handleChangeInSyntheticTokensTotalSupply(\n marketIndex,\n false,\n changeInSupply_syntheticToken_short\n );\n }\n}\n" + }, + "contracts/testing/generated/StakerMockable.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\";\nimport \"../../abstract/AccessControlledAndUpgradeable.sol\";\nimport \"../../interfaces/IFloatToken.sol\";\nimport \"../../interfaces/ILongShort.sol\";\nimport \"../../interfaces/IStaker.sol\";\nimport \"../../interfaces/ISyntheticToken.sol\";\nimport \"../../GEMS.sol\";\nimport \"hardhat/console.sol\";\n\nimport \"./StakerForInternalMocking.sol\";\nimport \"../StakerInternalStateSetters.sol\";\n\ncontract StakerMockable is StakerInternalStateSetters {\n StakerForInternalMocking mocker;\n bool shouldUseMock;\n string functionToNotMock;\n\n function setMocker(StakerForInternalMocking _mocker) external {\n mocker = _mocker;\n shouldUseMock = true;\n }\n\n function setFunctionToNotMock(string calldata _functionToNotMock) external {\n functionToNotMock = _functionToNotMock;\n shouldUseMock = true;\n }\n\n function onlyAdminModifierLogicExposed() external {\n return super.onlyAdminModifierLogic();\n }\n\n function onlyAdminModifierLogic() internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"onlyAdminModifierLogic\"))\n ) {\n return mocker.onlyAdminModifierLogicMock();\n } else {\n return super.onlyAdminModifierLogic();\n }\n }\n\n function onlyValidSyntheticModifierLogicExposed(address _synth) external {\n return super.onlyValidSyntheticModifierLogic(_synth);\n }\n\n function onlyValidSyntheticModifierLogic(address _synth) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"onlyValidSyntheticModifierLogic\"))\n ) {\n return mocker.onlyValidSyntheticModifierLogicMock(_synth);\n } else {\n return super.onlyValidSyntheticModifierLogic(_synth);\n }\n }\n\n function onlyLongShortModifierLogicExposed() external {\n return super.onlyLongShortModifierLogic();\n }\n\n function onlyLongShortModifierLogic() internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"onlyLongShortModifierLogic\"))\n ) {\n return mocker.onlyLongShortModifierLogicMock();\n } else {\n return super.onlyLongShortModifierLogic();\n }\n }\n\n function _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShiftsExposed(\n uint32 marketIndex,\n address user\n ) external {\n return\n super._updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\n marketIndex,\n user\n );\n }\n\n function _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\n uint32 marketIndex,\n address user\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(\n abi.encodePacked(\n \"_updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts\"\n )\n )\n ) {\n return\n mocker._updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShiftsMock(\n marketIndex,\n user\n );\n } else {\n return\n super._updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\n marketIndex,\n user\n );\n }\n }\n\n function _changeFloatPercentageExposed(uint256 newFloatPercentage) external {\n return super._changeFloatPercentage(newFloatPercentage);\n }\n\n function _changeFloatPercentage(uint256 newFloatPercentage) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_changeFloatPercentage\"))\n ) {\n return mocker._changeFloatPercentageMock(newFloatPercentage);\n } else {\n return super._changeFloatPercentage(newFloatPercentage);\n }\n }\n\n function _changeUnstakeFeeExposed(uint32 marketIndex, uint256 newMarketUnstakeFee_e18) external {\n return super._changeUnstakeFee(marketIndex, newMarketUnstakeFee_e18);\n }\n\n function _changeUnstakeFee(uint32 marketIndex, uint256 newMarketUnstakeFee_e18)\n internal\n override\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_changeUnstakeFee\"))\n ) {\n return mocker._changeUnstakeFeeMock(marketIndex, newMarketUnstakeFee_e18);\n } else {\n return super._changeUnstakeFee(marketIndex, newMarketUnstakeFee_e18);\n }\n }\n\n function _changeBalanceIncentiveParametersExposed(\n uint32 marketIndex,\n uint256 _balanceIncentiveCurve_exponent,\n int256 _balanceIncentiveCurve_equilibriumOffset,\n uint256 _safeExponentBitShifting\n ) external {\n return\n super._changeBalanceIncentiveParameters(\n marketIndex,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n _safeExponentBitShifting\n );\n }\n\n function _changeBalanceIncentiveParameters(\n uint32 marketIndex,\n uint256 _balanceIncentiveCurve_exponent,\n int256 _balanceIncentiveCurve_equilibriumOffset,\n uint256 _safeExponentBitShifting\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_changeBalanceIncentiveParameters\"))\n ) {\n return\n mocker._changeBalanceIncentiveParametersMock(\n marketIndex,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n _safeExponentBitShifting\n );\n } else {\n return\n super._changeBalanceIncentiveParameters(\n marketIndex,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n _safeExponentBitShifting\n );\n }\n }\n\n function _getMarketLaunchIncentiveParametersExposed(uint32 marketIndex)\n external\n view\n returns (uint256 period, uint256 multiplier)\n {\n return super._getMarketLaunchIncentiveParameters(marketIndex);\n }\n\n function _getMarketLaunchIncentiveParameters(uint32 marketIndex)\n internal\n view\n override\n returns (uint256 period, uint256 multiplier)\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_getMarketLaunchIncentiveParameters\"))\n ) {\n return mocker._getMarketLaunchIncentiveParametersMock(marketIndex);\n } else {\n return super._getMarketLaunchIncentiveParameters(marketIndex);\n }\n }\n\n function _getKValueExposed(uint32 marketIndex) external view returns (uint256) {\n return super._getKValue(marketIndex);\n }\n\n function _getKValue(uint32 marketIndex) internal view override returns (uint256) {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) != keccak256(abi.encodePacked(\"_getKValue\"))\n ) {\n return mocker._getKValueMock(marketIndex);\n } else {\n return super._getKValue(marketIndex);\n }\n }\n\n function _calculateFloatPerSecondExposed(\n uint32 marketIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) external view returns (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) {\n return\n super._calculateFloatPerSecond(marketIndex, longPrice, shortPrice, longValue, shortValue);\n }\n\n function _calculateFloatPerSecond(\n uint32 marketIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) internal view override returns (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_calculateFloatPerSecond\"))\n ) {\n return\n mocker._calculateFloatPerSecondMock(\n marketIndex,\n longPrice,\n shortPrice,\n longValue,\n shortValue\n );\n } else {\n return\n super._calculateFloatPerSecond(marketIndex, longPrice, shortPrice, longValue, shortValue);\n }\n }\n\n function _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshotExposed(\n uint32 marketIndex,\n uint256 previousMarketUpdateIndex\n ) external view returns (uint256 timeDelta) {\n return\n super._calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\n marketIndex,\n previousMarketUpdateIndex\n );\n }\n\n function _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\n uint32 marketIndex,\n uint256 previousMarketUpdateIndex\n ) internal view override returns (uint256 timeDelta) {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(\n abi.encodePacked(\"_calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot\")\n )\n ) {\n return\n mocker._calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshotMock(\n marketIndex,\n previousMarketUpdateIndex\n );\n } else {\n return\n super._calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\n marketIndex,\n previousMarketUpdateIndex\n );\n }\n }\n\n function _calculateNewCumulativeIssuancePerStakedSynthExposed(\n uint32 marketIndex,\n uint256 previousMarketUpdateIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) external view returns (uint256 longCumulativeRates, uint256 shortCumulativeRates) {\n return\n super._calculateNewCumulativeIssuancePerStakedSynth(\n marketIndex,\n previousMarketUpdateIndex,\n longPrice,\n shortPrice,\n longValue,\n shortValue\n );\n }\n\n function _calculateNewCumulativeIssuancePerStakedSynth(\n uint32 marketIndex,\n uint256 previousMarketUpdateIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) internal view override returns (uint256 longCumulativeRates, uint256 shortCumulativeRates) {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_calculateNewCumulativeIssuancePerStakedSynth\"))\n ) {\n return\n mocker._calculateNewCumulativeIssuancePerStakedSynthMock(\n marketIndex,\n previousMarketUpdateIndex,\n longPrice,\n shortPrice,\n longValue,\n shortValue\n );\n } else {\n return\n super._calculateNewCumulativeIssuancePerStakedSynth(\n marketIndex,\n previousMarketUpdateIndex,\n longPrice,\n shortPrice,\n longValue,\n shortValue\n );\n }\n }\n\n function _calculateAccumulatedFloatInRangeExposed(\n uint32 marketIndex,\n uint256 amountStakedLong,\n uint256 amountStakedShort,\n uint256 rewardIndexFrom,\n uint256 rewardIndexTo\n ) external view returns (uint256 floatReward) {\n return\n super._calculateAccumulatedFloatInRange(\n marketIndex,\n amountStakedLong,\n amountStakedShort,\n rewardIndexFrom,\n rewardIndexTo\n );\n }\n\n function _calculateAccumulatedFloatInRange(\n uint32 marketIndex,\n uint256 amountStakedLong,\n uint256 amountStakedShort,\n uint256 rewardIndexFrom,\n uint256 rewardIndexTo\n ) internal view override returns (uint256 floatReward) {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_calculateAccumulatedFloatInRange\"))\n ) {\n return\n mocker._calculateAccumulatedFloatInRangeMock(\n marketIndex,\n amountStakedLong,\n amountStakedShort,\n rewardIndexFrom,\n rewardIndexTo\n );\n } else {\n return\n super._calculateAccumulatedFloatInRange(\n marketIndex,\n amountStakedLong,\n amountStakedShort,\n rewardIndexFrom,\n rewardIndexTo\n );\n }\n }\n\n function _calculateAccumulatedFloatAndExecuteOutstandingShiftsExposed(\n uint32 marketIndex,\n address user\n ) external returns (uint256 floatReward) {\n return super._calculateAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\n }\n\n function _calculateAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user)\n internal\n override\n returns (uint256 floatReward)\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_calculateAccumulatedFloatAndExecuteOutstandingShifts\"))\n ) {\n return mocker._calculateAccumulatedFloatAndExecuteOutstandingShiftsMock(marketIndex, user);\n } else {\n return super._calculateAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\n }\n }\n\n function _mintFloatExposed(address user, uint256 floatToMint) external {\n return super._mintFloat(user, floatToMint);\n }\n\n function _mintFloat(address user, uint256 floatToMint) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) != keccak256(abi.encodePacked(\"_mintFloat\"))\n ) {\n return mocker._mintFloatMock(user, floatToMint);\n } else {\n return super._mintFloat(user, floatToMint);\n }\n }\n\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsExposed(uint32 marketIndex, address user)\n external\n {\n return super._mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\n }\n\n function _mintAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user)\n internal\n override\n {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_mintAccumulatedFloatAndExecuteOutstandingShifts\"))\n ) {\n return mocker._mintAccumulatedFloatAndExecuteOutstandingShiftsMock(marketIndex, user);\n } else {\n return super._mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\n }\n }\n\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsMultiExposed(\n uint32[] calldata marketIndexes,\n address user\n ) external {\n return super._mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, user);\n }\n\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(\n uint32[] calldata marketIndexes,\n address user\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) !=\n keccak256(abi.encodePacked(\"_mintAccumulatedFloatAndExecuteOutstandingShiftsMulti\"))\n ) {\n return mocker._mintAccumulatedFloatAndExecuteOutstandingShiftsMultiMock(marketIndexes, user);\n } else {\n return super._mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, user);\n }\n }\n\n function _withdrawExposed(\n uint32 marketIndex,\n address token,\n uint256 amount\n ) external {\n return super._withdraw(marketIndex, token, amount);\n }\n\n function _withdraw(\n uint32 marketIndex,\n address token,\n uint256 amount\n ) internal override {\n if (\n shouldUseMock &&\n keccak256(abi.encodePacked(functionToNotMock)) != keccak256(abi.encodePacked(\"_withdraw\"))\n ) {\n return mocker._withdrawMock(marketIndex, token, amount);\n } else {\n return super._withdraw(marketIndex, token, amount);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../extensions/ERC20BurnableUpgradeable.sol\";\nimport \"../extensions/ERC20PausableUpgradeable.sol\";\nimport \"../../../access/AccessControlEnumerableUpgradeable.sol\";\nimport \"../../../utils/ContextUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev {ERC20} token, including:\n *\n * - ability for holders to burn (destroy) their tokens\n * - a minter role that allows for token minting (creation)\n * - a pauser role that allows to stop all token transfers\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlEnumerableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable {\n function initialize(string memory name, string memory symbol) public virtual initializer {\n __ERC20PresetMinterPauser_init(name, symbol);\n }\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n /**\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\n * account that deploys the contract.\n *\n * See {ERC20-constructor}.\n */\n function __ERC20PresetMinterPauser_init(string memory name, string memory symbol) internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n __AccessControlEnumerable_init_unchained();\n __ERC20_init_unchained(name, symbol);\n __ERC20Burnable_init_unchained();\n __Pausable_init_unchained();\n __ERC20Pausable_init_unchained();\n __ERC20PresetMinterPauser_init_unchained(name, symbol);\n }\n\n function __ERC20PresetMinterPauser_init_unchained(string memory name, string memory symbol) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n _setupRole(MINTER_ROLE, _msgSender());\n _setupRole(PAUSER_ROLE, _msgSender());\n }\n\n /**\n * @dev Creates `amount` new tokens for `to`.\n *\n * See {ERC20-_mint}.\n *\n * Requirements:\n *\n * - the caller must have the `MINTER_ROLE`.\n */\n function mint(address to, uint256 amount) public virtual {\n require(hasRole(MINTER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have minter role to mint\");\n _mint(to, amount);\n }\n\n /**\n * @dev Pauses all token transfers.\n *\n * See {ERC20Pausable} and {Pausable-_pause}.\n *\n * Requirements:\n *\n * - the caller must have the `PAUSER_ROLE`.\n */\n function pause() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to pause\");\n _pause();\n }\n\n /**\n * @dev Unpauses all token transfers.\n *\n * See {ERC20Pausable} and {Pausable-_unpause}.\n *\n * Requirements:\n *\n * - the caller must have the `PAUSER_ROLE`.\n */\n function unpause() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to unpause\");\n _unpause();\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override(ERC20Upgradeable, ERC20PausableUpgradeable) {\n super._beforeTokenTransfer(from, to, amount);\n }\n uint256[50] private __gap;\n}\n" + }, + "contracts/interfaces/IFloatToken.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\ninterface IFloatToken {\n function mint(address to, uint256 amount) external;\n\n function transfer(address, uint256) external returns (bool);\n\n function totalSupply() external view returns (uint256);\n\n function burnFrom(address account, uint256 amount) external virtual;\n}\n" + }, + "contracts/testing/generated/StakerForInternalMocking.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.3;\n\nimport \"./StakerMockable.sol\";\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\";\nimport \"../../abstract/AccessControlledAndUpgradeable.sol\";\nimport \"../../interfaces/IFloatToken.sol\";\nimport \"../../interfaces/ILongShort.sol\";\nimport \"../../interfaces/IStaker.sol\";\nimport \"../../interfaces/ISyntheticToken.sol\";\nimport \"../../GEMS.sol\";\nimport \"hardhat/console.sol\";\n\ncontract StakerForInternalMocking {\n function onlyAdminModifierLogicMock() public pure {\n return ();\n }\n\n function onlyValidSyntheticModifierLogicMock(address) public pure {\n return ();\n }\n\n function onlyLongShortModifierLogicMock() public pure {\n return ();\n }\n\n function _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShiftsMock(\n uint32,\n address\n ) public pure {\n return ();\n }\n\n function initializeMock(\n address,\n address,\n address,\n address,\n address,\n address,\n uint256,\n address\n ) public pure {\n return ();\n }\n\n function _changeFloatPercentageMock(uint256) public pure {\n return ();\n }\n\n function _changeUnstakeFeeMock(uint32, uint256) public pure {\n return ();\n }\n\n function _changeBalanceIncentiveParametersMock(\n uint32,\n uint256,\n int256,\n uint256\n ) public pure {\n return ();\n }\n\n function _getMarketLaunchIncentiveParametersMock(uint32)\n public\n pure\n returns (uint256 period, uint256 multiplier)\n {\n return (abi.decode(\"\", (uint256)), abi.decode(\"\", (uint256)));\n }\n\n function _getKValueMock(uint32) public pure returns (uint256) {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _calculateFloatPerSecondMock(\n uint32,\n uint256,\n uint256,\n uint256,\n uint256\n ) public pure returns (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) {\n return (abi.decode(\"\", (uint256)), abi.decode(\"\", (uint256)));\n }\n\n function _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshotMock(\n uint32,\n uint256\n ) public pure returns (uint256 timeDelta) {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _calculateNewCumulativeIssuancePerStakedSynthMock(\n uint32,\n uint256,\n uint256,\n uint256,\n uint256,\n uint256\n ) public pure returns (uint256 longCumulativeRates, uint256 shortCumulativeRates) {\n return (abi.decode(\"\", (uint256)), abi.decode(\"\", (uint256)));\n }\n\n function _calculateAccumulatedFloatInRangeMock(\n uint32,\n uint256,\n uint256,\n uint256,\n uint256\n ) public pure returns (uint256 floatReward) {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _calculateAccumulatedFloatAndExecuteOutstandingShiftsMock(uint32, address)\n public\n pure\n returns (uint256 floatReward)\n {\n return (abi.decode(\"\", (uint256)));\n }\n\n function _mintFloatMock(address, uint256) public pure {\n return ();\n }\n\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsMock(uint32, address) public pure {\n return ();\n }\n\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsMultiMock(uint32[] memory, address)\n public\n pure\n {\n return ();\n }\n\n function stakeFromUserMock(address, uint256) public pure {\n return ();\n }\n\n function shiftTokensMock(\n uint256,\n uint32,\n bool\n ) public pure {\n return ();\n }\n\n function _withdrawMock(\n uint32,\n address,\n uint256\n ) public pure {\n return ();\n }\n}\n" + }, + "contracts/testing/StakerInternalStateSetters.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"../Staker.sol\";\n\n/*\nNOTE: This contract is for testing purposes only!\n*/\n\ncontract StakerInternalStateSetters is Staker {\n ///////////////////////////////////////////////\n //////////// Test Helper Functions ////////////\n ///////////////////////////////////////////////\n // TODO: remove parts of this function that aren't necessary for the updated `_calculateAccumulatedFloat` funciton\n function setFloatRewardCalcParams(\n uint32 marketIndex,\n address longToken,\n address shortToken,\n uint256 newLatestRewardIndex,\n address user,\n uint256 usersLatestClaimedReward,\n uint256 accumulativeFloatPerTokenLatestLong,\n uint256 accumulativeFloatPerTokenLatestShort,\n uint256 accumulativeFloatPerTokenUserLong,\n uint256 accumulativeFloatPerTokenUserShort,\n uint256 newUserAmountStakedLong,\n uint256 newUserAmountStakedShort\n ) public {\n latestRewardIndex[marketIndex] = newLatestRewardIndex;\n userIndexOfLastClaimedReward[marketIndex][user] = usersLatestClaimedReward;\n syntheticTokens[marketIndex][true] = longToken;\n syntheticTokens[marketIndex][false] = shortToken;\n\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][newLatestRewardIndex]\n .accumulativeFloatPerSyntheticToken_long = accumulativeFloatPerTokenLatestLong;\n\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][usersLatestClaimedReward]\n .accumulativeFloatPerSyntheticToken_long = accumulativeFloatPerTokenUserLong;\n\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][newLatestRewardIndex]\n .accumulativeFloatPerSyntheticToken_short = accumulativeFloatPerTokenLatestShort;\n\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][usersLatestClaimedReward]\n .accumulativeFloatPerSyntheticToken_short = accumulativeFloatPerTokenUserShort;\n\n userAmountStaked[longToken][user] = newUserAmountStakedLong;\n userAmountStaked[shortToken][user] = newUserAmountStakedShort;\n }\n\n function setCalculateAccumulatedFloatInRangeGlobals(\n uint32 marketIndex,\n uint256 rewardIndexTo,\n uint256 rewardIndexFrom,\n uint256 syntheticRewardToLongToken,\n uint256 syntheticRewardFromLongToken,\n uint256 syntheticRewardToShortToken,\n uint256 syntheticRewardFromShortToken\n ) public {\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexTo]\n .accumulativeFloatPerSyntheticToken_long = syntheticRewardToLongToken;\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexTo]\n .accumulativeFloatPerSyntheticToken_short = syntheticRewardToShortToken;\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom]\n .accumulativeFloatPerSyntheticToken_long = syntheticRewardFromLongToken;\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom]\n .accumulativeFloatPerSyntheticToken_short = syntheticRewardFromShortToken;\n }\n\n function setShiftParams(\n uint32 marketIndex,\n address user,\n uint256 shiftAmountLong,\n uint256 shiftAmountShort,\n uint256 _userNextPrice_stakedActionIndex,\n uint256 _latestRewardIndex\n ) public {\n userNextPrice_stakedActionIndex[marketIndex][user] = _userNextPrice_stakedActionIndex;\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][\n user\n ] = shiftAmountLong;\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][\n user\n ] = shiftAmountShort;\n\n latestRewardIndex[marketIndex] = _latestRewardIndex;\n }\n\n function setShiftTokensParams(\n uint32 marketIndex,\n bool isShiftFromLong,\n address user,\n uint256 amountSyntheticTokensToShift,\n uint256 _userAmountStaked,\n uint256 _userNextPrice_stakedActionIndex,\n uint256 _latestRewardIndex,\n address syntheticToken\n ) public {\n userNextPrice_stakedActionIndex[marketIndex][user] = _userNextPrice_stakedActionIndex;\n latestRewardIndex[marketIndex] = _latestRewardIndex;\n\n if (isShiftFromLong) {\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][\n user\n ] = amountSyntheticTokensToShift;\n } else {\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][\n user\n ] = amountSyntheticTokensToShift;\n }\n\n syntheticTokens[marketIndex][isShiftFromLong] = syntheticToken;\n userAmountStaked[syntheticToken][user] = _userAmountStaked;\n }\n\n function setLongShort(address _longShort) public {\n longShort = _longShort;\n }\n\n function setLatestRewardIndexGlobals(uint32 marketIndex, uint256 _latestRewardIndex) external {\n latestRewardIndex[marketIndex] = _latestRewardIndex;\n }\n\n function setGetMarketLaunchIncentiveParametersParams(\n uint32 marketIndex,\n uint256 period,\n uint256 multiplier\n ) external {\n marketLaunchIncentive_period[marketIndex] = period;\n marketLaunchIncentive_multipliers[marketIndex] = multiplier;\n }\n\n function setGetKValueParams(uint32 marketIndex, uint256 timestamp) external {\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0].timestamp = timestamp;\n }\n\n function setStakeFromUserParams(\n address longshort,\n address token,\n uint32 marketIndexForToken,\n address user,\n uint256 _latestRewardIndex,\n uint256 _userAmountStaked,\n uint256 userLastRewardIndex\n ) external {\n latestRewardIndex[marketIndexForToken] = _latestRewardIndex;\n userAmountStaked[token][user] = _userAmountStaked;\n userIndexOfLastClaimedReward[marketIndexForToken][user] = userLastRewardIndex;\n\n longShort = address(longshort);\n marketIndexOfToken[token] = marketIndexForToken;\n }\n\n function setCalculateTimeDeltaParams(\n uint32 marketIndex,\n uint256 latestRewardIndexForMarket,\n uint256 timestamp\n ) external {\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][latestRewardIndexForMarket]\n .timestamp = timestamp;\n }\n\n function setCalculateNewCumulativeRateParams(\n uint32 marketIndex,\n uint256 latestRewardIndexForMarket,\n uint256 accumFloatLong,\n uint256 accumFloatShort\n ) external {\n latestRewardIndex[marketIndex] = latestRewardIndexForMarket;\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][latestRewardIndex[marketIndex]]\n .accumulativeFloatPerSyntheticToken_long = accumFloatLong;\n\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][latestRewardIndex[marketIndex]]\n .accumulativeFloatPerSyntheticToken_short = accumFloatShort;\n }\n\n function setSetRewardObjectsParams(uint32 marketIndex, uint256 latestRewardIndexForMarket)\n external\n {\n latestRewardIndex[marketIndex] = latestRewardIndexForMarket;\n }\n\n function set_updateStateParams(\n address _longShort,\n address token,\n uint32 tokenMarketIndex\n ) public {\n longShort = _longShort;\n marketIndexOfToken[token] = tokenMarketIndex;\n }\n\n function set_mintFloatParams(address _floatToken, uint16 _floatPercentage) public {\n floatToken = _floatToken;\n floatPercentage = _floatPercentage;\n }\n\n function setMintAccumulatedFloatAndClaimFloatParams(\n uint32 marketIndex,\n uint256 latestRewardIndexForMarket\n ) public {\n latestRewardIndex[marketIndex] = latestRewardIndexForMarket;\n }\n\n function set_withdrawGlobals(\n uint32 marketIndex,\n address syntheticToken,\n address user,\n uint256 amountStaked,\n uint256 fees,\n address treasury\n ) external {\n marketIndexOfToken[syntheticToken] = marketIndex;\n marketUnstakeFee_e18[marketIndex] = fees;\n userAmountStaked[syntheticToken][user] = amountStaked;\n floatTreasury = treasury;\n }\n\n function setWithdrawGlobals(\n uint32 marketIndex,\n address _longShort,\n address token\n ) external {\n marketIndexOfToken[token] = marketIndex;\n longShort = _longShort;\n }\n\n function setWithdrawAllGlobals(\n uint32 marketIndex,\n address _longShort,\n address user,\n uint256 amountStaked,\n address token,\n uint256 _userNextPrice_stakedActionIndex,\n address _syntheticTokens,\n uint256 _userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_long,\n uint256 _userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_short\n ) external {\n marketIndexOfToken[token] = marketIndex;\n longShort = _longShort;\n userAmountStaked[token][user] = amountStaked;\n userNextPrice_stakedActionIndex[marketIndex][user] = _userNextPrice_stakedActionIndex;\n syntheticTokens[marketIndex][true] = _syntheticTokens;\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][\n user\n ] = _userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_long;\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][\n user\n ] = _userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_short;\n }\n\n function setEquilibriumOffset(uint32 marketIndex, int256 _balanceIncentiveCurve_equilibriumOffset)\n external\n {\n balanceIncentiveCurve_equilibriumOffset[marketIndex] = _balanceIncentiveCurve_equilibriumOffset;\n }\n\n ///////////////////////////////////////////////////////\n //////////// Functions for Experimentation ////////////\n ///////////////////////////////////////////////////////\n\n function getRequiredAmountOfBitShiftForSafeExponentiationPerfect(uint256 number, uint256 exponent)\n external\n pure\n returns (uint256 amountOfBitShiftRequired)\n {\n uint256 targetMaxNumberSizeBinaryDigits = 257 / exponent;\n\n // Note this can be optimised, this gets a quick easy to compute safe upper bound, not the actuall upper bound.\n uint256 targetMaxNumber = 2**targetMaxNumberSizeBinaryDigits;\n\n while (number >> amountOfBitShiftRequired > targetMaxNumber) {\n ++amountOfBitShiftRequired;\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\n __Context_init_unchained();\n __ERC20_init_unchained(name_, symbol_);\n }\n\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n uint256[45] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/ContextUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\n * tokens and those that they have an allowance for, in a way that can be\n * recognized off-chain (via event analysis).\n */\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\n function __ERC20Burnable_init() internal initializer {\n __Context_init_unchained();\n __ERC20Burnable_init_unchained();\n }\n\n function __ERC20Burnable_init_unchained() internal initializer {\n }\n /**\n * @dev Destroys `amount` tokens from the caller.\n *\n * See {ERC20-_burn}.\n */\n function burn(uint256 amount) public virtual {\n _burn(_msgSender(), amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\n * allowance.\n *\n * See {ERC20-_burn} and {ERC20-allowance}.\n *\n * Requirements:\n *\n * - the caller must have allowance for ``accounts``'s tokens of at least\n * `amount`.\n */\n function burnFrom(address account, uint256 amount) public virtual {\n uint256 currentAllowance = allowance(account, _msgSender());\n require(currentAllowance >= amount, \"ERC20: burn amount exceeds allowance\");\n unchecked {\n _approve(account, _msgSender(), currentAllowance - amount);\n }\n _burn(account, amount);\n }\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../security/PausableUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev ERC20 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n */\nabstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable {\n function __ERC20Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n __ERC20Pausable_init_unchained();\n }\n\n function __ERC20Pausable_init_unchained() internal initializer {\n }\n /**\n * @dev See {ERC20-_beforeTokenTransfer}.\n *\n * Requirements:\n *\n * - the contract must not be paused.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n require(!paused(), \"ERC20Pausable: token transfer while paused\");\n }\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlEnumerableUpgradeable.sol\";\nimport \"./AccessControlUpgradeable.sol\";\nimport \"../utils/structs/EnumerableSetUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\n */\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\n function __AccessControlEnumerable_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n __AccessControlEnumerable_init_unchained();\n }\n\n function __AccessControlEnumerable_init_unchained() internal initializer {\n }\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\n\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {\n return _roleMembers[role].at(index);\n }\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) public view override returns (uint256) {\n return _roleMembers[role].length();\n }\n\n /**\n * @dev Overload {grantRole} to track enumerable memberships\n */\n function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\n super.grantRole(role, account);\n _roleMembers[role].add(account);\n }\n\n /**\n * @dev Overload {revokeRole} to track enumerable memberships\n */\n function revokeRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\n super.revokeRole(role, account);\n _roleMembers[role].remove(account);\n }\n\n /**\n * @dev Overload {renounceRole} to track enumerable memberships\n */\n function renounceRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {\n super.renounceRole(role, account);\n _roleMembers[role].remove(account);\n }\n\n /**\n * @dev Overload {_setupRole} to track enumerable memberships\n */\n function _setupRole(bytes32 role, address account) internal virtual override {\n super._setupRole(role, account);\n _roleMembers[role].add(account);\n }\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n require(!paused(), \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n require(paused(), \"Pausable: not paused\");\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\n\n/**\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\n */\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n */\nlibrary EnumerableSetUpgradeable {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastvalue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastvalue;\n // Update the index for the moved value\n set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n return _values(set._inner);\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "contracts/Staker.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\";\n\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\n\nimport \"./interfaces/IFloatToken.sol\";\nimport \"./interfaces/ILongShort.sol\";\nimport \"./interfaces/IStaker.sol\";\nimport \"./interfaces/ISyntheticToken.sol\";\nimport \"./GEMS.sol\";\n\ncontract Staker is IStaker, AccessControlledAndUpgradeable {\n /*╔═════════════════════════════╗\n ║ VARIABLES ║\n ╚═════════════════════════════╝*/\n\n bytes32 public constant DISCOUNT_ROLE = keccak256(\"DISCOUNT_ROLE\");\n\n /* ══════ Fixed-precision constants ══════ */\n uint256 public constant FLOAT_ISSUANCE_FIXED_DECIMAL = 3e44;\n\n /* ══════ Global state ══════ */\n address public floatCapital;\n address public floatTreasury;\n uint256 public floatPercentage;\n\n address public longShort;\n address public floatToken;\n\n address public gems;\n uint256[45] private __globalStateGap;\n\n /* ══════ Market specific ══════ */\n mapping(uint32 => uint256) public marketLaunchIncentive_period; // seconds\n mapping(uint32 => uint256) public marketLaunchIncentive_multipliers; // e18 scale\n mapping(uint32 => uint256) public marketUnstakeFee_e18;\n mapping(uint32 => uint256) public balanceIncentiveCurve_exponent;\n mapping(uint32 => int256) public balanceIncentiveCurve_equilibriumOffset;\n mapping(uint32 => uint256) public safeExponentBitShifting;\n\n mapping(uint32 => mapping(bool => address)) public syntheticTokens;\n uint256[45] private __marketStateGap;\n\n mapping(address => uint32) public marketIndexOfToken;\n mapping(address => uint32) public userNonce;\n uint256[45] private __synthStateGap;\n\n /* ══════ Reward specific ══════ */\n mapping(uint32 => uint256) public latestRewardIndex; // This is synced to be the same as LongShort\n mapping(uint32 => mapping(uint256 => AccumulativeIssuancePerStakedSynthSnapshot))\n public accumulativeFloatPerSyntheticTokenSnapshots;\n struct AccumulativeIssuancePerStakedSynthSnapshot {\n uint256 timestamp;\n uint256 accumulativeFloatPerSyntheticToken_long;\n uint256 accumulativeFloatPerSyntheticToken_short;\n }\n\n uint256[45] private __rewardStateGap;\n /* ══════ User specific ══════ */\n mapping(uint32 => mapping(address => uint256)) public userIndexOfLastClaimedReward;\n mapping(address => mapping(address => uint256)) public override userAmountStaked;\n uint256[45] private __userStateGap;\n\n /* ══════ Next price action management specific ══════ */\n /// @dev marketIndex => usersAddress => stakedActionIndex\n mapping(uint32 => mapping(address => uint256)) public userNextPrice_stakedActionIndex;\n\n /// @dev marketIndex => usersAddress => amountUserRequestedToShiftAwayFromLongOnNextUpdate\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\n public userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom;\n\n /// @dev marketIndex => usersAddress => stakedActionIndex\n mapping(uint32 => mapping(bool => mapping(address => uint256)))\n public userNextPrice_paymentToken_depositAmount;\n\n /*╔═════════════════════════════╗\n ║ MODIFIERS ║\n ╚═════════════════════════════╝*/\n\n function onlyAdminModifierLogic() internal virtual {\n _checkRole(ADMIN_ROLE, msg.sender);\n }\n\n modifier onlyAdmin() {\n onlyAdminModifierLogic();\n _;\n }\n\n function onlyValidSyntheticModifierLogic(address _synth) internal virtual {\n require(marketIndexOfToken[_synth] != 0, \"not valid synth\");\n }\n\n modifier onlyValidSynthetic(address _synth) {\n onlyValidSyntheticModifierLogic(_synth);\n _;\n }\n\n function onlyLongShortModifierLogic() internal virtual {\n require(msg.sender == address(longShort), \"not LongShort\");\n }\n\n modifier onlyLongShort() {\n onlyLongShortModifierLogic();\n _;\n }\n\n function _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\n uint32 marketIndex,\n address user\n ) internal virtual {\n if (\n userNextPrice_stakedActionIndex[marketIndex][msg.sender] != 0 &&\n userNextPrice_stakedActionIndex[marketIndex][msg.sender] <= latestRewardIndex[marketIndex]\n ) {\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender);\n }\n }\n\n modifier updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\n uint32 marketIndex,\n address user\n ) {\n _updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\n _;\n }\n\n modifier gemCollecting(address user) {\n GEMS(gems).gm(user);\n _;\n }\n\n /*╔═════════════════════════════╗\n ║ CONTRACT SET-UP ║\n ╚═════════════════════════════╝*/\n\n /**\n @notice Initializes the contract.\n @dev Calls OpenZeppelin's initializer modifier.\n @param _admin Address of the admin role.\n @param _longShort Address of the LongShort contract, a deployed LongShort.sol\n @param _floatToken Address of the Float token earned by staking.\n @param _floatTreasury Address of the treasury contract for managing fees.\n @param _floatCapital Address of the contract which earns a fixed percentage of Float.\n @param _floatPercentage Determines the float percentage that gets minted for Float Capital, base 1e18.\n */\n function initialize(\n address _admin,\n address _longShort,\n address _floatToken,\n address _floatTreasury,\n address _floatCapital,\n address _discountSigner,\n uint256 _floatPercentage,\n address _gems\n ) external virtual initializer {\n require(\n _admin != address(0) &&\n _longShort != address(0) &&\n _floatToken != address(0) &&\n _floatTreasury != address(0) &&\n _floatCapital != address(0) &&\n _gems != address(0) &&\n _floatPercentage != 0\n );\n\n floatCapital = _floatCapital;\n floatTreasury = _floatTreasury;\n longShort = _longShort;\n floatToken = _floatToken;\n gems = _gems;\n\n _AccessControlledAndUpgradeable_init(_admin);\n _setupRole(DISCOUNT_ROLE, _discountSigner);\n\n _changeFloatPercentage(_floatPercentage);\n\n emit StakerV1(_admin, _floatTreasury, _floatCapital, _floatToken, _floatPercentage);\n }\n\n /*╔═══════════════════╗\n ║ ADMIN ║\n ╚═══════════════════╝*/\n\n /// @dev Logic for changeFloatPercentage\n function _changeFloatPercentage(uint256 newFloatPercentage) internal virtual {\n require(newFloatPercentage <= 1e18 && newFloatPercentage > 0); // less than or equal to 100% and greater than 0%\n floatPercentage = newFloatPercentage;\n }\n\n /**\n @notice Changes percentage of float that is minted for float capital.\n @param newFloatPercentage The new float percentage in base 1e18.\n */\n function changeFloatPercentage(uint256 newFloatPercentage) external onlyAdmin {\n _changeFloatPercentage(newFloatPercentage);\n emit FloatPercentageUpdated(newFloatPercentage);\n }\n\n /// @dev Logic for changeUnstakeFee\n function _changeUnstakeFee(uint32 marketIndex, uint256 newMarketUnstakeFee_e18) internal virtual {\n require(newMarketUnstakeFee_e18 <= 5e16); // Explicitly stating 5% fee as the max fee possible.\n marketUnstakeFee_e18[marketIndex] = newMarketUnstakeFee_e18;\n }\n\n /**\n @notice Changes unstake fee for a market\n @param marketIndex Identifies the market.\n @param newMarketUnstakeFee_e18 The new unstake fee.\n */\n function changeUnstakeFee(uint32 marketIndex, uint256 newMarketUnstakeFee_e18)\n external\n onlyAdmin\n {\n _changeUnstakeFee(marketIndex, newMarketUnstakeFee_e18);\n emit StakeWithdrawalFeeUpdated(marketIndex, newMarketUnstakeFee_e18);\n }\n\n /// @dev Logic for changeBalanceIncentiveExponent\n function _changeBalanceIncentiveParameters(\n uint32 marketIndex,\n uint256 _balanceIncentiveCurve_exponent,\n int256 _balanceIncentiveCurve_equilibriumOffset,\n uint256 _safeExponentBitShifting\n ) internal virtual {\n // Unreasonable that we would ever shift this more than 90% either way\n require(\n _balanceIncentiveCurve_equilibriumOffset > -9e17 &&\n _balanceIncentiveCurve_equilibriumOffset < 9e17,\n \"balanceIncentiveCurve_equilibriumOffset out of bounds\"\n );\n require(_balanceIncentiveCurve_exponent > 0, \"balanceIncentiveCurve_exponent out of bounds\");\n require(_safeExponentBitShifting < 100, \"safeExponentBitShifting out of bounds\");\n\n uint256 totalLocked = ILongShort(longShort).marketSideValueInPaymentToken(marketIndex, true) +\n ILongShort(longShort).marketSideValueInPaymentToken(marketIndex, false);\n\n // SafeMATH will revert here if this value is too big.\n (((totalLocked * 500) >> _safeExponentBitShifting)**_balanceIncentiveCurve_exponent);\n // Required to ensure at least 3 digits of precision.\n require(\n totalLocked >> _safeExponentBitShifting > 100,\n \"bit shifting too lange for total locked\"\n );\n\n balanceIncentiveCurve_exponent[marketIndex] = _balanceIncentiveCurve_exponent;\n balanceIncentiveCurve_equilibriumOffset[marketIndex] = _balanceIncentiveCurve_equilibriumOffset;\n safeExponentBitShifting[marketIndex] = _safeExponentBitShifting;\n }\n\n /**\n @notice Changes the balance incentive exponent for a market\n @param marketIndex Identifies the market.\n @param _balanceIncentiveCurve_exponent The new exponent for the curve.\n @param _balanceIncentiveCurve_equilibriumOffset The new offset.\n @param _safeExponentBitShifting The new bitshifting applied to the curve.\n */\n function changeBalanceIncentiveParameters(\n uint32 marketIndex,\n uint256 _balanceIncentiveCurve_exponent,\n int256 _balanceIncentiveCurve_equilibriumOffset,\n uint256 _safeExponentBitShifting\n ) external onlyAdmin {\n _changeBalanceIncentiveParameters(\n marketIndex,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n _safeExponentBitShifting\n );\n\n emit BalanceIncentiveParamsUpdated(\n marketIndex,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n _safeExponentBitShifting\n );\n }\n\n /*╔═════════════════════════════╗\n ║ STAKING SETUP ║\n ╚═════════════════════════════╝*/\n\n /**\n @notice Sets this contract to track staking for a market in LongShort.sol\n @param marketIndex Identifies the market.\n @param longToken Address of the long token for the market.\n @param shortToken Address of the short token for the market.\n @param kInitialMultiplier Initial boost on float generation for the market.\n @param kPeriod Period which the boost should last.\n @param unstakeFee_e18 Percentage of tokens that are levied on unstaking in base 1e18.\n @param _balanceIncentiveCurve_exponent Exponent for balance curve (see _calculateFloatPerSecond)\n @param _balanceIncentiveCurve_equilibriumOffset Offset for balance curve (see _calculateFloatPerSecond)\n */\n function addNewStakingFund(\n uint32 marketIndex,\n address longToken,\n address shortToken,\n uint256 kInitialMultiplier,\n uint256 kPeriod,\n uint256 unstakeFee_e18,\n uint256 _balanceIncentiveCurve_exponent,\n int256 _balanceIncentiveCurve_equilibriumOffset\n ) external override onlyLongShort {\n require(kInitialMultiplier >= 1e18, \"kInitialMultiplier must be >= 1e18\");\n\n // a safe initial default value\n uint256 initialSafeExponentBitShifting = 50;\n\n marketIndexOfToken[longToken] = marketIndex;\n marketIndexOfToken[shortToken] = marketIndex;\n\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0].timestamp = block.timestamp;\n\n syntheticTokens[marketIndex][true] = longToken;\n syntheticTokens[marketIndex][false] = shortToken;\n _changeBalanceIncentiveParameters(\n marketIndex,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n initialSafeExponentBitShifting\n );\n\n marketLaunchIncentive_period[marketIndex] = kPeriod;\n marketLaunchIncentive_multipliers[marketIndex] = kInitialMultiplier;\n\n _changeUnstakeFee(marketIndex, unstakeFee_e18);\n\n emit MarketAddedToStaker(\n marketIndex,\n unstakeFee_e18,\n kPeriod,\n kInitialMultiplier,\n _balanceIncentiveCurve_exponent,\n _balanceIncentiveCurve_equilibriumOffset,\n initialSafeExponentBitShifting\n );\n\n emit AccumulativeIssuancePerStakedSynthSnapshotCreated(marketIndex, 0, 0, 0);\n }\n\n /*╔═════════════════════════════════════════════════════════════════════════╗\n ║ GLOBAL FLT REWARD ACCUMULATION CALCULATION AND TRACKING FUNCTIONS ║\n ╚═════════════════════════════════════════════════════════════════════════╝*/\n\n /**\n @notice Returns the K factor parameters for the given market with sensible\n defaults if they haven't been set yet.\n @param marketIndex The market to change the parameters for.\n @return period The period for which the k factor applies for in seconds.\n @return multiplier The multiplier on Float generation in this period.\n */\n function _getMarketLaunchIncentiveParameters(uint32 marketIndex)\n internal\n view\n virtual\n returns (uint256 period, uint256 multiplier)\n {\n period = marketLaunchIncentive_period[marketIndex]; // seconds TODO change name to contain seconds\n multiplier = marketLaunchIncentive_multipliers[marketIndex]; // 1e18 TODO change name to contain E18\n\n if (multiplier < 1e18) {\n multiplier = 1e18; // multiplier of 1 by default\n }\n }\n\n /**\n @notice Returns the extent to which a markets float generation should be adjusted\n based on the market's launch incentive parameters. Should start at multiplier\n then linearly change to 1e18 over time.\n @param marketIndex Identifies the market.\n @return k The calculated modifier for float generation.\n */\n function _getKValue(uint32 marketIndex) internal view virtual returns (uint256) {\n // Parameters controlling the float issuance multiplier.\n (uint256 kPeriod, uint256 kInitialMultiplier) = _getMarketLaunchIncentiveParameters(\n marketIndex\n );\n\n // Sanity check - under normal circumstances, the multipliers should\n // *never* be set to a value < 1e18, as there are guards against this.\n assert(kInitialMultiplier >= 1e18);\n\n uint256 initialTimestamp = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][0]\n .timestamp;\n\n if (block.timestamp - initialTimestamp < kPeriod) {\n return\n kInitialMultiplier -\n (((kInitialMultiplier - 1e18) * (block.timestamp - initialTimestamp)) / kPeriod);\n } else {\n return 1e18;\n }\n }\n\n /*\n @notice Computes the number of float tokens a user earns per second for\n every long/short synthetic token they've staked. The returned value has\n a fixed decimal scale of 1e42 (!!!) for numerical stability. The return\n values are float per second per synthetic token (hence the requirement\n to multiply by price)\n @dev to see below math in latex form see:\n https://ipfs.io/ipfs/QmRWbr8P1F588XqRTzm7wCsRPu8DcDVPWGriBach4f22Fq/staker-fps.pdf\n to interact with the equations see https://www.desmos.com/calculator/optkaxyihr\n @param marketIndex The market referred to.\n @param longPrice Price of the synthetic long token in units of payment token\n @param shortPrice Price of the synthetic short token in units of payment token\n @param longValue Amount of payment token in the long side of the market\n @param shortValue Amount of payment token in the short side of the market\n @return longFloatPerSecond Float token per second per long synthetic token\n @return shortFloatPerSecond Float token per second per short synthetic token\n */\n function _calculateFloatPerSecond(\n uint32 marketIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) internal view virtual returns (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) {\n // A float issuance multiplier that starts high and decreases linearly\n // over time to a value of 1. This incentivises users to stake early.\n uint256 k = _getKValue(marketIndex);\n\n uint256 totalLocked = (longValue + shortValue);\n\n // we need to scale this number by the totalLocked so that the offset remains consistent accross market size\n\n int256 equilibriumOffsetMarketScaled = (balanceIncentiveCurve_equilibriumOffset[marketIndex] *\n int256(totalLocked)) / 2e18;\n\n uint256 safetyBitShifting = safeExponentBitShifting[marketIndex];\n\n // Float is scaled by the percentage of the total market value held in\n // the opposite position. This incentivises users to stake on the\n // weaker position.\n if (int256(shortValue) - (2 * equilibriumOffsetMarketScaled) < int256(longValue)) {\n if (equilibriumOffsetMarketScaled >= int256(shortValue)) {\n // edge case: imbalanced far past the equilibrium offset - full rewards go to short token\n // extremely unlikely to happen in practice\n return (0, k * shortPrice);\n }\n\n uint256 numerator = (uint256(int256(shortValue) - equilibriumOffsetMarketScaled) >>\n (safetyBitShifting - 1))**balanceIncentiveCurve_exponent[marketIndex];\n\n uint256 denominator = ((totalLocked >> safetyBitShifting) **\n balanceIncentiveCurve_exponent[marketIndex]);\n\n // NOTE: `x * 5e17` == `(x * 1e18) / 2`\n uint256 longRewardUnscaled = (numerator * 5e17) / denominator;\n uint256 shortRewardUnscaled = 1e18 - longRewardUnscaled;\n\n return (\n (longRewardUnscaled * k * longPrice) / 1e18,\n (shortRewardUnscaled * k * shortPrice) / 1e18\n );\n } else {\n if (-equilibriumOffsetMarketScaled >= int256(longValue)) {\n // edge case: imbalanced far past the equilibrium offset - full rewards go to long token\n // extremely unlikely to happen in practice\n return (k * longPrice, 0);\n }\n\n uint256 numerator = (uint256(int256(longValue) + equilibriumOffsetMarketScaled) >>\n (safetyBitShifting - 1))**balanceIncentiveCurve_exponent[marketIndex];\n\n uint256 denominator = ((totalLocked >> safetyBitShifting) **\n balanceIncentiveCurve_exponent[marketIndex]);\n\n // NOTE: `x * 5e17` == `(x * 1e18) / 2`\n uint256 shortRewardUnscaled = (numerator * 5e17) / denominator;\n uint256 longRewardUnscaled = 1e18 - shortRewardUnscaled;\n\n return (\n (longRewardUnscaled * k * longPrice) / 1e18,\n (shortRewardUnscaled * k * shortPrice) / 1e18\n );\n }\n }\n\n /**\n @notice Computes the time since last accumulativeIssuancePerStakedSynthSnapshot for the given market in seconds.\n @param marketIndex The market referred to.\n @return timeDelta The time difference in seconds\n */\n function _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\n uint32 marketIndex,\n uint256 previousMarketUpdateIndex\n ) internal view virtual returns (uint256 timeDelta) {\n return\n block.timestamp -\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex].timestamp;\n }\n\n /**\n @notice Computes new cumulative sum of 'r' value since last accumulativeIssuancePerStakedSynthSnapshot. We use\n cumulative 'r' value to avoid looping during issuance. Note that the\n cumulative sum is kept in 1e42 scale (!!!) to avoid numerical issues.\n @param shortValue The value locked in the short side of the market.\n @param longValue The value locked in the long side of the market.\n @param shortPrice The price of the short token as defined in LongShort.sol\n @param longPrice The price of the long token as defined in LongShort.sol\n @param marketIndex An identifier for the market.\n @return longCumulativeRates The long cumulative sum.\n @return shortCumulativeRates The short cumulative sum.\n */\n function _calculateNewCumulativeIssuancePerStakedSynth(\n uint32 marketIndex,\n uint256 previousMarketUpdateIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) internal view virtual returns (uint256 longCumulativeRates, uint256 shortCumulativeRates) {\n // Compute the current 'r' value for float issuance per second.\n (uint256 longFloatPerSecond, uint256 shortFloatPerSecond) = _calculateFloatPerSecond(\n marketIndex,\n longPrice,\n shortPrice,\n longValue,\n shortValue\n );\n\n // Compute time since last accumulativeIssuancePerStakedSynthSnapshot for the given token.\n uint256 timeDelta = _calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshot(\n marketIndex,\n previousMarketUpdateIndex\n );\n\n // Compute new cumulative 'r' value total.\n return (\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex]\n .accumulativeFloatPerSyntheticToken_long + (timeDelta * longFloatPerSecond),\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][previousMarketUpdateIndex]\n .accumulativeFloatPerSyntheticToken_short + (timeDelta * shortFloatPerSecond)\n );\n }\n\n /**\n @notice Adds new accumulativeIssuancePerStakedSynthSnapshots for the given long/short tokens. Called by the\n ILongShort contract whenever there is a state change for a market.\n @param marketIndex An identifier for the market.\n @param marketUpdateIndex Current update index in the LongShort contract for this market.\n @param shortValue The value locked in the short side of the market.\n @param longValue The value locked in the long side of the market.\n @param shortPrice The price of the short token as defined in LongShort.sol\n @param longPrice The price of the long token as defined in LongShort.sol\n */\n function pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations(\n uint32 marketIndex,\n uint256 marketUpdateIndex,\n uint256 longPrice,\n uint256 shortPrice,\n uint256 longValue,\n uint256 shortValue\n ) external override onlyLongShort {\n (\n uint256 newLongAccumulativeValue,\n uint256 newShortAccumulativeValue\n ) = _calculateNewCumulativeIssuancePerStakedSynth(\n marketIndex,\n marketUpdateIndex - 1,\n longPrice,\n shortPrice,\n longValue,\n shortValue\n );\n\n // Set cumulative 'r' value on new accumulativeIssuancePerStakedSynthSnapshot.\n\n AccumulativeIssuancePerStakedSynthSnapshot\n storage accumulativeFloatPerSyntheticTokenSnapshot = accumulativeFloatPerSyntheticTokenSnapshots[\n marketIndex\n ][marketUpdateIndex];\n accumulativeFloatPerSyntheticTokenSnapshot\n .accumulativeFloatPerSyntheticToken_long = newLongAccumulativeValue;\n accumulativeFloatPerSyntheticTokenSnapshot\n .accumulativeFloatPerSyntheticToken_short = newShortAccumulativeValue;\n\n // Set timestamp on new accumulativeIssuancePerStakedSynthSnapshot.\n accumulativeFloatPerSyntheticTokenSnapshot.timestamp = block.timestamp;\n\n // Update latest index to point to new accumulativeIssuancePerStakedSynthSnapshot.\n latestRewardIndex[marketIndex] = marketUpdateIndex;\n\n emit AccumulativeIssuancePerStakedSynthSnapshotCreated(\n marketIndex,\n marketUpdateIndex,\n newLongAccumulativeValue,\n newShortAccumulativeValue\n );\n }\n\n /*╔═══════════════════════════════════╗\n ║ USER REWARD STATE FUNCTIONS ║\n ╚═══════════════════════════════════╝*/\n\n /// @dev Calculates the accumulated float in a specific range of staker snapshots\n function _calculateAccumulatedFloatInRange(\n uint32 marketIndex,\n uint256 amountStakedLong,\n uint256 amountStakedShort,\n uint256 rewardIndexFrom,\n uint256 rewardIndexTo\n ) internal view virtual returns (uint256 floatReward) {\n if (amountStakedLong > 0) {\n uint256 accumDeltaLong = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][\n rewardIndexTo\n ].accumulativeFloatPerSyntheticToken_long -\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom]\n .accumulativeFloatPerSyntheticToken_long;\n floatReward += (accumDeltaLong * amountStakedLong) / FLOAT_ISSUANCE_FIXED_DECIMAL;\n }\n\n if (amountStakedShort > 0) {\n uint256 accumDeltaShort = accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][\n rewardIndexTo\n ].accumulativeFloatPerSyntheticToken_short -\n accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][rewardIndexFrom]\n .accumulativeFloatPerSyntheticToken_short;\n floatReward += (accumDeltaShort * amountStakedShort) / FLOAT_ISSUANCE_FIXED_DECIMAL;\n }\n }\n\n /**\n @notice Calculates float owed to the user since the user last minted float for a market.\n @param marketIndex Identifier for the market which the user staked in.\n @param user The address of the user.\n @return floatReward The amount of float owed.\n */\n function _calculateAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user)\n internal\n virtual\n returns (uint256 floatReward)\n {\n address longToken = syntheticTokens[marketIndex][true];\n address shortToken = syntheticTokens[marketIndex][false];\n\n uint256 amountStakedLong = userAmountStaked[longToken][user];\n uint256 amountStakedShort = userAmountStaked[shortToken][user];\n\n uint256 usersLastRewardIndex = userIndexOfLastClaimedReward[marketIndex][user];\n\n uint256 currentRewardIndex = latestRewardIndex[marketIndex];\n\n // Don't do the calculation and return zero immediately if there is no change\n if (usersLastRewardIndex == currentRewardIndex) {\n return 0;\n }\n\n uint256 usersShiftIndex = userNextPrice_stakedActionIndex[marketIndex][user];\n // if there is a change in the users tokens held due to a token shift (or possibly another action in the future)\n if (usersShiftIndex > 0 && usersShiftIndex <= currentRewardIndex) {\n floatReward = _calculateAccumulatedFloatInRange(\n marketIndex,\n amountStakedLong,\n amountStakedShort,\n usersLastRewardIndex,\n usersShiftIndex\n );\n\n // Update the users balances\n\n uint256 amountToShiftAwayFromCurrentSide = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\n marketIndex\n ][true][user];\n // Handle shifts from LONG side:\n if (amountToShiftAwayFromCurrentSide > 0) {\n amountStakedShort += ILongShort(longShort).getAmountSyntheticTokenToMintOnTargetSide(\n marketIndex,\n amountToShiftAwayFromCurrentSide,\n true,\n usersShiftIndex\n );\n\n amountStakedLong -= amountToShiftAwayFromCurrentSide;\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][true][user] = 0;\n }\n\n amountToShiftAwayFromCurrentSide = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\n marketIndex\n ][false][user];\n // Handle shifts from SHORT side:\n if (amountToShiftAwayFromCurrentSide > 0) {\n amountStakedLong += ILongShort(longShort).getAmountSyntheticTokenToMintOnTargetSide(\n marketIndex,\n amountToShiftAwayFromCurrentSide,\n false,\n usersShiftIndex\n );\n\n amountStakedShort -= amountToShiftAwayFromCurrentSide;\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][false][user] = 0;\n }\n\n // Save the users updated staked amounts\n userAmountStaked[longToken][user] = amountStakedLong;\n userAmountStaked[shortToken][user] = amountStakedShort;\n\n emit StakeShifted(user, marketIndex, amountStakedLong, amountStakedShort);\n\n floatReward += _calculateAccumulatedFloatInRange(\n marketIndex,\n amountStakedLong,\n amountStakedShort,\n usersShiftIndex,\n currentRewardIndex\n );\n\n userNextPrice_stakedActionIndex[marketIndex][user] = 0;\n } else {\n floatReward = _calculateAccumulatedFloatInRange(\n marketIndex,\n amountStakedLong,\n amountStakedShort,\n usersLastRewardIndex,\n currentRewardIndex\n );\n }\n }\n\n /**\n @notice Mints float for a user.\n @dev Mints a fixed percentage for Float capital.\n @param user The address of the user.\n @param floatToMint The amount of float to mint.\n */\n function _mintFloat(address user, uint256 floatToMint) internal virtual {\n IFloatToken(floatToken).mint(user, floatToMint);\n IFloatToken(floatToken).mint(floatCapital, (floatToMint * floatPercentage) / 1e18);\n }\n\n /**\n @notice Mints float owed to a user for a market since they last minted.\n @param marketIndex An identifier for the market.\n @param user The address of the user.\n */\n function _mintAccumulatedFloatAndExecuteOutstandingShifts(uint32 marketIndex, address user)\n internal\n virtual\n {\n uint256 floatToMint = _calculateAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, user);\n\n if (floatToMint > 0) {\n // Set the user has claimed up until now, stops them setting this forward\n userIndexOfLastClaimedReward[marketIndex][user] = latestRewardIndex[marketIndex];\n\n _mintFloat(user, floatToMint);\n emit FloatMinted(user, marketIndex, floatToMint);\n }\n }\n\n /**\n @notice Mints float owed to a user for multiple markets, since they last minted for those markets.\n @param marketIndexes Identifiers for the markets.\n @param user The address of the user.\n */\n function _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(\n uint32[] calldata marketIndexes,\n address user\n ) internal virtual {\n uint256 floatTotal = 0;\n uint256 length = marketIndexes.length;\n for (uint256 i = 0; i < length; i++) {\n uint256 floatToMint = _calculateAccumulatedFloatAndExecuteOutstandingShifts(\n marketIndexes[i],\n user\n );\n\n if (floatToMint > 0) {\n // Set the user has claimed up until now, stops them setting this forward\n userIndexOfLastClaimedReward[marketIndexes[i]][user] = latestRewardIndex[marketIndexes[i]];\n\n floatTotal += floatToMint;\n\n emit FloatMinted(user, marketIndexes[i], floatToMint);\n }\n }\n if (floatTotal > 0) {\n _mintFloat(user, floatTotal);\n }\n }\n\n /**\n @notice Mints outstanding float for msg.sender.\n @param marketIndexes Identifiers for the markets for which to mint float.\n */\n function claimFloatCustom(uint32[] calldata marketIndexes) external {\n ILongShort(longShort).updateSystemStateMulti(marketIndexes);\n _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, msg.sender);\n }\n\n /**\n @notice Mints outstanding float on behalf of another user.\n @param marketIndexes Identifiers for the markets for which to mint float.\n @param user The address of the user.\n */\n function claimFloatCustomFor(uint32[] calldata marketIndexes, address user) external {\n // Unbounded loop - users are responsible for paying their own gas costs on these and it doesn't effect the rest of the system.\n // No need to impose limit.\n ILongShort(longShort).updateSystemStateMulti(marketIndexes);\n _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti(marketIndexes, user);\n }\n\n /*╔═══════════════════════╗\n ║ STAKING ║\n ╚═══════════════════════╝*/\n\n /**\n @notice A user with synthetic tokens stakes by calling stake on the token\n contract which calls this function. We need to first update the\n state of the LongShort contract for this market before staking to correctly calculate user rewards.\n @param amount Amount to stake.\n @param from Address to stake for.\n */\n function stakeFromUser(address from, uint256 amount)\n external\n virtual\n override\n onlyValidSynthetic(msg.sender)\n gemCollecting(from)\n {\n uint32 marketIndex = marketIndexOfToken[msg.sender];\n ILongShort(longShort).updateSystemState(marketIndex);\n\n uint256 userCurrentIndexOfLastClaimedReward = userIndexOfLastClaimedReward[marketIndex][from];\n uint256 currentRewardIndex = latestRewardIndex[marketIndex];\n // If they already have staked and have rewards due, mint these.\n if (\n userCurrentIndexOfLastClaimedReward != 0 &&\n userCurrentIndexOfLastClaimedReward < currentRewardIndex\n ) {\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, from);\n }\n\n userAmountStaked[msg.sender][from] += amount;\n\n // NOTE: Users retroactively earn a little bit of FLT because they start earning from the previous update index.\n userIndexOfLastClaimedReward[marketIndex][from] = currentRewardIndex;\n\n emit StakeAdded(from, msg.sender, amount, currentRewardIndex);\n }\n\n /**\n @notice Allows users to shift their staked tokens from one side of the market to\n the other at the next price.\n @param amountSyntheticTokensToShift Amount of tokens to shift.\n @param marketIndex Identifier for the market.\n @param isShiftFromLong Whether the shift is from long to short or short to long.\n */\n function shiftTokens(\n uint256 amountSyntheticTokensToShift,\n uint32 marketIndex,\n bool isShiftFromLong\n )\n external\n virtual\n override\n updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShifts(\n marketIndex,\n msg.sender\n )\n gemCollecting(msg.sender)\n {\n require(amountSyntheticTokensToShift > 0, \"No zero shifts.\");\n address token = syntheticTokens[marketIndex][isShiftFromLong];\n uint256 totalAmountForNextShift = amountSyntheticTokensToShift +\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][isShiftFromLong][\n msg.sender\n ];\n\n require(\n userAmountStaked[token][msg.sender] >= totalAmountForNextShift,\n \"Not enough tokens to shift\"\n );\n\n ILongShort(longShort).shiftPositionNextPrice(\n marketIndex,\n amountSyntheticTokensToShift,\n isShiftFromLong\n );\n\n userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[marketIndex][isShiftFromLong][\n msg.sender\n ] = totalAmountForNextShift;\n\n uint256 userRewardIndex = latestRewardIndex[marketIndex] + 1;\n userNextPrice_stakedActionIndex[marketIndex][msg.sender] = userRewardIndex;\n\n emit NextPriceStakeShift(\n msg.sender,\n marketIndex,\n amountSyntheticTokensToShift,\n isShiftFromLong,\n userRewardIndex\n );\n }\n\n /*╔════════════════════════════╗\n ║ WITHDRAWAL & MINTING ║\n ╚════════════════════════════╝*/\n\n /**\n @notice Internal logic for withdrawing stakes.\n @dev Mint user any outstanding float before withdrawing.\n @param marketIndex Market index of token.\n @param amount Amount to withdraw.\n @param token Synthetic token that was staked.\n */\n function _withdraw(\n uint32 marketIndex,\n address token,\n uint256 amount\n ) internal virtual gemCollecting(msg.sender) {\n uint256 amountFees = (amount * marketUnstakeFee_e18[marketIndex]) / 1e18;\n\n ISyntheticToken(token).transfer(floatTreasury, amountFees);\n ISyntheticToken(token).transfer(msg.sender, amount - amountFees);\n\n emit StakeWithdrawn(msg.sender, token, amount);\n }\n\n function _withdrawPrepLogic(\n uint32 marketIndex,\n bool isWithdrawFromLong,\n uint256 amount,\n address token\n ) internal {\n ILongShort(longShort).updateSystemState(marketIndex);\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender);\n\n uint256 currentAmountStaked = userAmountStaked[token][msg.sender];\n // If this value is greater than zero they have pending nextPriceShifts; don't allow user to shit these reserved tokens.\n uint256 amountToShiftForThisToken = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\n marketIndex\n ][isWithdrawFromLong][msg.sender];\n\n unchecked {\n require(currentAmountStaked >= amount + amountToShiftForThisToken, \"not enough to withdraw\");\n userAmountStaked[token][msg.sender] = currentAmountStaked - amount;\n }\n }\n\n /**\n @notice Withdraw function. Allows users to unstake.\n @param amount Amount to withdraw.\n @param marketIndex Market index of staked synthetic token\n @param isWithdrawFromLong is synthetic token to be withdrawn long or short\n */\n function withdraw(\n uint32 marketIndex,\n bool isWithdrawFromLong,\n uint256 amount\n ) external {\n address token = syntheticTokens[marketIndex][isWithdrawFromLong];\n _withdrawPrepLogic(marketIndex, isWithdrawFromLong, amount, token);\n _withdraw(marketIndex, token, amount);\n }\n\n /**\n @notice Allows users to withdraw their entire stake for a token.\n @param marketIndex Market index of staked synthetic token\n @param isWithdrawFromLong is synthetic token to be withdrawn long or short\n */\n function withdrawAll(uint32 marketIndex, bool isWithdrawFromLong) external {\n ILongShort(longShort).updateSystemState(marketIndex);\n _mintAccumulatedFloatAndExecuteOutstandingShifts(marketIndex, msg.sender);\n\n address token = syntheticTokens[marketIndex][isWithdrawFromLong];\n\n uint256 userAmountStakedBeforeWithdrawal = userAmountStaked[token][msg.sender];\n\n uint256 amountToShiftForThisToken = userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom[\n marketIndex\n ][isWithdrawFromLong][msg.sender];\n userAmountStaked[token][msg.sender] = amountToShiftForThisToken;\n\n _withdraw(marketIndex, token, userAmountStakedBeforeWithdrawal - amountToShiftForThisToken);\n }\n\n function _hasher(\n uint32 marketIndex,\n bool isWithdrawFromLong,\n address user,\n uint256 withdrawAmount,\n uint256 expiry,\n uint256 nonce,\n uint256 discountWithdrawFee\n ) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(\n abi.encodePacked(\n marketIndex,\n isWithdrawFromLong,\n user,\n withdrawAmount,\n expiry,\n nonce,\n discountWithdrawFee\n )\n )\n )\n );\n }\n\n function withdrawWithVoucher(\n uint32 marketIndex,\n bool isWithdrawFromLong,\n uint256 withdrawAmount,\n uint256 expiry,\n uint256 nonce,\n uint256 discountWithdrawFee,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external gemCollecting(msg.sender) {\n address discountSigner = ecrecover(\n _hasher(\n marketIndex,\n isWithdrawFromLong,\n msg.sender,\n withdrawAmount,\n expiry,\n nonce,\n discountWithdrawFee\n ),\n v,\n r,\n s\n );\n hasRole(DISCOUNT_ROLE, discountSigner);\n\n require(block.timestamp < expiry, \"coupon expired\");\n require(userNonce[msg.sender] == nonce, \"invalid nonce\");\n require(discountWithdrawFee < marketUnstakeFee_e18[marketIndex], \"bad discount fee\");\n userNonce[msg.sender] = userNonce[msg.sender] + 1;\n\n address token = syntheticTokens[marketIndex][isWithdrawFromLong];\n\n _withdrawPrepLogic(marketIndex, isWithdrawFromLong, withdrawAmount, token);\n\n uint256 amountFees = (withdrawAmount * discountWithdrawFee) / 1e18;\n ISyntheticToken(token).transfer(floatTreasury, amountFees);\n ISyntheticToken(token).transfer(msg.sender, withdrawAmount - amountFees);\n emit StakeWithdrawn(msg.sender, token, withdrawAmount);\n }\n}\n" + }, + "contracts/oracles/OracleManagerFlippening_V0.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\n\nimport \"../interfaces/IOracleManager.sol\";\n\n/**\n Contract that estimates ETH / BTC dominance,\n expressed as (eth market cap) / (btc market cap)\n Estimates BTC & ETH supply. In the future\n look towards using oracles for it. \n*/\ncontract OracleManagerFlippening_V0 is IOracleManager {\n address public admin; // This will likely be the Gnosis safe\n\n int256 public ethDominance;\n\n uint256 public ethSupply; // 18 decimals\n uint256 public btcSupply; // 8 decimals\n\n uint256 public btcBlocksPerDay;\n uint256 public ethBlocksPerDay;\n\n uint256 public btcBlockReward; // 8 decimals\n uint256 public ethBlockReward; // 18 decimals\n\n uint256 public ethUnclesPerDay;\n\n // Eth has a variable uncle reward:\n // - https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1234.md,\n // Source here says it's roughly 75%:\n // - https://docs.ethhub.io/ethereum-basics/monetary-policy/\n // Might be worth also looking into just taking it as the mean of the possibilities\n // = sum from 1 to 7 of (8 - sumIndex) * blockReward / 8 / 7\n\n uint256 public ethUncleReward; // 18 decimals\n\n uint256 public ethNephewReward; // 18 decimals. currently = blockReward / 32\n\n uint256 lastUpdated;\n\n // Oracle addresses\n AggregatorV3Interface public btcOracle;\n AggregatorV3Interface public ethOracle;\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier adminOnly() {\n require(msg.sender == admin);\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n\n constructor(\n address _admin,\n address _btcOracle,\n address _ethOracle,\n uint256 _ethSupply,\n uint256 _btcSupply,\n uint256 _btcBlocksPerDay,\n uint256 _ethBlocksPerDay,\n uint256 _ethUnclesPerDay,\n uint256 _btcBlockReward,\n uint256 _ethBlockReward,\n uint256 _ethUncleReward,\n uint256 _ethNephewReward\n ) {\n admin = _admin;\n\n btcOracle = AggregatorV3Interface(_btcOracle);\n ethOracle = AggregatorV3Interface(_ethOracle);\n\n ethSupply = _ethSupply;\n btcSupply = _btcSupply;\n\n btcBlocksPerDay = _btcBlocksPerDay;\n\n ethBlocksPerDay = _ethBlocksPerDay;\n ethUnclesPerDay = _ethUnclesPerDay;\n\n btcBlockReward = _btcBlockReward;\n\n ethBlockReward = _ethBlockReward;\n ethUncleReward = _ethUncleReward;\n ethNephewReward = _ethNephewReward;\n\n lastUpdated = block.timestamp;\n\n _updatePrice();\n }\n\n ////////////////////////////////////\n /// MULTISIG ADMIN FUNCTIONS ///////\n ////////////////////////////////////\n\n function changeAdmin(address _admin) external adminOnly {\n admin = _admin;\n }\n\n function changeEthSupply(uint256 supply) external adminOnly {\n ethSupply = supply;\n }\n\n function changeBtcSupply(uint256 supply) external adminOnly {\n btcSupply = supply;\n }\n\n function changeBtcBlocksPerDay(uint256 blocks) external adminOnly {\n btcBlocksPerDay = blocks;\n }\n\n function changeEthBlocksPerDay(uint256 blocks) external adminOnly {\n ethBlocksPerDay = blocks;\n }\n\n function changeEthUnclesPerDay(uint256 uncles) external adminOnly {\n ethUnclesPerDay = uncles;\n }\n\n function changeBtcBlockReward(uint256 reward) external adminOnly {\n btcBlockReward = reward;\n }\n\n function changeEthBlockReward(uint256 reward) external adminOnly {\n ethBlockReward = reward;\n }\n\n function changeEthUncleReward(uint256 reward) external adminOnly {\n ethUncleReward = reward;\n }\n\n function changeEthNephewReward(uint256 reward) external adminOnly {\n ethNephewReward = reward;\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n\n function _getBtcSupply() internal view returns (uint256) {\n return\n btcSupply + (((block.timestamp - lastUpdated) * btcBlocksPerDay * btcBlockReward) / (1 days));\n }\n\n function _getEthSupply() internal view returns (uint256) {\n return\n ethSupply +\n (((block.timestamp - lastUpdated) *\n (ethBlocksPerDay * ethBlockReward + ethUnclesPerDay * (ethNephewReward + ethUncleReward))) /\n 1 days);\n }\n\n function _updatePrice() private returns (int256) {\n (, int256 _ethPrice, , , ) = ethOracle.latestRoundData();\n (, int256 _btcPrice, , , ) = btcOracle.latestRoundData();\n ethSupply = _getEthSupply();\n btcSupply = _getBtcSupply();\n\n lastUpdated = block.timestamp;\n\n // ethSupply * ethPrice = 26 decimals\n // btcSupply * btcPrice = 16 decimals\n\n // 1e20 as 18 decimals but as %\n ethDominance = int256(\n (uint256(_ethPrice) * ethSupply * 1e20) / (uint256(_btcPrice) * btcSupply * 1e10)\n );\n\n return ethDominance;\n }\n\n function updatePrice() external override returns (int256) {\n return _updatePrice();\n }\n\n function getLatestPrice() external view override returns (int256) {\n return ethDominance;\n }\n}\n" + }, + "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface AggregatorV3Interface {\n\n function decimals()\n external\n view\n returns (\n uint8\n );\n\n function description()\n external\n view\n returns (\n string memory\n );\n\n function version()\n external\n view\n returns (\n uint256\n );\n\n // getRoundData and latestRoundData should both raise \"No data present\"\n // if they do not have data to report, instead of returning unset values\n // which could be misinterpreted as actual reported values.\n function getRoundData(\n uint80 _roundId\n )\n external\n view\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n );\n\n function latestRoundData()\n external\n view\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n );\n\n}\n" + }, + "contracts/oracles/OracleManagerFlipp3ning.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\nimport \"../interfaces/IOracleManager.sol\";\n\ncontract OracleManagerFlipp3ning is IOracleManager {\n address public ethMarketCapFeed;\n address public btcMarketCapFeed;\n\n struct PriceData {\n uint80 lastRoundEth;\n uint80 lastRoundBtc;\n uint128 price;\n }\n\n PriceData public priceData;\n\n constructor(address _ethMarketCapFeed, address _btcMarketCapFeed) {\n ethMarketCapFeed = _ethMarketCapFeed;\n btcMarketCapFeed = _btcMarketCapFeed;\n\n require(\n AggregatorV3Interface(ethMarketCapFeed).decimals() ==\n AggregatorV3Interface(btcMarketCapFeed).decimals(),\n \"Decimals for feeds are different!\"\n );\n\n (uint80 _ethRound, uint80 _btcRound, int256 _ethMarketCap, int256 _btcMarketCap) = _feedData();\n\n priceData.price = _dominance(_ethMarketCap, _btcMarketCap);\n priceData.lastRoundEth = _ethRound;\n priceData.lastRoundBtc = _btcRound;\n }\n\n function _feedData()\n internal\n view\n returns (\n uint80 ethRound,\n uint80 btcRound,\n int256 ethPrice,\n int256 btcPrice\n )\n {\n (ethRound, ethPrice, , , ) = AggregatorV3Interface(ethMarketCapFeed).latestRoundData();\n (btcRound, btcPrice, , , ) = AggregatorV3Interface(btcMarketCapFeed).latestRoundData();\n }\n\n function _dominance(int256 _ethMarketCap, int256 _btcMarketCap) internal view returns (uint128) {\n // reverts if btc market cap == 0\n return uint128(uint256((_ethMarketCap * 1e20) / _btcMarketCap));\n }\n\n function getLatestPrice() external view override returns (int256) {\n return int256(uint256(priceData.price));\n }\n\n function updatePrice() external override returns (int256) {\n (uint80 _ethRound, uint80 _btcRound, int256 _ethMarketCap, int256 _btcMarketCap) = _feedData();\n\n if (_ethRound == priceData.lastRoundEth || _btcRound == priceData.lastRoundBtc) {\n return int256(uint256(priceData.price));\n }\n\n uint128 price = _dominance(_ethMarketCap, _btcMarketCap);\n priceData.price = price;\n priceData.lastRoundEth = _ethRound;\n priceData.lastRoundBtc = _btcRound;\n\n return int256(uint256(price));\n }\n}\n" + }, + "contracts/oracles/OracleManagerEthVsBtc.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\n\nimport \"../interfaces/IOracleManager.sol\";\n\n/**\n Contract that gives price ration of ETH/BTC\n*/\ncontract OracleManagerEthVsBtc is IOracleManager {\n address public admin; // This will likely be the Gnosis safe\n\n int256 public ethDominance;\n\n // Oracle addresses\n AggregatorV3Interface public btcOracle;\n AggregatorV3Interface public ethOracle;\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier adminOnly() {\n require(msg.sender == admin);\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n\n constructor(\n address _admin,\n address _btcOracle,\n address _ethOracle\n ) {\n admin = _admin;\n\n btcOracle = AggregatorV3Interface(_btcOracle);\n ethOracle = AggregatorV3Interface(_ethOracle);\n\n _updatePrice();\n }\n\n ////////////////////////////////////\n /// MULTISIG ADMIN FUNCTIONS ///////\n ////////////////////////////////////\n\n function changeAdmin(address _admin) external adminOnly {\n admin = _admin;\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n\n function _updatePrice() private returns (int256) {\n (, int256 _ethPrice, , , ) = ethOracle.latestRoundData();\n (, int256 _btcPrice, , , ) = btcOracle.latestRoundData();\n\n // 1e20 as 18 decimals but as %\n ethDominance = int256((uint256(_ethPrice) * 1e20) / (uint256(_btcPrice)));\n\n return ethDominance;\n }\n\n function updatePrice() external override returns (int256) {\n return _updatePrice();\n }\n\n function getLatestPrice() external view override returns (int256) {\n return ethDominance;\n }\n}\n" + }, + "contracts/oracles/OracleManagerEthKillerChainlink.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\n\nimport \"../interfaces/IOracleManager.sol\";\n\ncontract OracleManagerEthKillerChainlink is IOracleManager {\n address public admin; // This will likely be the Gnosis safe\n\n // Oracle price, changes by average of the underlying asset changes.\n int256 public indexPrice;\n\n // Underlying asset prices.\n int256 public tronPrice;\n int256 public eosPrice;\n int256 public xrpPrice;\n\n // Oracle addresses\n AggregatorV3Interface public tronOracle;\n AggregatorV3Interface public eosOracle;\n AggregatorV3Interface public xrpOracle;\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier adminOnly() {\n require(msg.sender == admin);\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n\n constructor(\n address _admin,\n address _tronOracle,\n address _eosOracle,\n address _xrpOracle\n ) {\n admin = _admin;\n tronOracle = AggregatorV3Interface(_tronOracle);\n eosOracle = AggregatorV3Interface(_eosOracle);\n xrpOracle = AggregatorV3Interface(_xrpOracle);\n // Initial asset prices.\n (tronPrice, eosPrice, xrpPrice) = _getAssetPrices();\n\n // Initial base index price.\n indexPrice = 1e18;\n }\n\n ////////////////////////////////////\n /// MULTISIG ADMIN FUNCTIONS ///////\n ////////////////////////////////////\n\n function changeAdmin(address _admin) external adminOnly {\n admin = _admin;\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n\n function _getAssetPrices()\n internal\n view\n returns (\n int256,\n int256,\n int256\n )\n {\n (, int256 _tronPrice, , , ) = tronOracle.latestRoundData();\n (, int256 _eosPrice, , , ) = eosOracle.latestRoundData();\n (, int256 _xrpPrice, , , ) = xrpOracle.latestRoundData();\n return (_tronPrice, _eosPrice, _xrpPrice);\n }\n\n function _updatePrice() internal virtual returns (int256) {\n (int256 newTronPrice, int256 newEosPrice, int256 newXrpPrice) = _getAssetPrices();\n\n int256 valueOfChangeInIndex = (int256(indexPrice) *\n (_calcAbsolutePercentageChange(newTronPrice, tronPrice) +\n _calcAbsolutePercentageChange(newEosPrice, eosPrice) +\n _calcAbsolutePercentageChange(newXrpPrice, xrpPrice))) / (3 * 1e18);\n\n tronPrice = newTronPrice;\n eosPrice = newEosPrice;\n xrpPrice = newXrpPrice;\n\n indexPrice = indexPrice + valueOfChangeInIndex;\n\n return indexPrice;\n }\n\n function updatePrice() external override returns (int256) {\n return _updatePrice();\n }\n\n function _calcAbsolutePercentageChange(int256 newPrice, int256 basePrice)\n internal\n pure\n returns (int256)\n {\n return ((newPrice - basePrice) * (1e18)) / (basePrice);\n }\n\n function getLatestPrice() external view override returns (int256) {\n return indexPrice;\n }\n}\n" + }, + "contracts/oracles/OracleManagerEthKillerChainlinkTestnet.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./OracleManagerEthKillerChainlink.sol\";\n\ncontract OracleManagerEthKillerChainlinkTestnet is OracleManagerEthKillerChainlink {\n uint256 lastUpdate;\n uint256 maxUpdateIntervalSeconds;\n int256 forcedPriceAdjustment;\n\n constructor(\n address _admin,\n address _tronOracle,\n address _eosOracle,\n address _xrpOracle,\n uint256 _maxUpdateIntervalSeconds\n ) OracleManagerEthKillerChainlink(_admin, _tronOracle, _eosOracle, _xrpOracle) {\n maxUpdateIntervalSeconds = _maxUpdateIntervalSeconds;\n }\n\n function setMaxUpdateInterval(uint256 newMaxUpdateIntervalSeconds) external adminOnly {\n maxUpdateIntervalSeconds = newMaxUpdateIntervalSeconds;\n }\n\n function _updatePrice() internal override returns (int256) {\n int256 previousPrice = indexPrice;\n int256 latestPrice = super._updatePrice();\n\n if (previousPrice != latestPrice || lastUpdate + maxUpdateIntervalSeconds < block.timestamp) {\n forcedPriceAdjustment = (forcedPriceAdjustment + 1) % 2;\n lastUpdate = block.timestamp;\n }\n\n return latestPrice + forcedPriceAdjustment;\n }\n}\n" + }, + "contracts/oracles/OracleManagerChainlink.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"../interfaces/IOracleManager.sol\";\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\n\n/*\n * Implementation of an OracleManager that fetches prices from a Chainlink aggregate price feed.\n */\ncontract OracleManagerChainlink is IOracleManager {\n // Admin addresses.\n address public admin;\n // Global state.\n AggregatorV3Interface public chainlinkOracle;\n uint8 public oracleDecimals;\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier adminOnly() {\n require(msg.sender == admin, \"Not admin\");\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n constructor(address _admin, address _chainlinkOracle) {\n admin = _admin;\n chainlinkOracle = AggregatorV3Interface(_chainlinkOracle);\n oracleDecimals = chainlinkOracle.decimals();\n }\n\n ////////////////////////////////////\n /// MULTISIG ADMIN FUNCTIONS ///////\n ////////////////////////////////////\n\n function changeAdmin(address _admin) external adminOnly {\n admin = _admin;\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n function _getLatestPrice() internal view returns (int256) {\n (, int256 price, , , ) = chainlinkOracle.latestRoundData();\n return price;\n }\n\n function getLatestPrice() external view override returns (int256) {\n return _getLatestPrice();\n }\n\n function updatePrice() external virtual override returns (int256) {\n return _getLatestPrice();\n }\n}\n" + }, + "contracts/oracles/OracleManagerChainlinkTestnet.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./OracleManagerChainlink.sol\";\n\ncontract OracleManagerChainlinkTestnet is OracleManagerChainlink {\n uint256 lastUpdate;\n uint256 maxUpdateIntervalSeconds;\n int256 forcedPriceAdjustment;\n\n constructor(\n address _admin,\n address _chainlinkOracle,\n uint256 _maxUpdateIntervalSeconds\n ) OracleManagerChainlink(_admin, _chainlinkOracle) {\n maxUpdateIntervalSeconds = _maxUpdateIntervalSeconds;\n }\n\n function setMaxUpdateInterval(uint256 newMaxUpdateIntervalSeconds) external adminOnly {\n maxUpdateIntervalSeconds = newMaxUpdateIntervalSeconds;\n }\n\n function updatePrice() external override returns (int256) {\n int256 latestPrice = super._getLatestPrice();\n\n int256 priceAdjustment = forcedPriceAdjustment;\n if (lastUpdate + maxUpdateIntervalSeconds < block.timestamp) {\n priceAdjustment = (priceAdjustment + 1) % 2;\n forcedPriceAdjustment = priceAdjustment;\n lastUpdate = block.timestamp;\n }\n\n return latestPrice + priceAdjustment;\n }\n}\n" + }, + "contracts/mocks/AggregatorV3Mock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\n\n/*\n * AggregatorV3Mock is an implementation of a chainlink oracle that allows prices\n * to be set arbitrarily for testing.\n */\ncontract AggregatorV3Mock is AggregatorV3Interface, Initializable {\n // Admin contracts.\n address public admin;\n uint8 public override decimals;\n uint256 public override version;\n\n string public override description = \"This is a mock chainlink oracle\";\n\n struct RoundData {\n uint80 answeredInRound;\n int256 answer;\n uint256 setAt;\n }\n mapping(uint80 => RoundData) public roundData;\n uint80 currentRoundId;\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier adminOnly() {\n require(msg.sender == admin, \"Not admin\");\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n\n function setup(\n address _admin,\n int256 _price,\n uint8 _decimals\n ) public initializer {\n admin = _admin;\n decimals = (_decimals != 0) ? _decimals : 18;\n version = 1;\n currentRoundId = 1;\n roundData[currentRoundId] = RoundData(currentRoundId, _price, block.timestamp);\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n\n /*\n * Sets the mock rate for the oracle.\n */\n function setPrice(int256 _price) public {\n currentRoundId = currentRoundId + 1;\n roundData[currentRoundId] = RoundData(currentRoundId, _price, block.timestamp);\n }\n\n function getRoundData(uint80 _roundId)\n external\n view\n override\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n )\n {\n RoundData storage round = roundData[_roundId];\n return (_roundId, round.answer, round.setAt, round.setAt, 1);\n }\n\n function latestRoundData()\n external\n view\n override\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n )\n {\n RoundData storage round = roundData[currentRoundId];\n return (currentRoundId, round.answer, round.setAt, round.setAt, 1);\n }\n}\n" + }, + "contracts/SyntheticTokenUpgradeable.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./interfaces/IStaker.sol\";\nimport \"./interfaces/ILongShort.sol\";\nimport \"./interfaces/ISyntheticToken.sol\";\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\n/**\n@title SyntheticTokenUpgradeable\n@notice An ERC20 token that tracks or inversely tracks the price of an\n underlying asset with floating exposure.\n@dev Logic for price tracking contained in LongShort.sol. \n The contract inherits from ERC20PresetMinterPauser.sol\n*/\ncontract SyntheticTokenUpgradeable is\n ISyntheticToken,\n Initializable,\n ERC20Upgradeable,\n ERC20BurnableUpgradeable,\n AccessControlUpgradeable,\n ERC20PermitUpgradeable,\n UUPSUpgradeable\n{\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant UPGRADER_ROLE = keccak256(\"UPGRADER_ROLE\");\n\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\n address public longShort;\n /// @notice Address of the Staker contract, a deployed Staker.sol\n address public staker;\n /// @notice Identifies which market in longShort the token is for.\n uint32 public marketIndex;\n /// @notice Whether the token is a long token or short token for its market.\n bool public isLong;\n\n /// @notice Creates an instance of the contract.\n /// @dev Should only be called by TokenFactory.sol for our system.\n /// @param name The name of the token.\n /// @param symbol The symbol for the token.\n /// @param _longShort Address of the core LongShort contract.\n /// @param _staker Address of the staker contract.\n /// @param _marketIndex Which market the token is for.\n /// @param _isLong Whether the token is long or short for its market.\n function initialize(\n string memory name,\n string memory symbol,\n address _longShort,\n address _staker,\n uint32 _marketIndex,\n bool _isLong\n ) external initializer {\n __ERC20_init(name, symbol);\n __ERC20Burnable_init();\n __AccessControl_init();\n __ERC20Permit_init(name);\n __UUPSUpgradeable_init();\n\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\n renounceRole(MINTER_ROLE, msg.sender);\n\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\n _setupRole(MINTER_ROLE, _longShort);\n _setupRole(UPGRADER_ROLE, msg.sender);\n\n longShort = _longShort;\n staker = _staker;\n marketIndex = _marketIndex;\n isLong = _isLong;\n }\n\n /// @notice Authorizes an upgrade to a new address.\n /// @dev Can only be called by the current admin.\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\n\n // TODO - look at some way of not duplicating implementation logic between this and SyntheticToken.sol\n\n /// @notice Allows users to stake their synthetic tokens to earn Float.\n /// @dev Core staking logic contained in Staker.sol\n /// @param amount Amount to stake in wei.\n function stake(uint256 amount) external override {\n // NOTE: this is safe, this function will throw \"ERC20: transfer\n // amount exceeds balance\" if amount exceeds users balance.\n super._transfer(msg.sender, address(staker), amount);\n\n IStaker(staker).stakeFromUser(msg.sender, amount);\n }\n\n /*╔══════════════════════════════════════════════════════╗\n ║ FUNCTIONS INHERITED BY ERC20PresetMinterPauser ║\n ╚══════════════════════════════════════════════════════╝*/\n\n function totalSupply()\n public\n view\n virtual\n override(ERC20Upgradeable, ISyntheticToken)\n returns (uint256)\n {\n return ERC20Upgradeable.totalSupply();\n }\n\n /** \n @notice Mints a number of synthetic tokens for an address.\n @dev Can only be called by addresses with a minter role. \n This should correspond to the Long Short contract.\n @param to The address for which to mint the tokens for.\n @param amount Amount of synthetic tokens to mint in wei.\n */\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\n _mint(to, amount);\n }\n\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\n /// @param amount The amount of tokens to burn in wei.\n function burn(uint256 amount) public override(ERC20BurnableUpgradeable, ISyntheticToken) {\n require(msg.sender == longShort, \"Only LongShort contract\");\n super._burn(_msgSender(), amount);\n }\n\n /** \n @notice Overrides the default ERC20 transferFrom.\n @dev To allow users to avoid approving LongShort when redeeming tokens,\n longShort has a virtual infinite allowance.\n @param sender User for which to transfer tokens.\n @param recipient Recipient of the transferred tokens.\n @param amount Amount of tokens to transfer in wei.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override(ERC20Upgradeable, ISyntheticToken) returns (bool) {\n if (recipient == longShort && msg.sender == longShort) {\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\n ERC20Upgradeable._transfer(sender, recipient, amount);\n return true;\n } else {\n return ERC20Upgradeable.transferFrom(sender, recipient, amount);\n }\n }\n\n function transfer(address recipient, uint256 amount)\n public\n virtual\n override(ERC20Upgradeable, ISyntheticToken)\n returns (bool)\n {\n return ERC20Upgradeable.transfer(recipient, amount);\n }\n\n /** \n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\n tokens from next price actions before any token transfer occurs.\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\n @param sender User for which tokens are to be transferred for.\n */\n function _beforeTokenTransfer(\n address sender,\n address to,\n uint256 amount\n ) internal override {\n if (sender != longShort) {\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\n }\n super._beforeTokenTransfer(sender, to, amount);\n }\n\n /** \n @notice Gets the synthetic token balance of the user in wei.\n @dev To automatically account for next price actions which have been confirmed but not settled,\n includes any outstanding tokens owed by longShort.\n @param account The address for which to get the balance of.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return\n ERC20Upgradeable.balanceOf(account) +\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\n account,\n marketIndex,\n isLong\n );\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20PermitUpgradeable.sol\";\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation 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 *\n * _Available since v3.4._\n */\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n mapping(address => CountersUpgradeable.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private _PERMIT_TYPEHASH;\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n function __ERC20Permit_init(string memory name) internal initializer {\n __Context_init_unchained();\n __EIP712_init_unchained(name, \"1\");\n __ERC20Permit_init_unchained(name);\n }\n\n function __ERC20Permit_init_unchained(string memory name) internal initializer {\n _PERMIT_TYPEHASH = keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");}\n\n /**\n * @dev See {IERC20Permit-permit}.\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 ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20PermitUpgradeable {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712Upgradeable is Initializable {\n /* solhint-disable var-name-mixedcase */\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal initializer {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal initializer {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712NameHash() internal virtual view returns (bytes32) {\n return _HASHED_NAME;\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\n return _HASHED_VERSION;\n }\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSAUpgradeable {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s;\n uint8 v;\n assembly {\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n v := add(shr(255, vs), 27)\n }\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary CountersUpgradeable {\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n unchecked {\n counter._value += 1;\n }\n }\n\n function decrement(Counter storage counter) internal {\n uint256 value = counter._value;\n require(value > 0, \"Counter: decrement overflow\");\n unchecked {\n counter._value = value - 1;\n }\n }\n\n function reset(Counter storage counter) internal {\n counter._value = 0;\n }\n}\n" + }, + "contracts/StakingStrategy.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\n\nimport \"./interfaces/ILongShort.sol\";\nimport \"./interfaces/ISyntheticToken.sol\";\nimport \"./interfaces/IStaker.sol\";\nimport \"./StrategyToken.sol\";\n\n/** @title ILO Contract */\ncontract StakingStrategy is Initializable, UUPSUpgradeable, AccessControlUpgradeable {\n bytes32 public constant UPGRADER_ROLE = keccak256(\"UPGRADER_ROLE\");\n\n address public longShort;\n address public staker;\n StrategyToken public strategyToken;\n\n /*╔═════════════════════════════╗\n ║ CONTRACT SETUP ║\n ╚═════════════════════════════╝*/\n\n function initialize(\n string calldata name,\n string calldata symbol,\n address _longShort,\n address _staker\n ) external initializer {\n __AccessControl_init();\n __UUPSUpgradeable_init();\n\n longShort = _longShort;\n strategyToken = new StrategyToken(name, symbol);\n staker = _staker;\n\n _setupRole(UPGRADER_ROLE, msg.sender);\n grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\n\n /*╔═════════════════════════════╗\n ║ DEPOSIT ║\n ╚═════════════════════════════╝*/\n function depositLongAndShortTokens(\n uint32 marketIndex,\n uint256 amountToken,\n bool isLong\n ) public {\n ILongShort _longShort = ILongShort(longShort);\n address longTokenAddress = _longShort.syntheticTokens(marketIndex, true);\n address shortTokenAddress = _longShort.syntheticTokens(marketIndex, false);\n\n //TODO\n //can maybe add this method to longShort contract?\n (uint256 longTokenPrice, uint256 shortTokenPrice) = _getLongAndShortTokenPrice(marketIndex);\n\n (uint256 longShortRatio, uint256 beforeBalanceOfContract) = _getContractStakedBalanceAndRatio(\n marketIndex,\n longTokenAddress,\n shortTokenAddress,\n longTokenPrice,\n shortTokenPrice\n );\n (uint256 _amountStakedLong, uint256 _amountStakedShort) = _getTotalLongAndShortTokensStaked(\n marketIndex,\n longTokenAddress,\n shortTokenAddress\n );\n uint256 amountOfTokensToMatchRatio;\n\n if (isLong) {\n amountOfTokensToMatchRatio = amountToken / (longShortRatio);\n } else {\n amountOfTokensToMatchRatio = amountToken * longShortRatio;\n }\n\n //TODO\n //two transfers - can optimise\n ISyntheticToken(_longShort.syntheticTokens(marketIndex, isLong)).transferFrom(\n msg.sender,\n address(this),\n amountToken\n );\n ISyntheticToken(_longShort.syntheticTokens(marketIndex, !isLong)).transferFrom(\n msg.sender,\n address(this),\n amountOfTokensToMatchRatio\n );\n\n ISyntheticToken(_longShort.syntheticTokens(marketIndex, isLong)).stake(amountToken);\n ISyntheticToken(_longShort.syntheticTokens(marketIndex, !isLong)).stake(\n amountOfTokensToMatchRatio\n );\n\n (uint256 finalLongShortRatio, uint256 totalValueStaked) = _getContractStakedBalanceAndRatio(\n marketIndex,\n longTokenAddress,\n shortTokenAddress,\n longTokenPrice,\n shortTokenPrice\n );\n\n if (finalLongShortRatio != 1) {\n _performShiftingStrategy(\n marketIndex,\n totalValueStaked,\n longTokenAddress,\n shortTokenAddress,\n longTokenPrice,\n shortTokenPrice\n );\n }\n\n //TODO can seperate this into it's own method?\n uint256 shares;\n\n if (strategyToken.totalSupply() == 0) {\n shares = totalValueStaked;\n } else {\n // Users deposited amount * cost per share\n //cost per share =\n shares =\n (((totalValueStaked - beforeBalanceOfContract)) * beforeBalanceOfContract) /\n strategyToken.totalSupply();\n }\n\n strategyToken.mint(msg.sender, shares);\n }\n\n /*╔═════════════════════════════╗\n ║ HELPER FUNCTIONS ║\n ╚═════════════════════════════╝*/\n\n //Retrieves the number of long and short tokens staked by this contract\n function _getTotalLongAndShortTokensStaked(\n uint32 marketIndex,\n address longTokenAddress,\n address shortTokenAddress\n ) internal view returns (uint256, uint256) {\n IStaker _staker = IStaker(staker);\n uint256 amountStakedLong = _staker.userAmountStaked(longTokenAddress, address(this));\n uint256 amountStakedShort = _staker.userAmountStaked(shortTokenAddress, address(this));\n\n return (amountStakedLong, amountStakedShort);\n }\n\n //TODO calculate the shares for the user\n function _calculateUserShares() internal returns (uint256) {\n // add the logic for share distribution here\n }\n\n //Gets the $ balance of the staked tokens\n function _getContractStakedBalanceAndRatio(\n uint32 marketIndex,\n address longTokenAddress,\n address shortTokenAddress,\n uint256 longTokenPrice,\n uint256 shortTokenPrice\n ) internal view returns (uint256, uint256) {\n uint256 marketUpdateIndex = ILongShort(longShort).marketUpdateIndex(marketIndex);\n (uint256 _amountStakedLong, uint256 _amountStakedShort) = _getTotalLongAndShortTokensStaked(\n marketIndex,\n longTokenAddress,\n shortTokenAddress\n );\n uint256 longSideValue = (_amountStakedLong * longTokenPrice) / 1e18;\n uint256 shortSideValue = (_amountStakedShort * shortTokenPrice) / 1e18;\n\n uint256 longShortRatio = longSideValue / shortSideValue;\n uint256 contractBalance = (longSideValue + shortSideValue);\n\n return (longShortRatio, contractBalance);\n }\n\n function _getLongAndShortTokenPrice(uint32 marketIndex)\n internal\n view\n returns (uint256 longTokenPrice, uint256 shortTokenPrice)\n {\n uint256 marketUpdateIndex = ILongShort(longShort).marketUpdateIndex(marketIndex);\n uint256 longTokenPrice = ILongShort(longShort).syntheticToken_priceSnapshot(\n marketIndex,\n true,\n marketUpdateIndex\n );\n uint256 shortTokenPrice = ILongShort(longShort).syntheticToken_priceSnapshot(\n marketIndex,\n false,\n marketUpdateIndex\n );\n }\n\n /*╔═════════════════════════════╗\n ║ STRATEGY ║\n ╚═════════════════════════════╝*/\n\n //Perform the shifting strategy of this contract to ensure 50/50 balance of long short token values\n function _performShiftingStrategy(\n uint32 marketIndex,\n uint256 totalValueStaked,\n address longTokenAddress,\n address shortTokenAddress,\n uint256 longTokenPrice,\n uint256 shortTokenPrice\n ) internal {\n (uint256 _amountStakedLong, uint256 _amountStakedShort) = _getTotalLongAndShortTokensStaked(\n marketIndex,\n longTokenAddress,\n shortTokenAddress\n );\n\n //50 - 50 split, can aim to make this resuable\n uint256 desiredAmountOfLongTokens = ((totalValueStaked / 2) * 1e18) / longTokenPrice;\n uint256 desiredAmountOfShortTokens = ((totalValueStaked / 2) * 1e18) / shortTokenPrice;\n\n //check that no shifting occurs if the distribution of long and short tokens are already correct\n if (_amountStakedLong > desiredAmountOfLongTokens) {\n //Shift to short side\n IStaker(staker).shiftTokens(_amountStakedLong - desiredAmountOfLongTokens, marketIndex, true);\n } else if (_amountStakedShort > desiredAmountOfShortTokens) {\n //shift to long side\n IStaker(staker).shiftTokens(\n _amountStakedShort - desiredAmountOfShortTokens,\n marketIndex,\n false\n );\n }\n }\n\n /// @notice Shifts tokens to either the long or the short position for the market to maintain 50/50 split in $ value\n /// @param marketIndex An uint32 which uniquely identifies a market.\n function performShiftingStrategy(uint32 marketIndex) external {\n address longTokenAddress = ILongShort(longShort).syntheticTokens(marketIndex, true);\n address shortTokenAddress = ILongShort(longShort).syntheticTokens(marketIndex, false);\n (uint256 longTokenPrice, uint256 shortTokenPrice) = _getLongAndShortTokenPrice(marketIndex);\n\n (uint256 longShortRatio, uint256 totalValueStaked) = _getContractStakedBalanceAndRatio(\n marketIndex,\n longTokenAddress,\n shortTokenAddress,\n longTokenPrice,\n shortTokenPrice\n );\n\n if (longShortRatio != 1) {\n _performShiftingStrategy(\n marketIndex,\n totalValueStaked,\n longTokenAddress,\n shortTokenAddress,\n longTokenPrice,\n shortTokenPrice\n );\n }\n }\n}\n" + }, + "contracts/StrategyToken.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\";\n\ncontract StrategyToken is ERC20Upgradeable, ERC20BurnableUpgradeable {\n constructor(string memory name, string memory symbol) {\n __ERC20_init(name, symbol);\n }\n\n function mint(address _recipient, uint256 _amount) external {\n _mint(_recipient, _amount);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20Permit.sol\";\nimport \"../ERC20.sol\";\nimport \"../../../utils/cryptography/draft-EIP712.sol\";\nimport \"../../../utils/cryptography/ECDSA.sol\";\nimport \"../../../utils/Counters.sol\";\n\n/**\n * @dev Implementation 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 *\n * _Available since v3.4._\n */\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\n using Counters for Counters.Counter;\n\n mapping(address => Counters.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private immutable _PERMIT_TYPEHASH =\n keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n constructor(string memory name) EIP712(name, \"1\") {}\n\n /**\n * @dev See {IERC20Permit-permit}.\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 ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSA.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n Counters.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\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/utils/cryptography/draft-EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\n uint256 private immutable _CACHED_CHAIN_ID;\n\n bytes32 private immutable _HASHED_NAME;\n bytes32 private immutable _HASHED_VERSION;\n bytes32 private immutable _TYPE_HASH;\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n constructor(string memory name, string memory version) {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\n \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n );\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n if (block.chainid == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s;\n uint8 v;\n assembly {\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n v := add(shr(255, vs), 27)\n }\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Counters.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary Counters {\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n unchecked {\n counter._value += 1;\n }\n }\n\n function decrement(Counter storage counter) internal {\n uint256 value = counter._value;\n require(value > 0, \"Counter: decrement overflow\");\n unchecked {\n counter._value = value - 1;\n }\n }\n\n function reset(Counter storage counter) internal {\n counter._value = 0;\n }\n}\n" + }, + "contracts/FloatToken.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\";\n\nimport \"./interfaces/IFloatToken.sol\";\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\n/**\n @title FloatToken\n @notice The Float Token is the governance token for the Float Capital protocol\n */\ncontract FloatToken is\n IFloatToken,\n Initializable,\n ERC20Upgradeable,\n ERC20BurnableUpgradeable,\n PausableUpgradeable,\n AccessControlUpgradeable,\n ERC20PermitUpgradeable,\n ERC20VotesUpgradeable,\n UUPSUpgradeable\n{\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant UPGRADER_ROLE = keccak256(\"UPGRADER_ROLE\");\n\n /**\n @notice Initialize the Float Token with relevant\n @dev This function is called `initialize` to differentiate it from `initialize(string,string)` in the parent contract which should NOT be called to initialize this contract. \n @param name The name of the Float governance token\n @param symbol The ticker representing the token\n @param stakerAddress The staker contract that controls minting of the token\n */\n function initialize(\n string calldata name,\n string calldata symbol,\n address stakerAddress\n ) external initializer {\n __ERC20_init(name, symbol);\n __ERC20Burnable_init();\n __Pausable_init();\n __AccessControl_init();\n __ERC20Permit_init(name);\n __UUPSUpgradeable_init();\n\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\n renounceRole(MINTER_ROLE, msg.sender);\n\n _setupRole(DEFAULT_ADMIN_ROLE, stakerAddress);\n _setupRole(MINTER_ROLE, stakerAddress);\n _setupRole(PAUSER_ROLE, msg.sender);\n\n _setupRole(UPGRADER_ROLE, msg.sender);\n\n // Token starts as paused\n _pause();\n }\n\n /*╔═══════════════════════════════════════════════════════════════════╗\n ║ FUNCTIONS INHERITED BY ERC20PresetMinterPauserUpgradeable ║\n ╚═══════════════════════════════════════════════════════════════════╝*/\n\n /** \n @notice Mints an amount of Float tokens for an address.\n @dev Can only be called by addresses with a MINTER_ROLE. \n This should correspond to the Staker contract.\n @param to The address for which to mint the tokens for.\n @param amount Amount of synthetic tokens to mint in wei.\n */\n function mint(address to, uint256 amount) external override(IFloatToken) onlyRole(MINTER_ROLE) {\n _mint(to, amount);\n }\n\n /**\n @notice modify token functionality so that a pausing this token doesn't affect minting\n @dev Pause functionality in the open zeppelin ERC20PresetMinterPauserUpgradeable comes from the below function.\n We override it to exclude anyone with the minter role (ie the Staker contract)\n @param from address tokens are being sent from\n @param to address tokens are being sent to\n @param amount amount of tokens being sent\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n require(!paused() || hasRole(MINTER_ROLE, _msgSender()), \"Paused and not minter\");\n\n super._beforeTokenTransfer(from, to, amount);\n }\n\n function pause() external onlyRole(PAUSER_ROLE) {\n _pause();\n }\n\n function unpause() external onlyRole(PAUSER_ROLE) {\n _unpause();\n }\n\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) {\n super._afterTokenTransfer(from, to, amount);\n }\n\n function _mint(address to, uint256 amount)\n internal\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\n {\n super._mint(to, amount);\n }\n\n function _burn(address account, uint256 amount)\n internal\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\n {\n super._burn(account, amount);\n }\n\n function totalSupply()\n public\n view\n virtual\n override(ERC20Upgradeable, IFloatToken)\n returns (uint256)\n {\n return ERC20Upgradeable.totalSupply();\n }\n\n function transfer(address recipient, uint256 amount)\n public\n virtual\n override(ERC20Upgradeable, IFloatToken)\n returns (bool)\n {\n return ERC20Upgradeable.transfer(recipient, amount);\n }\n\n function burnFrom(address account, uint256 amount)\n public\n virtual\n override(ERC20BurnableUpgradeable, IFloatToken)\n {\n ERC20BurnableUpgradeable.burnFrom(account, amount);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./draft-ERC20PermitUpgradeable.sol\";\nimport \"../../../utils/math/MathUpgradeable.sol\";\nimport \"../../../utils/math/SafeCastUpgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,\n * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.\n *\n * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.\n *\n * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either\n * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting\n * power can be queried through the public accessors {getVotes} and {getPastVotes}.\n *\n * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it\n * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.\n * Enabling self-delegation can easily be done by overriding the {delegates} function. Keep in mind however that this\n * will significantly increase the base gas cost of transfers.\n *\n * _Available since v4.2._\n */\nabstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable {\n function __ERC20Votes_init_unchained() internal initializer {\n }\n struct Checkpoint {\n uint32 fromBlock;\n uint224 votes;\n }\n\n bytes32 private constant _DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n mapping(address => address) private _delegates;\n mapping(address => Checkpoint[]) private _checkpoints;\n Checkpoint[] private _totalSupplyCheckpoints;\n\n /**\n * @dev Emitted when an account changes their delegate.\n */\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /**\n * @dev Emitted when a token transfer or delegate change results in changes to an account's voting power.\n */\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\n\n /**\n * @dev Get the `pos`-th checkpoint for `account`.\n */\n function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) {\n return _checkpoints[account][pos];\n }\n\n /**\n * @dev Get number of checkpoints for `account`.\n */\n function numCheckpoints(address account) public view virtual returns (uint32) {\n return SafeCastUpgradeable.toUint32(_checkpoints[account].length);\n }\n\n /**\n * @dev Get the address `account` is currently delegating to.\n */\n function delegates(address account) public view virtual returns (address) {\n return _delegates[account];\n }\n\n /**\n * @dev Gets the current votes balance for `account`\n */\n function getVotes(address account) public view returns (uint256) {\n uint256 pos = _checkpoints[account].length;\n return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\n }\n\n /**\n * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.\n *\n * Requirements:\n *\n * - `blockNumber` must have been already mined\n */\n function getPastVotes(address account, uint256 blockNumber) public view returns (uint256) {\n require(blockNumber < block.number, \"ERC20Votes: block not yet mined\");\n return _checkpointsLookup(_checkpoints[account], blockNumber);\n }\n\n /**\n * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.\n * It is but NOT the sum of all the delegated votes!\n *\n * Requirements:\n *\n * - `blockNumber` must have been already mined\n */\n function getPastTotalSupply(uint256 blockNumber) public view returns (uint256) {\n require(blockNumber < block.number, \"ERC20Votes: block not yet mined\");\n return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);\n }\n\n /**\n * @dev Lookup a value in a list of (sorted) checkpoints.\n */\n function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {\n // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.\n //\n // During the loop, the index of the wanted checkpoint remains in the range [low-1, high).\n // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant.\n // - If the middle checkpoint is after `blockNumber`, we look in [low, mid)\n // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high)\n // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not\n // out of bounds (in which case we're looking too far in the past and the result is 0).\n // Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is\n // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out\n // the same.\n uint256 high = ckpts.length;\n uint256 low = 0;\n while (low < high) {\n uint256 mid = MathUpgradeable.average(low, high);\n if (ckpts[mid].fromBlock > blockNumber) {\n high = mid;\n } else {\n low = mid + 1;\n }\n }\n\n return high == 0 ? 0 : ckpts[high - 1].votes;\n }\n\n /**\n * @dev Delegate votes from the sender to `delegatee`.\n */\n function delegate(address delegatee) public virtual {\n return _delegate(_msgSender(), delegatee);\n }\n\n /**\n * @dev Delegates votes from signer to `delegatee`\n */\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual {\n require(block.timestamp <= expiry, \"ERC20Votes: signature expired\");\n address signer = ECDSAUpgradeable.recover(\n _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),\n v,\n r,\n s\n );\n require(nonce == _useNonce(signer), \"ERC20Votes: invalid nonce\");\n return _delegate(signer, delegatee);\n }\n\n /**\n * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1).\n */\n function _maxSupply() internal view virtual returns (uint224) {\n return type(uint224).max;\n }\n\n /**\n * @dev Snapshots the totalSupply after it has been increased.\n */\n function _mint(address account, uint256 amount) internal virtual override {\n super._mint(account, amount);\n require(totalSupply() <= _maxSupply(), \"ERC20Votes: total supply risks overflowing votes\");\n\n _writeCheckpoint(_totalSupplyCheckpoints, _add, amount);\n }\n\n /**\n * @dev Snapshots the totalSupply after it has been decreased.\n */\n function _burn(address account, uint256 amount) internal virtual override {\n super._burn(account, amount);\n\n _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount);\n }\n\n /**\n * @dev Move voting power when tokens are transferred.\n *\n * Emits a {DelegateVotesChanged} event.\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._afterTokenTransfer(from, to, amount);\n\n _moveVotingPower(delegates(from), delegates(to), amount);\n }\n\n /**\n * @dev Change delegation for `delegator` to `delegatee`.\n *\n * Emits events {DelegateChanged} and {DelegateVotesChanged}.\n */\n function _delegate(address delegator, address delegatee) internal virtual {\n address currentDelegate = delegates(delegator);\n uint256 delegatorBalance = balanceOf(delegator);\n _delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveVotingPower(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveVotingPower(\n address src,\n address dst,\n uint256 amount\n ) private {\n if (src != dst && amount > 0) {\n if (src != address(0)) {\n (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount);\n emit DelegateVotesChanged(src, oldWeight, newWeight);\n }\n\n if (dst != address(0)) {\n (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount);\n emit DelegateVotesChanged(dst, oldWeight, newWeight);\n }\n }\n }\n\n function _writeCheckpoint(\n Checkpoint[] storage ckpts,\n function(uint256, uint256) view returns (uint256) op,\n uint256 delta\n ) private returns (uint256 oldWeight, uint256 newWeight) {\n uint256 pos = ckpts.length;\n oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;\n newWeight = op(oldWeight, delta);\n\n if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {\n ckpts[pos - 1].votes = SafeCastUpgradeable.toUint224(newWeight);\n } else {\n ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(block.number), votes: SafeCastUpgradeable.toUint224(newWeight)}));\n }\n }\n\n function _add(uint256 a, uint256 b) private pure returns (uint256) {\n return a + b;\n }\n\n function _subtract(uint256 a, uint256 b) private pure returns (uint256) {\n return a - b;\n }\n uint256[47] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\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 / b + (a % b == 0 ? 0 : 1);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCastUpgradeable {\n /**\n * @dev Returns the downcasted uint224 from uint256, reverting on\n * overflow (when the input is greater than largest uint224).\n *\n * Counterpart to Solidity's `uint224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n */\n function toUint224(uint256 value) internal pure returns (uint224) {\n require(value <= type(uint224).max, \"SafeCast: value doesn't fit in 224 bits\");\n return uint224(value);\n }\n\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value <= type(uint128).max, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint96 from uint256, reverting on\n * overflow (when the input is greater than largest uint96).\n *\n * Counterpart to Solidity's `uint96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n */\n function toUint96(uint256 value) internal pure returns (uint96) {\n require(value <= type(uint96).max, \"SafeCast: value doesn't fit in 96 bits\");\n return uint96(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value <= type(uint64).max, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value <= type(uint32).max, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value <= type(uint16).max, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value <= type(uint8).max, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= type(int128).min && value <= type(int128).max, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= type(int64).min && value <= type(int64).max, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= type(int32).min && value <= type(int32).max, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= type(int16).min && value <= type(int16).max, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= type(int8).min && value <= type(int8).max, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n require(value <= uint256(type(int256).max), \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" + }, + "contracts/AlphaTestFLT.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\";\n\nimport \"./interfaces/IFloatToken.sol\";\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\n/**\n @title FloatToken\n @notice The Float Token is the governance token for the Float Capital protocol\n */\ncontract AlphaTestFLT is\n IFloatToken,\n Initializable,\n ERC20Upgradeable,\n ERC20BurnableUpgradeable,\n PausableUpgradeable,\n AccessControlUpgradeable,\n ERC20PermitUpgradeable,\n ERC20VotesUpgradeable,\n UUPSUpgradeable\n{\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant UPGRADER_ROLE = keccak256(\"UPGRADER_ROLE\");\n\n address public treasury;\n\n /**\n @notice Initialize the Float Token with relevant\n @dev This function is called `initialize` to differentiate it from `initialize(string,string)` in the parent contract which should NOT be called to initialize this contract. \n @param name The name of the Float governance token\n @param symbol The ticker representing the token\n @param stakerAddress The staker contract that controls minting of the token\n */\n function initialize(\n string calldata name,\n string calldata symbol,\n address stakerAddress,\n address treasuryAddress\n ) external initializer {\n __ERC20_init(name, symbol);\n __ERC20Burnable_init();\n __Pausable_init();\n __AccessControl_init();\n __ERC20Permit_init(name);\n __UUPSUpgradeable_init();\n\n treasury = treasuryAddress;\n\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\n renounceRole(MINTER_ROLE, msg.sender);\n\n _setupRole(DEFAULT_ADMIN_ROLE, stakerAddress);\n _setupRole(MINTER_ROLE, stakerAddress);\n\n _setupRole(PAUSER_ROLE, msg.sender);\n _setupRole(UPGRADER_ROLE, msg.sender);\n\n // Token starts as paused\n _pause();\n }\n\n /*╔═══════════════════════════════════════════════════════════════════╗\n ║ FUNCTIONS INHERITED BY ERC20PresetMinterPauserUpgradeable ║\n ╚═══════════════════════════════════════════════════════════════════╝*/\n\n /** \n @notice Mints an amount of Float tokens for an address.\n @dev Can only be called by addresses with a MINTER_ROLE. \n This should correspond to the Staker contract.\n @param to The address for which to mint the tokens for.\n @param amount Amount of synthetic tokens to mint in wei.\n */\n function mint(address to, uint256 amount) external override(IFloatToken) onlyRole(MINTER_ROLE) {\n _mint(to, amount);\n }\n\n /**\n @notice modify token functionality so that a pausing this token doesn't affect minting\n @dev Pause functionality in the open zeppelin ERC20PresetMinterPauserUpgradeable comes from the below function.\n We override it to exclude anyone with the minter role (ie the Staker contract)\n @param from address tokens are being sent from\n @param to address tokens are being sent to\n @param amount amount of tokens being sent\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n require(!paused() || hasRole(MINTER_ROLE, _msgSender()), \"Paused and not minter\");\n\n super._beforeTokenTransfer(from, to, amount);\n }\n\n function pause() external onlyRole(PAUSER_ROLE) {\n _pause();\n }\n\n function unpause() external onlyRole(PAUSER_ROLE) {\n _unpause();\n }\n\n function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {}\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) {\n super._afterTokenTransfer(from, to, amount);\n }\n\n function _mint(address to, uint256 amount)\n internal\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\n {\n super._mint(to, amount);\n }\n\n function _burn(address account, uint256 amount)\n internal\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\n {\n super._burn(account, amount);\n }\n\n function totalSupply()\n public\n view\n virtual\n override(ERC20Upgradeable, IFloatToken)\n returns (uint256)\n {\n return ERC20Upgradeable.totalSupply();\n }\n\n function transfer(address recipient, uint256 amount)\n public\n virtual\n override(ERC20Upgradeable, IFloatToken)\n returns (bool)\n {\n return ERC20Upgradeable.transfer(recipient, amount);\n }\n\n function burnFrom(address account, uint256 amount)\n public\n virtual\n override(ERC20BurnableUpgradeable, IFloatToken)\n {\n // If the burn comes from the treasury, let it happen automatically.\n // This is only for the alpha launch, no need to add these permissions to the main FLT deployment.\n if (msg.sender == treasury) {\n _burn(account, amount);\n } else {\n ERC20BurnableUpgradeable.burnFrom(account, amount);\n }\n }\n}\n" + }, + "contracts/TreasuryAlpha.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\nimport \"./interfaces/IFloatToken.sol\";\nimport \"./interfaces/ILongShort.sol\";\n\nimport \"@openzeppelin/contracts/utils/math/Math.sol\";\n\n/** This contract implementation is purely for the alpha, allowing the burning of FLT tokens\n for a proportional share of the value held in the treasury. In contrast, the beta launch will be\n rely on a more robust governance mechanism to vote on the buying and buring of FLT tokens using\n treasury funds.*/\n\n/** @title Treasury Contract */\ncontract TreasuryAlpha is AccessControlledAndUpgradeable {\n //Using Open Zeppelin safe transfer library for token transfers\n using SafeERC20 for IERC20;\n\n address public paymentToken;\n address public floatToken;\n address public longShort;\n // An aproximation of what the FLT price should be according to the yield at the time.\n uint256 public basePrice;\n bool public redemptionsActivated;\n\n event BasePriceUpdated(uint256 newBasePrice);\n\n function initialize(\n address _admin,\n address _paymentToken,\n address _floatToken,\n address _longShort\n ) external initializer {\n _AccessControlledAndUpgradeable_init(_admin);\n paymentToken = _paymentToken;\n floatToken = _floatToken;\n longShort = _longShort;\n }\n\n function onlyAdminModifierLogic() internal virtual {\n _checkRole(ADMIN_ROLE, msg.sender);\n }\n\n modifier onlyAdmin() {\n onlyAdminModifierLogic();\n _;\n }\n\n modifier redemptionsActive() {\n require(redemptionsActivated, \"redemptions haven't been activated\");\n _;\n }\n\n function _getValueLockedInTreasury() internal view returns (uint256) {\n return IERC20(paymentToken).balanceOf(address(this));\n }\n\n function _getFloatTokenSupply() internal view returns (uint256) {\n return IFloatToken(floatToken).totalSupply();\n }\n\n function updateBasePrice(uint256 newBasePrice) public onlyAdmin {\n // What should the minimum for this value be? 0.2 DAI per token seems reasonable if we are targetting 0.5 DAI as the normal price (and say Aave yield is poor or similar)\n require(newBasePrice > 2e17, \"base price too low\");\n\n basePrice = newBasePrice;\n emit BasePriceUpdated(newBasePrice);\n }\n\n function activateRedemptions() public onlyAdmin {\n redemptionsActivated = true;\n }\n\n function burnFloatForShareOfTreasury(uint256 amountOfFloatToBurn) external redemptionsActive {\n uint256 priceAccordingToTreasuryAndSupply = (_getValueLockedInTreasury() * 1e18) /\n _getFloatTokenSupply();\n // In normal operation the `priceAccordingToTreasuryAndSupply` value will be an over-estimation favouring people who withdraw early. Thus typically the 'basePrice' will be a bit lower to prevent this in typical cases.\n // We take the min of these two values so it is impossible for us to run with the money.\n uint256 priceToUse = Math.min(priceAccordingToTreasuryAndSupply, basePrice);\n\n uint256 amountToRecieve = (priceToUse * amountOfFloatToBurn) / 1e18;\n\n IFloatToken(floatToken).burnFrom(msg.sender, amountOfFloatToBurn); // Can modify the core FLT token if wanted to remove the need for this step. // Currently requires user to approve treasury contract.\n IERC20(paymentToken).safeTransfer(msg.sender, amountToRecieve);\n }\n\n function convertSynthsToPaymentTokenNextPriceLong(uint32 marketIndex, uint256 tokens_redeem)\n external\n {\n ILongShort(longShort).redeemLongNextPrice(marketIndex, tokens_redeem);\n }\n\n function convertSynthsToPaymentTokenNextPriceShort(uint32 marketIndex, uint256 tokens_redeem)\n external\n {\n ILongShort(longShort).redeemShortNextPrice(marketIndex, tokens_redeem);\n }\n}\n" + }, + "contracts/Treasury_v0.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\nimport \"./interfaces/IFloatToken.sol\";\nimport \"./interfaces/ILongShort.sol\";\n\n/** This contract implementation is purely for the alpha, allowing the burning of FLT tokens\n for a proportional share of the value held in the treasury. In contrast, the beta launch will be\n rely on a more robust governance mechanism to vote on the buying and buring of FLT tokens using\n treasury funds.*/\n\n/** @title Treasury Contract */\ncontract Treasury_v0 is AccessControlledAndUpgradeable {\n address public paymentToken;\n address public floatToken;\n address public longShort;\n\n function initialize(\n address _admin,\n address _paymentToken,\n address _floatToken,\n address _longShort\n ) external initializer {\n _AccessControlledAndUpgradeable_init(_admin);\n paymentToken = _paymentToken;\n floatToken = _floatToken;\n longShort = _longShort;\n }\n\n function convertSynthsToPaymentTokenNextPriceLong(uint32 marketIndex, uint256 tokens_redeem)\n external\n {\n ILongShort(longShort).redeemLongNextPrice(marketIndex, tokens_redeem);\n }\n\n function convertSynthsToPaymentTokenNextPriceShort(uint32 marketIndex, uint256 tokens_redeem)\n external\n {\n ILongShort(longShort).redeemShortNextPrice(marketIndex, tokens_redeem);\n }\n}\n" + }, + "contracts/SyntheticToken.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./interfaces/IStaker.sol\";\nimport \"./interfaces/ILongShort.sol\";\nimport \"./interfaces/ISyntheticToken.sol\";\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\";\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol\";\n\n/**\n@title SyntheticToken\n@notice An ERC20 token that tracks or inversely tracks the price of an\n underlying asset with floating exposure.\n@dev Logic for price tracking contained in LongShort.sol. \n The contract inherits from ERC20PresetMinterPauser.sol\n*/\ncontract SyntheticToken is ISyntheticToken, ERC20, ERC20Burnable, AccessControl, ERC20Permit {\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n\n /// @notice Address of the LongShort contract, a deployed LongShort.sol\n address public immutable longShort;\n /// @notice Address of the Staker contract, a deployed Staker.sol\n address public immutable staker;\n /// @notice Identifies which market in longShort the token is for.\n uint32 public immutable marketIndex;\n /// @notice Whether the token is a long token or short token for its market.\n bool public immutable isLong;\n\n /// @notice Creates an instance of the contract.\n /// @dev Should only be called by TokenFactory.sol for our system.\n /// @param name The name of the token.\n /// @param symbol The symbol for the token.\n /// @param _longShort Address of the core LongShort contract.\n /// @param _staker Address of the staker contract.\n /// @param _marketIndex Which market the token is for.\n /// @param _isLong Whether the token is long or short for its market.\n constructor(\n string memory name,\n string memory symbol,\n address _longShort,\n address _staker,\n uint32 _marketIndex,\n bool _isLong\n ) ERC20(name, symbol) ERC20Permit(name) {\n longShort = _longShort;\n staker = _staker;\n marketIndex = _marketIndex;\n isLong = _isLong;\n\n _setupRole(DEFAULT_ADMIN_ROLE, _longShort);\n _setupRole(MINTER_ROLE, _longShort);\n }\n\n /// @notice Allows users to stake their synthetic tokens to earn Float.\n /// @dev Core staking logic contained in Staker.sol\n /// @param amount Amount to stake in wei.\n function stake(uint256 amount) external override {\n // NOTE: this is safe, this function will throw \"ERC20: transfer\n // amount exceeds balance\" if amount exceeds users balance.\n super._transfer(msg.sender, address(staker), amount);\n\n IStaker(staker).stakeFromUser(msg.sender, amount);\n }\n\n /*╔══════════════════════════════════════════════════════╗\n ║ FUNCTIONS INHERITED BY ERC20PresetMinterPauser ║\n ╚══════════════════════════════════════════════════════╝*/\n\n function totalSupply() public view virtual override(ERC20, ISyntheticToken) returns (uint256) {\n return ERC20.totalSupply();\n }\n\n /** \n @notice Mints a number of synthetic tokens for an address.\n @dev Can only be called by addresses with a minter role. \n This should correspond to the Long Short contract.\n @param to The address for which to mint the tokens for.\n @param amount Amount of synthetic tokens to mint in wei.\n */\n function mint(address to, uint256 amount) external override onlyRole(MINTER_ROLE) {\n _mint(to, amount);\n }\n\n /// @notice Burns or destroys a number of held synthetic tokens for an address.\n /// @dev Modified to only allow Long Short to burn tokens on redeem.\n /// @param amount The amount of tokens to burn in wei.\n function burn(uint256 amount) public override(ERC20Burnable, ISyntheticToken) {\n require(msg.sender == longShort, \"Only LongShort contract\");\n super._burn(_msgSender(), amount);\n }\n\n /** \n @notice Overrides the default ERC20 transferFrom.\n @dev To allow users to avoid approving LongShort when redeeming tokens,\n longShort has a virtual infinite allowance.\n @param sender User for which to transfer tokens.\n @param recipient Recipient of the transferred tokens.\n @param amount Amount of tokens to transfer in wei.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override(ERC20, ISyntheticToken) returns (bool) {\n if (recipient == longShort && msg.sender == longShort) {\n // If it to longShort and msg.sender is longShort don't perform additional transfer checks.\n ERC20._transfer(sender, recipient, amount);\n return true;\n } else {\n return ERC20.transferFrom(sender, recipient, amount);\n }\n }\n\n function transfer(address recipient, uint256 amount)\n public\n virtual\n override(ERC20, ISyntheticToken)\n returns (bool)\n {\n return ERC20.transfer(recipient, amount);\n }\n\n /** \n @notice Overrides the OpenZeppelin _beforeTokenTransfer hook\n @dev Ensures that this contract's accounting reflects all the senders's outstanding\n tokens from next price actions before any token transfer occurs.\n Removal of pausing functionality of ERC20PresetMinterPausable is intentional.\n @param sender User for which tokens are to be transferred for.\n */\n function _beforeTokenTransfer(\n address sender,\n address to,\n uint256 amount\n ) internal override {\n if (sender != longShort) {\n ILongShort(longShort).executeOutstandingNextPriceSettlementsUser(sender, marketIndex);\n }\n super._beforeTokenTransfer(sender, to, amount);\n }\n\n /** \n @notice Gets the synthetic token balance of the user in wei.\n @dev To automatically account for next price actions which have been confirmed but not settled,\n includes any outstanding tokens owed by longShort.\n @param account The address for which to get the balance of.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return\n ERC20.balanceOf(account) +\n ILongShort(longShort).getUsersConfirmedButNotSettledSynthBalance(\n account,\n marketIndex,\n isLong\n );\n }\n}\n" + }, + "contracts/TokenFactory.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./SyntheticToken.sol\";\nimport \"./interfaces/ITokenFactory.sol\";\n\n/// @title TokenFactory\n/// @notice contract is used to reliably mint the synthetic tokens used by the float protocol.\ncontract TokenFactory is ITokenFactory {\n /*╔═══════════════════════════╗\n ║ STATE ║\n ╚═══════════════════════════╝*/\n\n /// @notice address of long short contract\n address public immutable longShort;\n\n /*╔═══════════════════════════╗\n ║ MODIFIERS ║\n ╚═══════════════════════════╝*/\n\n /// @dev only allow longShort contract to call this function\n modifier onlyLongShort() {\n require(msg.sender == address(longShort));\n _;\n }\n\n /*╔════════════════════════════╗\n ║ SET-UP ║\n ╚════════════════════════════╝*/\n\n /// @notice sets the address of the longShort contract on initialization\n /// @param _longShort address of the longShort contract\n constructor(address _longShort) {\n longShort = _longShort;\n }\n\n /*╔════════════════════════════╗\n ║ TOKEN CREATION ║\n ╚════════════════════════════╝*/\n\n /// @notice creates and sets up a new synthetic token\n /// @param syntheticName name of the synthetic token\n /// @param syntheticSymbol ticker symbol of the synthetic token\n /// @param staker address of the staker contract\n /// @param marketIndex market index this synthetic token belongs to\n /// @param isLong boolean denoting if the synthetic token is long or short\n /// @return syntheticToken - address of the created synthetic token\n function createSyntheticToken(\n string calldata syntheticName,\n string calldata syntheticSymbol,\n address staker,\n uint32 marketIndex,\n bool isLong\n ) external override onlyLongShort returns (address syntheticToken) {\n syntheticToken = address(\n new SyntheticToken(syntheticName, syntheticSymbol, longShort, staker, marketIndex, isLong)\n );\n }\n}\n" + }, + "contracts/mocks/ERC20Mock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\";\n\ncontract ERC20Mock is ERC20PresetMinterPauser {\n constructor(string memory name, string memory symbol) ERC20PresetMinterPauser(name, symbol) {}\n\n event TransferCalled(address sender, address recipient, uint256 amount);\n\n bool shouldMockTransfer = true;\n\n function setShouldMockTransfer(bool _value) public {\n shouldMockTransfer = _value;\n }\n\n function transfer(address recipient, uint256 amount) public override returns (bool) {\n emit TransferCalled(_msgSender(), recipient, amount);\n if (shouldMockTransfer) {\n return true;\n } else {\n return super.transfer(recipient, amount);\n }\n }\n}\n" + }, + "contracts/mocks/AaveIncentivesControllerMock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\";\nimport \"../interfaces/aave/IAaveIncentivesController.sol\";\n\ncontract AaveIncentivesControllerMock is IAaveIncentivesController {\n function claimRewards(\n address[] calldata assets,\n uint256 amount,\n address to\n ) external override returns (uint256 amountToClaim) {}\n\n function getUserUnclaimedRewards(address user)\n external\n view\n override\n returns (uint256 usersUnclaimedRewards)\n {}\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.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 _upgradeToAndCallSecure(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n address oldImplementation = _getImplementation();\n\n // Initial upgrade and setup call\n _setImplementation(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n\n // Perform rollback test if not already in progress\n StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\n if (!rollbackTesting.value) {\n // Trigger rollback using upgradeTo from the new implementation\n rollbackTesting.value = true;\n Address.functionDelegateCall(\n newImplementation,\n abi.encodeWithSignature(\"upgradeTo(address)\", oldImplementation)\n );\n rollbackTesting.value = false;\n // Check rollback was effective\n require(oldImplementation == _getImplementation(), \"ERC1967Upgrade: upgrade breaks further upgrades\");\n // Finally reset to the new implementation and log the upgrade\n _upgradeTo(newImplementation);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\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" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\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" + }, + "@openzeppelin/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\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 internall 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" + }, + "contracts/deployment/UUPSProxy.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\";\n\n// Kept for backwards compatibility with older versions of Hardhat and Truffle plugins.\ncontract UUPSProxy is ERC1967Proxy {\n constructor(\n address _logic,\n address, // This is completely unused by the uups proxy, required to remain compatible with hardhat deploy: https://github.com/wighawag/hardhat-deploy/issues/146\n bytes memory _data\n ) payable ERC1967Proxy(_logic, _data) {}\n}\n" + }, + "contracts/mocks/OracleManagerMock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"../interfaces/IOracleManager.sol\";\n\n/*\n * Mock implementation of an OracleManager with fixed, changeable prices.\n */\ncontract OracleManagerMock is IOracleManager {\n // Admin contract.\n address public admin;\n\n // Global state.\n int256 currentPrice; // e18\n\n ////////////////////////////////////\n /////////// MODIFIERS //////////////\n ////////////////////////////////////\n\n modifier adminOnly() {\n require(msg.sender == admin, \"Not admin\");\n _;\n }\n\n ////////////////////////////////////\n ///// CONTRACT SET-UP //////////////\n ////////////////////////////////////\n\n constructor(address _admin) {\n admin = _admin;\n\n // Default to a price of 1.\n currentPrice = 1e18;\n }\n\n ////////////////////////////////////\n ///// IMPLEMENTATION ///////////////\n ////////////////////////////////////\n\n function setPrice(int256 newPrice) public adminOnly {\n currentPrice = newPrice;\n }\n\n function updatePrice() external override returns (int256) {\n return currentPrice;\n }\n\n function getLatestPrice() external view override returns (int256) {\n return currentPrice;\n }\n}\n" + }, + "contracts/mocks/LendingPoolAddressesProvider.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"../interfaces/aave/ILendingPoolAddressesProvider.sol\";\n\ncontract LendingPoolAddressesProviderMock is ILendingPoolAddressesProvider {\n address public lendingPool;\n\n function setLendingPool(address _lendingPool) external {\n lendingPool = _lendingPool;\n }\n\n function getLendingPool() external view override returns (address) {\n return lendingPool;\n }\n}\n" + }, + "contracts/FloatCapital_v0.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.3;\n\nimport \"./abstract/AccessControlledAndUpgradeable.sol\";\n\n/** @title Float Capital Contract */\ncontract FloatCapital_v0 is AccessControlledAndUpgradeable {\n /*╔═════════════════════════════╗\n ║ CONTRACT SETUP ║\n ╚═════════════════════════════╝*/\n\n function initialize(address _admin) external initializer {\n _AccessControlledAndUpgradeable_init(_admin);\n }\n\n /** A percentage of float token to accrue here for project\n development */\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "devdoc", + "userdoc" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/generatedDataForModels/balancedStart.txt b/generatedDataForModels/balancedStart.txt new file mode 100644 index 0000000..85f234c --- /dev/null +++ b/generatedDataForModels/balancedStart.txt @@ -0,0 +1,251 @@ + +1.0,197.999999999999999969,2.000000000000000031 +2.0,195.999999999999999939,4.000000000000000061 +3.0,193.999999999999999913,6.000000000000000087 +4.0,191.999999999999999884,8.000000000000000116 +5.0,189.999999999999999856,10.000000000000000144 +6.0,187.999999999999999837,12.000000000000000163 +7.0,185.999999999999999813,14.000000000000000187 +8.0,183.999999999999999787,16.000000000000000213 +9.0,181.999999999999999763,18.000000000000000237 +10.0,179.999999999999999737,20.000000000000000263 +11.0,177.999999999999999713,22.000000000000000287 +12.0,175.999999999999999696,24.000000000000000304 +13.0,173.999999999999999673,26.000000000000000327 +14.0,171.999999999999999666,28.000000000000000334 +15.0,169.999999999999999664,30.000000000000000336 +16.0,167.999999999999999642,32.000000000000000358 +17.0,165.999999999999999652,34.000000000000000348 +18.0,163.999999999999999653,36.000000000000000347 +19.0,161.999999999999999636,38.000000000000000364 +20.0,159.999999999999999617,40.000000000000000383 +21.0,157.9999999999999996,42.0000000000000004 +22.0,155.999999999999999607,44.000000000000000393 +23.0,153.999999999999999609,46.000000000000000391 +24.0,151.999999999999999626,48.000000000000000374 +25.0,149.999999999999999611,50.000000000000000389 +26.0,147.999999999999999625,52.000000000000000375 +27.0,145.999999999999999613,54.000000000000000387 +28.0,143.999999999999999616,56.000000000000000384 +29.0,141.999999999999999613,58.000000000000000387 +30.0,139.999999999999999621,60.000000000000000379 +31.0,137.999999999999999625,62.000000000000000375 +32.0,135.999999999999999613,64.000000000000000387 +33.0,133.999999999999999604,66.000000000000000396 +34.0,131.999999999999999658,68.000000000000000342 +35.0,129.999999999999999679,70.000000000000000321 +36.0,127.999999999999999728,72.000000000000000272 +37.0,125.999999999999999723,74.000000000000000277 +38.0,123.999999999999999757,76.000000000000000243 +39.0,121.999999999999999753,78.000000000000000247 +40.0,119.999999999999999747,80.000000000000000253 +41.0,117.999999999999999774,82.000000000000000226 +42.0,115.999999999999999814,84.000000000000000186 +43.0,113.999999999999999818,86.000000000000000182 +44.0,111.999999999999999839,88.000000000000000161 +45.0,109.999999999999999856,90.000000000000000144 +46.0,107.999999999999999919,92.000000000000000081 +47.0,105.999999999999999924,94.000000000000000076 +48.0,103.999999999999999956,96.000000000000000044 +49.0,102.0,98.0 +50.0,100.0,100.0 +51.0,98.0,102.0 +52.0,96.078431372549019702,103.921568627450980298 +53.0,94.230769230769230936,105.769230769230769064 +54.0,92.452830188679245522,107.547169811320754478 +55.0,90.740740740740741024,109.259259259259258976 +56.0,89.090909090909091262,110.909090909090908738 +57.0,87.50000000000000036,112.49999999999999964 +58.0,85.964912280701754742,114.035087719298245258 +59.0,84.482758620689655573,115.517241379310344427 +60.0,83.050847457627119068,116.949152542372880932 +61.0,81.666666666666667139,118.333333333333332861 +62.0,80.327868852459016913,119.672131147540983087 +63.0,79.032258064516129554,120.967741935483870446 +64.0,77.777777777777778293,122.222222222222221707 +65.0,76.562500000000000508,123.437499999999999492 +66.0,75.384615384615385163,124.615384615384614837 +67.0,74.242424242424243003,125.757575757575756997 +68.0,73.13432835820895581,126.86567164179104419 +69.0,72.058823529411765318,127.941176470588234682 +70.0,71.014492753623189067,128.985507246376810933 +71.0,70.000000000000000703,129.999999999999999297 +72.0,69.014084507042254224,130.985915492957745776 +73.0,68.055555555555556311,131.944444444444443689 +74.0,67.123287671232877483,132.876712328767122517 +75.0,66.216216216216217011,133.783783783783782989 +76.0,65.33333333333333414,134.66666666666666586 +77.0,64.473684210526316603,135.526315789473683397 +78.0,63.636363636363637168,136.363636363636362832 +79.0,62.82051282051282134,137.17948717948717866 +80.0,62.025316455696203401,137.974683544303796599 +81.0,61.250000000000000859,138.749999999999999141 +82.0,60.49382716049382801,139.50617283950617199 +83.0,59.756097560975610608,140.243902439024389392 +84.0,59.036144578313253875,140.963855421686746125 +85.0,58.333333333333334231,141.666666666666665769 +86.0,57.647058823529412663,142.352941176470587337 +87.0,56.976744186046512519,143.023255813953487481 +88.0,56.321839080459771019,143.678160919540228981 +89.0,55.681818181818182748,144.318181818181817252 +90.0,55.056179775280899812,144.943820224719100188 +91.0,54.444444444444445376,145.555555555555554624 +92.0,53.846153846153847076,146.153846153846152924 +93.0,53.260869565217392236,146.739130434782607764 +94.0,52.68817204301075365,147.31182795698924635 +95.0,52.127659574468086087,147.872340425531913913 +96.0,51.578947368421053613,148.421052631578946387 +97.0,51.041666666666667673,148.958333333333332327 +98.0,50.515463917525774239,149.484536082474225761 +99.0,50.000000000000001044,149.999999999999998956 +100.0,49.494949494949495984,150.505050505050504016 +101.0,49.000000000000001025,150.999999999999998975 +102.0,48.514851485148515915,151.485148514851484085 +103.0,48.039215686274510905,151.960784313725489095 +104.0,47.572815533980583659,152.427184466019416341 +105.0,47.115384615384616527,152.884615384615383473 +106.0,46.666666666666667837,153.333333333333332163 +107.0,46.22641509433962382,153.77358490566037618 +108.0,45.794392523364487172,154.205607476635512828 +109.0,45.370370370370371562,154.629629629629628438 +110.0,44.954128440366973685,155.045871559633026315 +111.0,44.545454545454546693,155.454545454545453307 +112.0,44.144144144144145372,155.855855855855854628 +113.0,43.750000000000001243,156.249999999999998757 +114.0,43.362831858407080914,156.637168141592919086 +115.0,42.982456140350878472,157.017543859649121528 +116.0,42.608695652173914332,157.391304347826085668 +117.0,42.241379310344828898,157.758620689655171102 +118.0,41.880341880341881643,158.119658119658118357 +119.0,41.525423728813560641,158.474576271186439359 +120.0,41.176470588235295431,158.823529411764704569 +121.0,40.83333333333333465,159.16666666666666535 +122.0,40.495867768595042644,159.504132231404957356 +123.0,40.163934426229509542,159.836065573770490458 +124.0,39.837398373983741177,160.162601626016258823 +125.0,39.516129032258065848,160.483870967741934152 +126.0,39.200000000000001322,160.799999999999998678 +127.0,38.888888888888890221,161.111111111111109779 +128.0,38.582677165354332033,161.417322834645667967 +129.0,38.281250000000001314,161.718749999999998686 +130.0,37.984496124031009057,162.015503875968990943 +131.0,37.692307692307693615,162.307692307692306385 +132.0,37.40458015267175706,162.59541984732824294 +133.0,37.121212121212122566,162.878787878787877434 +134.0,36.842105263157896081,163.157894736842103919 +135.0,36.56716417910447895,163.43283582089552105 +136.0,36.29629629629629764,163.70370370370370236 +137.0,36.029411764705883696,163.970588235294116304 +138.0,35.766423357664234937,164.233576642335765063 +139.0,35.507246376811595586,164.492753623188404414 +140.0,35.251798561151080537,164.748201438848919463 +141.0,35.000000000000001421,164.999999999999998579 +142.0,34.751773049645391506,165.248226950354608494 +143.0,34.507042253521128206,165.492957746478871794 +144.0,34.26573426573426717,165.73426573426573283 +145.0,34.027777777777779219,165.972222222222220781 +146.0,33.793103448275863502,166.206896551724136498 +147.0,33.561643835616439803,166.438356164383560197 +148.0,33.333333333333334776,166.666666666666665224 +149.0,33.108108108108109567,166.891891891891890433 +150.0,32.885906040268457837,167.114093959731542163 +151.0,32.666666666666668141,167.333333333333331859 +152.0,32.450331125827816058,167.549668874172183942 +153.0,32.236842105263159394,167.763157894736840606 +154.0,32.026143790849674714,167.973856209150325286 +155.0,31.8181818181818197,168.1818181818181803 +156.0,31.612903225806453136,168.387096774193546864 +157.0,31.410256410256411778,168.589743589743588222 +158.0,31.210191082802549305,168.789808917197450695 +159.0,31.012658227848102819,168.987341772151897181 +160.0,30.817610062893083334,169.182389937106916666 +161.0,30.625000000000001564,169.374999999999998436 +162.0,30.434782608695653744,169.565217391304346256 +163.0,30.246913580246915157,169.753086419753084843 +164.0,30.061349693251535317,169.938650306748464683 +165.0,29.878048780487806447,170.121951219512193553 +166.0,29.696969696969698548,170.303030303030301452 +167.0,29.518072289156628095,170.481927710843371905 +168.0,29.341317365269462669,170.658682634730537331 +169.0,29.16666666666666826,170.83333333333333174 +170.0,28.994082840236687989,171.005917159763312011 +171.0,28.823529411764707489,171.176470588235292511 +172.0,28.654970760233919727,171.345029239766080273 +173.0,28.488372093023257404,171.511627906976742596 +174.0,28.323699421965319516,171.676300578034680484 +175.0,28.160919540229886651,171.839080459770113349 +176.0,28.000000000000001593,171.999999999999998407 +177.0,27.840909090909092516,172.159090909090907484 +178.0,27.683615819209041168,172.316384180790958832 +179.0,27.528089887640451067,172.471910112359548933 +180.0,27.374301675977655271,172.625698324022344729 +181.0,27.222222222222223869,172.777777777777776131 +182.0,27.071823204419891159,172.928176795580108841 +183.0,26.923076923076924738,173.076923076923075262 +184.0,26.775956284153007141,173.224043715846992859 +185.0,26.630434782608697325,173.369565217391302675 +186.0,26.486486486486488162,173.513513513513511838 +187.0,26.344086021505378021,173.655913978494621979 +188.0,26.203208556149734303,173.796791443850265697 +189.0,26.063829787234044247,173.936170212765955753 +190.0,25.925925925925927611,174.074074074074072389 +191.0,25.789473684210527995,174.210526315789472005 +192.0,25.654450261780106401,174.345549738219893599 +193.0,25.520833333333335023,174.479166666666664977 +194.0,25.388601036269431742,174.611398963730568258 +195.0,25.257731958762888304,174.742268041237111696 +196.0,25.128205128205129908,174.871794871794870092 +197.0,25.00000000000000171,174.99999999999999829 +198.0,24.873096446700509327,175.126903553299490673 +199.0,24.747474747474749192,175.252525252525250808 +200.0,24.623115577889448958,175.376884422110551042 +201.0,24.500000000000001714,175.499999999999998286 +202.0,24.378109452736320132,175.621890547263679868 +203.0,24.257425742574259154,175.742574257425740846 +204.0,24.137931034482760352,175.862068965517239648 +205.0,24.019607843137256637,175.980392156862743363 +206.0,23.902439024390245651,176.097560975609754349 +207.0,23.786407766990293025,176.213592233009706975 +208.0,23.671497584541064563,176.328502415458935437 +209.0,23.557692307692309462,176.442307692307690538 +210.0,23.444976076555025685,176.555023923444974315 +211.0,23.333333333333335108,176.666666666666664892 +212.0,23.22274881516587855,176.77725118483412145 +213.0,23.113207547169813102,176.886792452830186898 +214.0,23.004694835680752963,176.995305164319247037 +215.0,22.897196261682244778,177.102803738317755222 +216.0,22.79069767441860644,177.20930232558139356 +217.0,22.685185185185186981,177.314814814814813019 +218.0,22.58064516129032437,177.41935483870967563 +219.0,22.477064220183488027,177.522935779816511973 +220.0,22.374429223744294029,177.625570776255705971 +221.0,22.272727272727274521,177.727272727272725479 +222.0,22.171945701357467856,177.828054298642532144 +223.0,22.072072072072073868,177.927927927927926132 +224.0,21.973094170403589233,178.026905829596410767 +225.0,21.875000000000001788,178.124999999999998212 +226.0,21.777777777777779568,178.222222222222220432 +227.0,21.681415929203541625,178.318584070796458375 +228.0,21.585903083700442341,178.414096916299557659 +229.0,21.491228070175440418,178.508771929824559582 +230.0,21.39737991266375729,178.60262008733624271 +231.0,21.304347826086958362,178.695652173913041638 +232.0,21.212121212121213954,178.787878787878786046 +233.0,21.120689655172415638,178.879310344827584362 +234.0,21.030042918454937476,178.969957081545062524 +235.0,20.940170940170942028,179.059829059829057972 +236.0,20.851063829787235897,179.148936170212764103 +237.0,20.762711864406781515,179.237288135593218485 +238.0,20.675105485232069377,179.324894514767930623 +239.0,20.58823529411764893,179.41176470588235107 +240.0,20.502092050209206902,179.497907949790793098 +241.0,20.416666666666668554,179.583333333333331446 +242.0,20.331950207468881565,179.668049792531118435 +243.0,20.247933884297522565,179.752066115702477435 +244.0,20.164609053497944297,179.835390946502055703 +245.0,20.08196721311475602,179.91803278688524398 +246.0,20.000000000000001924,179.999999999999998076 +247.0,19.918699186991871837,180.081300813008128163 +248.0,19.838056680161945231,180.161943319838054769 +249.0,19.758064516129034163,180.241935483870965837 +250.0,19.678714859437752911,180.321285140562247089 \ No newline at end of file diff --git a/generatedDataForModels/imbalancedLong.txt b/generatedDataForModels/imbalancedLong.txt new file mode 100644 index 0000000..20736ed --- /dev/null +++ b/generatedDataForModels/imbalancedLong.txt @@ -0,0 +1,251 @@ + +1.0,295.454545454545454478,4.545454545454545522 +2.0,290.909090909090908956,9.090909090909091044 +3.0,286.363636363636363441,13.636363636363636559 +4.0,281.818181818181817922,18.181818181818182078 +5.0,277.272727272727272403,22.727272727272727597 +6.0,272.727272727272726906,27.272727272727273094 +7.0,268.181818181818181396,31.818181818181818604 +8.0,263.636363636363635882,36.363636363636364118 +9.0,259.090909090909090373,40.909090909090909627 +10.0,254.545454545454544859,45.454545454545455141 +11.0,249.999999999999999351,50.000000000000000649 +12.0,245.454545454545453858,54.545454545454546142 +13.0,240.909090909090908352,59.090909090909091648 +14.0,236.36363636363636288,63.63636363636363712 +15.0,231.818181818181817421,68.181818181818182579 +16.0,227.272727272727271916,72.727272727272728084 +17.0,222.727272727272726484,77.272727272727273516 +18.0,218.181818181818181032,81.818181818181818968 +19.0,213.636363636363635539,86.363636363636364461 +20.0,209.090909090909090042,90.909090909090909958 +21.0,204.545454545454544549,95.454545454545455451 +22.0,199.999999999999999109,100.000000000000000891 +23.0,195.454545454545453657,104.545454545454546343 +24.0,190.90909090909090824,109.09090909090909176 +25.0,186.363636363636362751,113.636363636363637249 +26.0,181.818181818181817328,118.181818181818182672 +27.0,177.272727272727271846,122.727272727272728154 +28.0,172.727272727272726397,127.272727272727273603 +29.0,168.181818181818180935,131.818181818181819065 +30.0,163.636363636363635498,136.363636363636364502 +31.0,159.090909090909090053,140.909090909090909947 +32.0,154.545454545454544571,145.454545454545455429 +33.0,149.999999999999999147,150.000000000000000853 +34.0,145.714285714285713591,154.285714285714286409 +35.0,141.666666666666666051,158.333333333333333949 +36.0,137.837837837837837344,162.162162162162162656 +37.0,134.210526315789473207,165.789473684210526793 +38.0,130.769230769230768833,169.230769230769231167 +39.0,127.499999999999999616,172.500000000000000384 +40.0,124.390243902439024016,175.609756097560975984 +41.0,121.428571428571428253,178.571428571428571747 +42.0,118.604651162790697425,181.395348837209302575 +43.0,115.909090909090908858,184.090909090909091142 +44.0,113.333333333333333136,186.666666666666666864 +45.0,110.869565217391304179,189.130434782608695821 +46.0,108.510638297872340335,191.489361702127659665 +47.0,106.249999999999999918,193.750000000000000082 +48.0,104.081632653061224444,195.918367346938775556 +49.0,102.0,198.0 +50.0,100.0,200.0 +51.0,98.0,202.0 +52.0,96.078431372549019702,203.921568627450980298 +53.0,94.230769230769230936,205.769230769230769064 +54.0,92.452830188679245522,207.547169811320754478 +55.0,90.740740740740741024,209.259259259259258976 +56.0,89.090909090909091262,210.909090909090908738 +57.0,87.50000000000000036,212.49999999999999964 +58.0,85.964912280701754742,214.035087719298245258 +59.0,84.482758620689655573,215.517241379310344427 +60.0,83.050847457627119068,216.949152542372880932 +61.0,81.666666666666667139,218.333333333333332861 +62.0,80.327868852459016913,219.672131147540983087 +63.0,79.032258064516129554,220.967741935483870446 +64.0,77.777777777777778293,222.222222222222221707 +65.0,76.562500000000000508,223.437499999999999492 +66.0,75.384615384615385163,224.615384615384614837 +67.0,74.242424242424243003,225.757575757575756997 +68.0,73.13432835820895581,226.86567164179104419 +69.0,72.058823529411765318,227.941176470588234682 +70.0,71.014492753623189067,228.985507246376810933 +71.0,70.000000000000000703,229.999999999999999297 +72.0,69.014084507042254224,230.985915492957745776 +73.0,68.055555555555556311,231.944444444444443689 +74.0,67.123287671232877483,232.876712328767122517 +75.0,66.216216216216217011,233.783783783783782989 +76.0,65.33333333333333414,234.66666666666666586 +77.0,64.473684210526316603,235.526315789473683397 +78.0,63.636363636363637168,236.363636363636362832 +79.0,62.82051282051282134,237.17948717948717866 +80.0,62.025316455696203401,237.974683544303796599 +81.0,61.250000000000000859,238.749999999999999141 +82.0,60.49382716049382801,239.50617283950617199 +83.0,59.756097560975610608,240.243902439024389392 +84.0,59.036144578313253875,240.963855421686746125 +85.0,58.333333333333334231,241.666666666666665769 +86.0,57.647058823529412663,242.352941176470587337 +87.0,56.976744186046512519,243.023255813953487481 +88.0,56.321839080459771019,243.678160919540228981 +89.0,55.681818181818182748,244.318181818181817252 +90.0,55.056179775280899812,244.943820224719100188 +91.0,54.444444444444445376,245.555555555555554624 +92.0,53.846153846153847076,246.153846153846152924 +93.0,53.260869565217392236,246.739130434782607764 +94.0,52.68817204301075365,247.31182795698924635 +95.0,52.127659574468086087,247.872340425531913913 +96.0,51.578947368421053613,248.421052631578946387 +97.0,51.041666666666667673,248.958333333333332327 +98.0,50.515463917525774239,249.484536082474225761 +99.0,50.000000000000001044,249.999999999999998956 +100.0,49.494949494949495984,250.505050505050504016 +101.0,49.000000000000001025,250.999999999999998975 +102.0,48.514851485148515915,251.485148514851484085 +103.0,48.039215686274510905,251.960784313725489095 +104.0,47.572815533980583659,252.427184466019416341 +105.0,47.115384615384616527,252.884615384615383473 +106.0,46.666666666666667837,253.333333333333332163 +107.0,46.22641509433962382,253.77358490566037618 +108.0,45.794392523364487172,254.205607476635512828 +109.0,45.370370370370371562,254.629629629629628438 +110.0,44.954128440366973685,255.045871559633026315 +111.0,44.545454545454546693,255.454545454545453307 +112.0,44.144144144144145372,255.855855855855854628 +113.0,43.750000000000001243,256.249999999999998757 +114.0,43.362831858407080914,256.637168141592919086 +115.0,42.982456140350878472,257.017543859649121528 +116.0,42.608695652173914332,257.391304347826085668 +117.0,42.241379310344828898,257.758620689655171102 +118.0,41.880341880341881643,258.119658119658118357 +119.0,41.525423728813560641,258.474576271186439359 +120.0,41.176470588235295431,258.823529411764704569 +121.0,40.83333333333333465,259.16666666666666535 +122.0,40.495867768595042644,259.504132231404957356 +123.0,40.163934426229509542,259.836065573770490458 +124.0,39.837398373983741177,260.162601626016258823 +125.0,39.516129032258065848,260.483870967741934152 +126.0,39.200000000000001322,260.799999999999998678 +127.0,38.888888888888890221,261.111111111111109779 +128.0,38.582677165354332033,261.417322834645667967 +129.0,38.281250000000001314,261.718749999999998686 +130.0,37.984496124031009057,262.015503875968990943 +131.0,37.692307692307693615,262.307692307692306385 +132.0,37.40458015267175706,262.59541984732824294 +133.0,37.121212121212122566,262.878787878787877434 +134.0,36.842105263157896081,263.157894736842103919 +135.0,36.56716417910447895,263.43283582089552105 +136.0,36.29629629629629764,263.70370370370370236 +137.0,36.029411764705883696,263.970588235294116304 +138.0,35.766423357664234937,264.233576642335765063 +139.0,35.507246376811595586,264.492753623188404414 +140.0,35.251798561151080537,264.748201438848919463 +141.0,35.000000000000001421,264.999999999999998579 +142.0,34.751773049645391506,265.248226950354608494 +143.0,34.507042253521128206,265.492957746478871794 +144.0,34.26573426573426717,265.73426573426573283 +145.0,34.027777777777779219,265.972222222222220781 +146.0,33.793103448275863502,266.206896551724136498 +147.0,33.561643835616439803,266.438356164383560197 +148.0,33.333333333333334776,266.666666666666665224 +149.0,33.108108108108109567,266.891891891891890433 +150.0,32.885906040268457837,267.114093959731542163 +151.0,32.666666666666668141,267.333333333333331859 +152.0,32.450331125827816058,267.549668874172183942 +153.0,32.236842105263159394,267.763157894736840606 +154.0,32.026143790849674714,267.973856209150325286 +155.0,31.8181818181818197,268.1818181818181803 +156.0,31.612903225806453136,268.387096774193546864 +157.0,31.410256410256411778,268.589743589743588222 +158.0,31.210191082802549305,268.789808917197450695 +159.0,31.012658227848102819,268.987341772151897181 +160.0,30.817610062893083334,269.182389937106916666 +161.0,30.625000000000001564,269.374999999999998436 +162.0,30.434782608695653744,269.565217391304346256 +163.0,30.246913580246915157,269.753086419753084843 +164.0,30.061349693251535317,269.938650306748464683 +165.0,29.878048780487806447,270.121951219512193553 +166.0,29.696969696969698548,270.303030303030301452 +167.0,29.518072289156628095,270.481927710843371905 +168.0,29.341317365269462669,270.658682634730537331 +169.0,29.16666666666666826,270.83333333333333174 +170.0,28.994082840236687989,271.005917159763312011 +171.0,28.823529411764707489,271.176470588235292511 +172.0,28.654970760233919727,271.345029239766080273 +173.0,28.488372093023257404,271.511627906976742596 +174.0,28.323699421965319516,271.676300578034680484 +175.0,28.160919540229886651,271.839080459770113349 +176.0,28.000000000000001593,271.999999999999998407 +177.0,27.840909090909092516,272.159090909090907484 +178.0,27.683615819209041168,272.316384180790958832 +179.0,27.528089887640451067,272.471910112359548933 +180.0,27.374301675977655271,272.625698324022344729 +181.0,27.222222222222223869,272.777777777777776131 +182.0,27.071823204419891159,272.928176795580108841 +183.0,26.923076923076924738,273.076923076923075262 +184.0,26.775956284153007141,273.224043715846992859 +185.0,26.630434782608697325,273.369565217391302675 +186.0,26.486486486486488162,273.513513513513511838 +187.0,26.344086021505378021,273.655913978494621979 +188.0,26.203208556149734303,273.796791443850265697 +189.0,26.063829787234044247,273.936170212765955753 +190.0,25.925925925925927611,274.074074074074072389 +191.0,25.789473684210527995,274.210526315789472005 +192.0,25.654450261780106401,274.345549738219893599 +193.0,25.520833333333335023,274.479166666666664977 +194.0,25.388601036269431742,274.611398963730568258 +195.0,25.257731958762888304,274.742268041237111696 +196.0,25.128205128205129908,274.871794871794870092 +197.0,25.00000000000000171,274.99999999999999829 +198.0,24.873096446700509327,275.126903553299490673 +199.0,24.747474747474749192,275.252525252525250808 +200.0,24.623115577889448958,275.376884422110551042 +201.0,24.500000000000001714,275.499999999999998286 +202.0,24.378109452736320132,275.621890547263679868 +203.0,24.257425742574259154,275.742574257425740846 +204.0,24.137931034482760352,275.862068965517239648 +205.0,24.019607843137256637,275.980392156862743363 +206.0,23.902439024390245651,276.097560975609754349 +207.0,23.786407766990293025,276.213592233009706975 +208.0,23.671497584541064563,276.328502415458935437 +209.0,23.557692307692309462,276.442307692307690538 +210.0,23.444976076555025685,276.555023923444974315 +211.0,23.333333333333335108,276.666666666666664892 +212.0,23.22274881516587855,276.77725118483412145 +213.0,23.113207547169813102,276.886792452830186898 +214.0,23.004694835680752963,276.995305164319247037 +215.0,22.897196261682244778,277.102803738317755222 +216.0,22.79069767441860644,277.20930232558139356 +217.0,22.685185185185186981,277.314814814814813019 +218.0,22.58064516129032437,277.41935483870967563 +219.0,22.477064220183488027,277.522935779816511973 +220.0,22.374429223744294029,277.625570776255705971 +221.0,22.272727272727274521,277.727272727272725479 +222.0,22.171945701357467856,277.828054298642532144 +223.0,22.072072072072073868,277.927927927927926132 +224.0,21.973094170403589233,278.026905829596410767 +225.0,21.875000000000001788,278.124999999999998212 +226.0,21.777777777777779568,278.222222222222220432 +227.0,21.681415929203541625,278.318584070796458375 +228.0,21.585903083700442341,278.414096916299557659 +229.0,21.491228070175440418,278.508771929824559582 +230.0,21.39737991266375729,278.60262008733624271 +231.0,21.304347826086958362,278.695652173913041638 +232.0,21.212121212121213954,278.787878787878786046 +233.0,21.120689655172415638,278.879310344827584362 +234.0,21.030042918454937476,278.969957081545062524 +235.0,20.940170940170942028,279.059829059829057972 +236.0,20.851063829787235897,279.148936170212764103 +237.0,20.762711864406781515,279.237288135593218485 +238.0,20.675105485232069377,279.324894514767930623 +239.0,20.58823529411764893,279.41176470588235107 +240.0,20.502092050209206902,279.497907949790793098 +241.0,20.416666666666668554,279.583333333333331446 +242.0,20.331950207468881565,279.668049792531118435 +243.0,20.247933884297522565,279.752066115702477435 +244.0,20.164609053497944297,279.835390946502055703 +245.0,20.08196721311475602,279.91803278688524398 +246.0,20.000000000000001924,279.999999999999998076 +247.0,19.918699186991871837,280.081300813008128163 +248.0,19.838056680161945231,280.161943319838054769 +249.0,19.758064516129034163,280.241935483870965837 +250.0,19.678714859437752911,280.321285140562247089 \ No newline at end of file diff --git a/generatedDataForModels/imbalancedShort.txt b/generatedDataForModels/imbalancedShort.txt new file mode 100644 index 0000000..6db2024 --- /dev/null +++ b/generatedDataForModels/imbalancedShort.txt @@ -0,0 +1,251 @@ + +1.0,297.999999999999999969,2.000000000000000031 +2.0,295.999999999999999939,4.000000000000000061 +3.0,293.999999999999999913,6.000000000000000087 +4.0,291.999999999999999884,8.000000000000000116 +5.0,289.999999999999999856,10.000000000000000144 +6.0,287.999999999999999837,12.000000000000000163 +7.0,285.999999999999999813,14.000000000000000187 +8.0,283.999999999999999787,16.000000000000000213 +9.0,281.999999999999999763,18.000000000000000237 +10.0,279.999999999999999737,20.000000000000000263 +11.0,277.999999999999999713,22.000000000000000287 +12.0,275.999999999999999696,24.000000000000000304 +13.0,273.999999999999999673,26.000000000000000327 +14.0,271.999999999999999666,28.000000000000000334 +15.0,269.999999999999999664,30.000000000000000336 +16.0,267.999999999999999642,32.000000000000000358 +17.0,265.999999999999999652,34.000000000000000348 +18.0,263.999999999999999653,36.000000000000000347 +19.0,261.999999999999999636,38.000000000000000364 +20.0,259.999999999999999617,40.000000000000000383 +21.0,257.9999999999999996,42.0000000000000004 +22.0,255.999999999999999607,44.000000000000000393 +23.0,253.999999999999999609,46.000000000000000391 +24.0,251.999999999999999626,48.000000000000000374 +25.0,249.999999999999999611,50.000000000000000389 +26.0,247.999999999999999625,52.000000000000000375 +27.0,245.999999999999999613,54.000000000000000387 +28.0,243.999999999999999616,56.000000000000000384 +29.0,241.999999999999999613,58.000000000000000387 +30.0,239.999999999999999621,60.000000000000000379 +31.0,237.999999999999999625,62.000000000000000375 +32.0,235.999999999999999613,64.000000000000000387 +33.0,233.999999999999999604,66.000000000000000396 +34.0,231.999999999999999658,68.000000000000000342 +35.0,229.999999999999999679,70.000000000000000321 +36.0,227.999999999999999728,72.000000000000000272 +37.0,225.999999999999999723,74.000000000000000277 +38.0,223.999999999999999757,76.000000000000000243 +39.0,221.999999999999999753,78.000000000000000247 +40.0,219.999999999999999747,80.000000000000000253 +41.0,217.999999999999999774,82.000000000000000226 +42.0,215.999999999999999814,84.000000000000000186 +43.0,213.999999999999999818,86.000000000000000182 +44.0,211.999999999999999839,88.000000000000000161 +45.0,209.999999999999999856,90.000000000000000144 +46.0,207.999999999999999919,92.000000000000000081 +47.0,205.999999999999999924,94.000000000000000076 +48.0,203.999999999999999956,96.000000000000000044 +49.0,202.0,98.0 +50.0,200.0,100.0 +51.0,198.0,102.0 +52.0,196.000000000000000098,103.999999999999999902 +53.0,194.00000000000000018,105.99999999999999982 +54.0,192.000000000000000268,107.999999999999999732 +55.0,190.000000000000000329,109.999999999999999671 +56.0,188.000000000000000425,111.999999999999999575 +57.0,186.000000000000000449,113.999999999999999551 +58.0,184.000000000000000459,115.999999999999999541 +59.0,182.000000000000000535,117.999999999999999465 +60.0,180.000000000000000587,119.999999999999999413 +61.0,178.000000000000000677,121.999999999999999323 +62.0,176.000000000000000771,123.999999999999999229 +63.0,174.0000000000000008,125.9999999999999992 +64.0,172.000000000000000815,127.999999999999999185 +65.0,170.000000000000000828,129.999999999999999172 +66.0,168.000000000000000921,131.999999999999999079 +67.0,166.000000000000001003,133.999999999999998997 +68.0,164.000000000000001046,135.999999999999998954 +69.0,162.000000000000001126,137.999999999999998874 +70.0,160.000000000000001253,139.999999999999998747 +71.0,158.000000000000001371,141.999999999999998629 +72.0,156.000000000000001409,143.999999999999998591 +73.0,154.000000000000001557,145.999999999999998443 +74.0,152.000000000000001633,147.999999999999998367 +75.0,150.000000000000001732,149.999999999999998268 +76.0,148.000000000000001806,151.999999999999998194 +77.0,146.052631578947370243,153.947368421052629757 +78.0,144.155844155844157645,155.844155844155842355 +79.0,142.307692307692309544,157.692307692307690456 +80.0,140.506329113924052579,159.493670886075947421 +81.0,138.750000000000001922,161.249999999999998078 +82.0,137.037037037037038938,162.962962962962961062 +83.0,135.365853658536587271,164.634146341463412729 +84.0,133.734939759036146508,166.265060240963853492 +85.0,132.142857142857144866,167.857142857142855134 +86.0,130.588235294117649068,169.411764705882350932 +87.0,129.069767441860467109,170.930232558139532891 +88.0,127.586206896551726159,172.413793103448273841 +89.0,126.136363636363638443,173.863636363636361557 +90.0,124.71910112359550771,175.28089887640449229 +91.0,123.333333333333335416,176.666666666666664584 +92.0,121.978021978021980084,178.021978021978019916 +93.0,120.652173913043480343,179.347826086956519657 +94.0,119.354838709677421506,180.645161290322578494 +95.0,118.085106382978725597,181.914893617021274403 +96.0,116.842105263157896932,183.157894736842103068 +97.0,115.625000000000002251,184.374999999999997749 +98.0,114.432989690721651819,185.567010309278348181 +99.0,113.265306122448981929,186.734693877551018071 +100.0,112.121212121212123527,187.878787878787876473 +101.0,111.000000000000002292,188.999999999999997708 +102.0,109.90099009900990337,190.09900990099009663 +103.0,108.823529411764708347,191.176470588235291653 +104.0,107.766990291262138462,192.233009708737861538 +105.0,106.730769230769233326,193.269230769230766674 +106.0,105.714285714285716905,194.285714285714283095 +107.0,104.716981132075474335,195.283018867924525665 +108.0,103.738317757009348458,196.261682242990651542 +109.0,102.777777777777780444,197.222222222222219556 +110.0,101.83486238532110362,198.16513761467889638 +111.0,100.909090909090911862,199.090909090909088138 +112.0,100.000000000000002748,199.999999999999997252 +113.0,99.107142857142859924,200.892857142857140076 +114.0,98.230088495575224076,201.769911504424775924 +115.0,97.36842105263158181,202.63157894736841819 +116.0,96.521739130434785494,203.478260869565214506 +117.0,95.689655172413796041,204.310344827586203959 +118.0,94.871794871794874709,205.128205128205125291 +119.0,94.06779661016949448,205.93220338983050552 +120.0,93.277310924369750841,206.722689075630249159 +121.0,92.500000000000002949,207.499999999999997051 +122.0,91.735537190082647588,208.264462809917352412 +123.0,90.983606557377052193,209.016393442622947807 +124.0,90.243902439024393244,209.756097560975606756 +125.0,89.516129032258067498,210.483870967741932502 +126.0,88.800000000000002959,211.199999999999997041 +127.0,88.095238095238098219,211.904761904761901781 +128.0,87.401574803149609263,212.598425196850390737 +129.0,86.718750000000002941,213.281249999999997059 +130.0,86.046511627906979666,213.953488372093020334 +131.0,85.384615384615387542,214.615384615384612458 +132.0,84.732824427480919019,215.267175572519080981 +133.0,84.09090909090909394,215.90909090909090606 +134.0,83.458646616541356393,216.541353383458643607 +135.0,82.835820895522391056,217.164179104477608944 +136.0,82.222222222222225231,217.777777777777774769 +137.0,81.617647058823532418,218.382352941176467582 +138.0,81.021897810218981147,218.978102189781018853 +139.0,80.43478260869565527,219.56521739130434473 +140.0,79.8561151079136722,220.1438848920863278 +141.0,79.285714285714288896,220.714285714285711104 +142.0,78.72340425531915215,221.27659574468084785 +143.0,78.16901408450704549,221.83098591549295451 +144.0,77.622377622377625593,222.377622377622374407 +145.0,77.083333333333336561,222.916666666666663439 +146.0,76.551724137931037691,223.448275862068962309 +147.0,76.027397260273975842,223.972602739726024158 +148.0,75.51020408163265629,224.48979591836734371 +149.0,75.000000000000003265,224.999999999999996735 +150.0,74.496644295302016694,225.503355704697983306 +151.0,74.0000000000000033,225.9999999999999967 +152.0,73.509933774834440419,226.490066225165559581 +153.0,73.026315789473687568,226.973684210526312432 +154.0,72.549019607843140639,227.450980392156859361 +155.0,72.077922077922081321,227.922077922077918679 +156.0,71.612903225806455023,228.387096774193544977 +157.0,71.153846153846157253,228.846153846153842747 +158.0,70.70063694267516267,229.29936305732483733 +159.0,70.253164556962028794,229.746835443037971206 +160.0,69.811320754716984654,230.188679245283015346 +161.0,69.3750000000000035,230.6249999999999965 +162.0,68.94409937888199109,231.05590062111800891 +163.0,68.518518518518522045,231.481481481481477955 +164.0,68.098159509202457509,231.901840490797542491 +165.0,67.68292682926829619,232.31707317073170381 +166.0,67.272727272727276255,232.727272727272723745 +167.0,66.867469879518075842,233.132530120481924158 +168.0,66.467065868263476612,233.532934131736523388 +169.0,66.071428571428574991,233.928571428571425009 +170.0,65.680473372781068661,234.319526627218931339 +171.0,65.29411764705882712,234.70588235294117288 +172.0,64.912280701754389535,235.087719298245610465 +173.0,64.534883720930236109,235.465116279069763891 +174.0,64.161849710982662526,235.838150289017337474 +175.0,63.793103448275865628,236.206896551724134372 +176.0,63.428571428571432129,236.571428571428567871 +177.0,63.068181818181821772,236.931818181818178228 +178.0,62.711864406779664637,237.288135593220335363 +179.0,62.359550561797756449,237.640449438202243551 +180.0,62.011173184357545565,237.988826815642454435 +181.0,61.666666666666670347,238.333333333333329653 +182.0,61.325966850828732984,238.674033149171267016 +183.0,60.989010989010992724,239.010989010989007276 +184.0,60.655737704918036534,239.344262295081963466 +185.0,60.326086956521742868,239.673913043478257132 +186.0,60.000000000000003742,239.999999999999996258 +187.0,59.677419354838713422,240.322580645161286578 +188.0,59.358288770053479693,240.641711229946520307 +189.0,59.042553191489365485,240.957446808510634515 +190.0,58.730158730158733922,241.269841269841266078 +191.0,58.421052631578951119,241.578947368421048881 +192.0,58.115183246073302201,241.884816753926697799 +193.0,57.812500000000003772,242.187499999999996228 +194.0,57.512953367875651442,242.487046632124348558 +195.0,57.216494845360828552,242.783505154639171448 +196.0,56.923076923076926879,243.076923076923073121 +197.0,56.632653061224493614,243.367346938775506386 +198.0,56.345177664974623113,243.654822335025376887 +199.0,56.060606060606064439,243.939393939393935561 +200.0,55.778894472361812888,244.221105527638187112 +201.0,55.500000000000003824,244.499999999999996176 +202.0,55.223880597014929219,244.776119402985070781 +203.0,54.95049504950495435,245.04950495049504565 +204.0,54.679802955665028492,245.320197044334971508 +205.0,54.411764705882356811,245.588235294117643189 +206.0,54.146341463414638046,245.853658536585361954 +207.0,53.883495145631071894,246.116504854368928106 +208.0,53.623188405797105378,246.376811594202894622 +209.0,53.365384615384619332,246.634615384615380668 +210.0,53.110047846889956082,246.889952153110043918 +211.0,52.857142857142861102,247.142857142857138898 +212.0,52.606635071090051348,247.393364928909948652 +213.0,52.358490566037739822,247.641509433962260178 +214.0,52.112676056338032161,247.887323943661967839 +215.0,51.869158878504676884,248.130841121495323116 +216.0,51.627906976744190037,248.372093023255809963 +217.0,51.388888888888892894,248.611111111111107106 +218.0,51.152073732718897998,248.847926267281102002 +219.0,50.917431192660554445,249.082568807339445555 +220.0,50.68493150684931906,249.31506849315068094 +221.0,50.454545454545458542,249.545454545454541458 +222.0,50.226244343891406709,249.773755656108593291 +223.0,50.000000000000004002,249.999999999999995998 +224.0,49.775784753363232685,250.224215246636767315 +225.0,49.553571428571432554,250.446428571428567446 +226.0,49.333333333333337321,250.666666666666662679 +227.0,49.115044247787614635,250.884955752212385365 +228.0,48.898678414096920337,251.101321585903079663 +229.0,48.684210526315793531,251.315789473684206469 +230.0,48.471615720524021547,251.528384279475978453 +231.0,48.260869565217395403,251.739130434782604597 +232.0,48.05194805194805603,251.94805194805194397 +233.0,47.84482758620690066,252.15517241379309934 +234.0,47.63948497854077666,252.36051502145922334 +235.0,47.435897435897440032,252.564102564102559968 +236.0,47.234042553191493489,252.765957446808506511 +237.0,47.033898305084749889,252.966101694915250111 +238.0,46.835443037974687698,253.164556962025312302 +239.0,46.638655462184878113,253.361344537815121887 +240.0,46.443514644351468621,253.556485355648531379 +241.0,46.2500000000000042,253.7499999999999958 +242.0,46.058091286307058164,253.941908713692941836 +243.0,45.867768595041326551,254.132231404958673449 +244.0,45.679012345679016596,254.320987654320983404 +245.0,45.491803278688528866,254.508196721311471134 +246.0,45.306122448979596118,254.693877551020403882 +247.0,45.121951219512199389,254.878048780487800611 +248.0,44.939271255060732995,255.060728744939267005 +249.0,44.758064516129036493,255.241935483870963507 +250.0,44.578313253012052431,255.421686746987947569 \ No newline at end of file diff --git a/hardhat-plugins/codegen.js b/hardhat-plugins/codegen.js new file mode 100644 index 0000000..cd35a7e --- /dev/null +++ b/hardhat-plugins/codegen.js @@ -0,0 +1,81 @@ +const fs = require('fs'); +const path = require('path'); +const { extendConfig } = require('hardhat/config'); + +const { HardhatPluginError } = require('hardhat/plugins'); + +const { + TASK_COMPILE_SOLIDITY_RUN_SOLCJS, + TASK_COMPILE_SOLIDITY_RUN_SOLC +} = require('hardhat/builtin-tasks/task-names'); + +extendConfig(function (config, userConfig) { + config.codeGen = Object.assign( + { + ast: { + path: './ast', + spacing: 2, + files: [ + { + contractName: "LongShort", + fullPath: "contracts/LongShort.sol" + }, + { + contractName: "Staker", + fullPath: "contracts/Staker.sol" + } + ], + } + // filesToGenerateMocksFor: [], //TODO + }, + userConfig.codeGen + ); +}); + + +const handleCompilation = async function (args, hre, runSuper) { + const compileResult = await runSuper(); + + const config = hre.config.codeGen; + const astConfig = config.ast; + + const outputDirectory = path.resolve(hre.config.paths.root, astConfig.path); + + if (!outputDirectory.startsWith(hre.config.paths.root)) { + throw new HardhatPluginError('resolved path must be inside of project directory'); + } + + if (outputDirectory === hre.config.paths.root) { + throw new HardhatPluginError('resolved path must not be root directory'); + } + + if (!fs.existsSync(outputDirectory)) { + fs.mkdirSync(outputDirectory, { recursive: true }); + } + + astConfig.files.map((fileToPrintAst) => { + const result = compileResult.sources[fileToPrintAst.fullPath] + + if (!result) { + console.log(`AvailableFiles: \n${Object.keys(compileResult.sources).join("\n")}`); + return + // throw new HardhatPluginError(`Could not find a contract with the name ${fileToPrintAst.contractName} at ${fileToPrintAst.fullPath} - please check your config carefully. \n\nAvailableFiles: \n${Object.keys(compileResult.sources).join("\n")}`); + } + + const destination = path.resolve( + outputDirectory, + fileToPrintAst.contractName + ) + '.json'; + + if (!fs.existsSync(path.dirname(destination))) { + fs.mkdirSync(path.dirname(destination), { recursive: true }); + } + + fs.writeFileSync(destination, `${JSON.stringify(result.ast, null, astConfig.spacing)}\n`, { flag: 'w' }); + }) + + return compileResult; +} + +task(TASK_COMPILE_SOLIDITY_RUN_SOLCJS, handleCompilation) +task(TASK_COMPILE_SOLIDITY_RUN_SOLC, handleCompilation) diff --git a/hardhat.config.js b/hardhat.config.js new file mode 100644 index 0000000..d4eafcb --- /dev/null +++ b/hardhat.config.js @@ -0,0 +1,187 @@ +require("hardhat-spdx-license-identifier"); +require("@tenderly/hardhat-tenderly"); // https://hardhat.org/plugins/tenderly-hardhat-tenderly.html +require("solidity-coverage"); +require("@openzeppelin/hardhat-upgrades"); +require("./hardhat-plugins/codegen"); +require("hardhat-deploy"); +require("@nomiclabs/hardhat-ethers"); +try { + require("./test/Setup.js").mochaSetup(); +} catch (e) { + console.warn( + "You need to generate the rescript contracts, this could cause tests to fail." + ); +} +require("@nomiclabs/hardhat-waffle"); + +require("hardhat-docgen"); + +let config; +try { + config = require("./secretsManager.js"); +} catch (e) { + console.error( + "You are using the example secrets manager, please copy this file if you want to use it" + ); + config = require("./secretsManager.example.js"); +} + +const { + mnemonic, + mainnetProviderUrl, + rinkebyProviderUrl, + kovanProviderUrl, + goerliProviderUrl, + etherscanApiKey, + polygonscanApiKey, + mumbaiProviderUrl, + polygonProviderUrl, +} = config; + +let runCoverage = + !process.env.DONT_RUN_REPORT_SUMMARY || + process.env.DONT_RUN_REPORT_SUMMARY.toUpperCase() != "TRUE"; +if (runCoverage) { + require("hardhat-abi-exporter"); + require("hardhat-gas-reporter"); +} +// let isWaffleTest = +// !!process.env.WAFFLE_TEST && process.env.WAFFLE_TEST.toUpperCase() == "TRUE"; +// if (isWaffleTest) { + +// This is a sample Buidler task. To learn how to create your own go to +// https://buidler.dev/guides/create-task.html +task("accounts", "Prints the list of accounts", async () => { + const accounts = await ethers.getSigners(); + + for (const account of accounts) { + console.log(await account.getAddress()); + } +}); + +// While waiting for hardhat PR: https://github.com/nomiclabs/hardhat/pull/1542 +if (process.env.HARDHAT_FORK) { + process.env["HARDHAT_DEPLOY_FORK"] = process.env.HARDHAT_FORK; +} + +// You have to export an object to set up your config +// This object can have the following optional entries: +// defaultNetwork, networks, solc, and paths. +// Go to https://buidler.dev/config/ to learn more +module.exports = { + // This is a sample solc configuration that specifies which version of solc to use + solidity: { + version: "0.8.3", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + }, + }, + defaultNetwork: "hardhat", + networks: { + hardhat: { + allowUnlimitedContractSize: true, + initialBaseFeePerGas: 0, // to fix : https://github.com/sc-forks/solidity-coverage/issues/652, see https://github.com/sc-forks/solidity-coverage/issues/652#issuecomment-896330136 + // process.env.HARDHAT_FORK will specify the network that the fork is made from. + // this line ensure the use of the corresponding accounts + forking: process.env.HARDHAT_FORK + ? { + url: process.env.HARDHAT_FORK == "polygon" ? polygonProviderUrl : mumbaiProviderUrl || "https://rpc-mumbai.maticvigil.com/v1", + } + : undefined, + accounts: process.env.HARDHAT_FORK + ? { + mnemonic, + } + : undefined, + }, + ganache: { + url: "http://localhost:8545", + }, + polygon: { + chainId: 137, + // "https://matic-mainnet-full-rpc.bwarelabs.com/", + // "https://rpc-mainnet.matic.network", + // "https://matic-mainnet.chainstacklabs.com", + url: polygonProviderUrl || "https://matic-mainnet-full-rpc.bwarelabs.com/", + accounts: { mnemonic }, + gasPrice: 10000000000, + gas: 10000000, + }, + mumbai: { + chainId: 80001, + url: mumbaiProviderUrl || "https://rpc-mumbai.maticvigil.com/v1", + accounts: { mnemonic }, + // gasPrice: 1000000000, + // gas: 15000000, + }, + }, + paths: { + tests: "./test", + }, + namedAccounts: { + deployer: 0, + admin: 1, + user1: 2, + user2: 3, + user3: 4, + user4: 5, + discountSigner: 6, + }, + gasReporter: { + // Disabled by default for faster running of tests + enabled: true, + currency: "USD", + gasPrice: 80, + coinmarketcap: "9aacee3e-7c04-4978-8f93-63198c0fbfef", + }, + spdxLicenseIdentifier: { + // Set these to true if you ever want to change the licence on all of the contracts (by changing it in package.json) + overwrite: false, + runOnCompile: false, + }, + abiExporter: { + path: "./abis", + clear: true, + flat: true, + only: [ + ":ERC20Mock$", + ":YieldManagerMock$", + ":LongShort$", + ":SyntheticToken$", + ":SyntheticTokenUpgradeable$", + ":YieldManagerAave$", + ":FloatCapital_v0$", + ":Migrations$", + ":TokenFactory$", + ":FloatToken$", + ":Staker$", + ":Treasury_v0$", + ":TreasuryAlpha$", + ":OracleManager$", + ":OracleManagerChainlink$", + ":OracleManagerFlipp3ning$", + ":OracleManagerChainlinkTestnet$", + ":OracleManagerMock$", + ":LendingPoolAaveMock$", + ":LendingPoolAddressesProviderMock$", + ":AaveIncentivesControllerMock$", + "Mockable$", + ":GEMS$", + ], + spacing: 2, + }, + docgen: { + path: "./contract-docs", + only: [ + "^contracts/LongShort", + "^contracts/Staker", + "^contracts/FloatToken", + "^contracts/SyntheticToken", + "^contracts/TokenFactory", + "^contracts/YieldManagerAave", + ], + }, +}; diff --git a/helper-hardhat-config.js b/helper-hardhat-config.js new file mode 100644 index 0000000..a4e9827 --- /dev/null +++ b/helper-hardhat-config.js @@ -0,0 +1,24 @@ +const STAKER = "Staker"; +const COLLATERAL_TOKEN = "ERC20Mock"; +const TREASURY = "Treasury_v0"; +const TREASURY_ALPHA = "TreasuryAlpha"; +const LONGSHORT = "LongShort"; +const FLOAT_TOKEN = "FloatToken"; +const FLOAT_TOKEN_ALPHA = "AlphaTestFLT"; +const TOKEN_FACTORY = "TokenFactory"; +const FLOAT_CAPITAL = "FloatCapital_v0"; +const GEMS = "GEMS"; +const isAlphaLaunch = true; +module.exports = { + STAKER, + COLLATERAL_TOKEN, + TREASURY, + TREASURY_ALPHA, + LONGSHORT, + FLOAT_TOKEN, + FLOAT_TOKEN_ALPHA, + TOKEN_FACTORY, + FLOAT_CAPITAL, + GEMS, + isAlphaLaunch, +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..74090b9 --- /dev/null +++ b/package.json @@ -0,0 +1,66 @@ +{ + "name": "longshort-contracts", + "version": "1.0.0", + "main": "index.js", + "license": "BUSL-1.1", + "scripts": { + "compile": "hardhat compile", + "test": "yarn generate-all && hardhat test", + "test-compiled": "hardhat test", + "test-unit-compiled": "DONT_RUN_INTEGRATION_TESTS='true' yarn test-compiled", + "test-integration-compiled": "DONT_RUN_UNIT_TESTS='true' yarn test-compiled", + "test-unit": "yarn generate-test-contracts && yarn test-unit-compiled", + "test-integration": "yarn generate-test-contracts && yarn test-integration-compiled", + "coverage": "hardhat coverage", + "coverage-unit": "DONT_RUN_INTEGRATION_TESTS='true' hardhat coverage", + "coverage-integration": "DONT_RUN_UNIT_TESTS='true' hardhat coverage", + "res:clean": "rescript clean", + "res:build": "rescript", + "res:start": "rescript build -w", + "clean": "rm -rf build/contracts/* artifacts cache", + "lint-contracts": "solhint 'contracts/**/*.sol' --fix", + "format-contracts": "prettier --write 'contracts/**/*.sol'", + "hardhat": "hardhat", + "docgen": "hardhat docgen", + "save-deployment": "/bin/bash -c 'mkdir -p ./buildsDeployed/deployed && \\cp ./build/contracts/{FloatCapital_v0,FloatToken,LongShort,Migrations,Staker,TokenFactory,Treasury_v0,Dai}.json ./buildsDeployed/deployed/'", + "generate-contract-interfaces": "yarn compile && node ../scripts/src/AbiInterfaceGen.bs.js && rescript format -all", + "generate-test-contracts": "rm -f contracts/testing/generated/* && yarn compile --force --quiet && node ../scripts/src/MockablesGen.bs.js && yarn format-contracts && rescript format -all", + "generate-all": "yarn generate-test-contracts && yarn compile && node ../scripts/src/AbiInterfaceGen.bs.js && yarn res:build;", + "deploy": "hardhat deploy" + }, + "dependencies": { + "@chainlink/contracts": "^0.1.7", + "@nomiclabs/ethereumjs-vm": "^4.2.2", + "@nomiclabs/hardhat-web3": "^2.0.0", + "@openzeppelin/cli": "^2.8.2", + "@openzeppelin/contracts": "^4.2.0", + "@openzeppelin/contracts-upgradeable": "^4.2.0", + "@openzeppelin/test-helpers": "^0.5.6", + "chai": "^4.3.4", + "hardhat": "^2.6.2", + "hardhat-gas-reporter": "^1.0.4", + "random": "^3.0.6", + "seedrandom": "^3.0.5", + "solidity-coverage": "^0.7.17" + }, + "devDependencies": { + "@defi-wonderland/smock": "^2.0.1", + "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers", + "@nomiclabs/hardhat-waffle": "^2.0.1", + "@openzeppelin/hardhat-upgrades": "^1.9.0", + "@tenderly/hardhat-tenderly": "^1.0.12", + "bs-let": "^0.1.16", + "bs-platform": "^9.0.2", + "dotenv": "^10.0.0", + "ethereum-waffle": "^3.3.0", + "ethers": "^5.4.6", + "hardhat-abi-exporter": "^2.2.1", + "hardhat-deploy": "^0.9.0", + "hardhat-docgen": "^1.1.1", + "hardhat-spdx-license-identifier": "^2.0.3", + "prettier": "^2.3.2", + "prettier-plugin-solidity": "^1.0.0-beta.15", + "rescript": "^9.1.4", + "solhint": "^3.3.6" + } +} diff --git a/secretsManager.example.js b/secretsManager.example.js new file mode 100644 index 0000000..75eb318 --- /dev/null +++ b/secretsManager.example.js @@ -0,0 +1,21 @@ +const mnemonic = ""; +const mainnetProviderUrl = ""; +const rinkebyProviderUrl = ""; +const goerliProviderUrl = ""; +const kovanProviderUrl = ""; + +const etherscanApiKey = ""; +const polygonscanApiKey = ""; +const mumbaiProviderUrl = ""; +const polygonProviderUrl = ""; +module.exports = { + mnemonic, + mainnetProviderUrl, + rinkebyProviderUrl, + goerliProviderUrl, + kovanProviderUrl, + etherscanApiKey, + mumbaiProviderUrl, + polygonProviderUrl, + polygonscanApiKey +}; diff --git a/test/CONSTANTS.re b/test/CONSTANTS.re new file mode 100644 index 0000000..aa7b93f --- /dev/null +++ b/test/CONSTANTS.re @@ -0,0 +1,13 @@ +let floatIssuanceFixedDecimal = + Ethers.BigNumber.fromUnsafe( + "300000000000000000000000000000000000000000000", + ); +let tenToThe18 = Ethers.BigNumber.fromUnsafe("1000000000000000000"); +let zeroBn = Ethers.BigNumber.fromInt(0); +let oneBn = Ethers.BigNumber.fromInt(1); +let twoBn = Ethers.BigNumber.fromInt(2); +let longTokenType = 0; +let shortTokenType = 1; + +let zeroAddressStr = "0x0000000000000000000000000000000000000000"; +let zeroAddress = Ethers.Utils.getAddressUnsafe(zeroAddressStr); diff --git a/test/Experiments/AmountBitShiftForSafeExponentiation.re b/test/Experiments/AmountBitShiftForSafeExponentiation.re new file mode 100644 index 0000000..e5ff922 --- /dev/null +++ b/test/Experiments/AmountBitShiftForSafeExponentiation.re @@ -0,0 +1,72 @@ +open Globals; +open LetOps; +open Mocha; + +let describeSkippable = Config.runValueSimulations ? describe : describe_skip; + +describeSkippable("Float System", () => { + let contracts: ref(Helpers.coreContracts) = ref(None->Obj.magic); + let accounts: ref(array(Ethers.Wallet.t)) = ref(None->Obj.magic); + + before(() => { + let%Await loadedAccounts = Ethers.getSigners(); + accounts := loadedAccounts; + }); + + before_each(() => { + let%Await deployedContracts = + Helpers.initialize( + ~admin=accounts.contents->Array.getUnsafe(0), + ~exposeInternals=true, + ); + contracts := deployedContracts; + (); + }); + + describe("testing exponents", () => { + it( + "get the safe min bit shifting required for a market with liquidity of 10 Trillion USD", + () => { + let {staker} = contracts.contents; + + // Assumption, theoretical maximum amount of liquidity in a single market. 10^13 (10 trillion) USD. Or 10^31 units. + let theoreticalMaximumMarketLiquidity = + bnFromString("10000000000000000000000000000000"); + + let%Await maxForExp2 = + staker->Staker.Exposed.getRequiredAmountOfBitShiftForSafeExponentiationPerfect( + ~number=theoreticalMaximumMarketLiquidity, + ~exponent=bnFromInt(2), + ); + let%Await maxForExp3 = + staker->Staker.Exposed.getRequiredAmountOfBitShiftForSafeExponentiationPerfect( + ~number=theoreticalMaximumMarketLiquidity, + ~exponent=bnFromInt(3), + ); + let%Await maxForExp4 = + staker->Staker.Exposed.getRequiredAmountOfBitShiftForSafeExponentiationPerfect( + ~number=theoreticalMaximumMarketLiquidity, + ~exponent=bnFromInt(4), + ); + let%Await maxForExp5 = + staker->Staker.Exposed.getRequiredAmountOfBitShiftForSafeExponentiationPerfect( + ~number=theoreticalMaximumMarketLiquidity, + ~exponent=bnFromInt(5), + ); + let%Await maxForExp6 = + staker->Staker.Exposed.getRequiredAmountOfBitShiftForSafeExponentiationPerfect( + ~number=theoreticalMaximumMarketLiquidity, + ~exponent=bnFromInt(6), + ); + + Js.log({ + "maxForExp2": maxForExp2->bnToString, + "maxForExp3": maxForExp3->bnToString, + "maxForExp4": maxForExp4->bnToString, + "maxForExp5": maxForExp5->bnToString, + "maxForExp6": maxForExp6->bnToString, + }); + }, + ) + }); +}); diff --git a/test/Experiments/GraphPlot.re b/test/Experiments/GraphPlot.re new file mode 100644 index 0000000..c4195ac --- /dev/null +++ b/test/Experiments/GraphPlot.re @@ -0,0 +1,247 @@ +open Globals; +open LetOps; +open Mocha; + +let generateTestData = + ( + ~contracts: ref(Helpers.coreContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ~initialPrice: Ethers.BigNumber.t, + ~initialAmountShort: Ethers.BigNumber.t, + ~initialAmountLong: Ethers.BigNumber.t, + ~prices: ref(array((string, string, string))), + ~name: string, + ) => + describe( + "generating graph" ++ name, + () => { + let numberOfItems = initialPrice->div(CONSTANTS.tenToThe18)->bnToInt; + before_each(() => { + let {longShort, markets} = contracts.contents; + let {oracleManager, paymentToken, marketIndex} = + markets->Array.getUnsafe(0); + let testUser = accounts.contents->Array.getUnsafe(1); + let%AwaitThen _ = + oracleManager->OracleManagerMock.setPrice(~newPrice=initialPrice); + + let%AwaitThen _ = + longShort->LongShort.updateSystemState(~marketIndex); + + let%AwaitThen _ = + paymentToken->Contract.PaymentTokenHelpers.mintAndApprove( + ~user=testUser, + ~spender=longShort.address, + ~amount= + Ethers.BigNumber.fromUnsafe("10000000000000000000000000000"), + ); + + let%AwaitThen _ = + HelperActions.mintDirect( + ~marketIndex, + ~amount=initialAmountLong, + ~token=paymentToken, + ~user=testUser, + ~longShort, + ~oracleManagerMock=oracleManager, + ~isLong=true, + ); + + ()->JsPromise.resolve; + }); + it("below", () => { + let {longShort, markets} = contracts.contents; + let {oracleManager, marketIndex, paymentToken} = + markets->Array.getUnsafe(0); + let testUser = accounts.contents->Array.getUnsafe(1); + + let%AwaitThen _ = + HelperActions.mintDirect( + ~marketIndex, + ~amount=initialAmountShort, + ~token=paymentToken, + ~user=testUser, + ~longShort, + ~oracleManagerMock=oracleManager, + ~isLong=false, + ); + let pricesBelow = Belt.Array.makeBy(numberOfItems - 1, i => i); + + let%AwaitThen (_, resultsBelow) = + pricesBelow->Array.reduce( + (initialPrice, [||])->JsPromise.resolve, + (lastPromise, _) => { + let%AwaitThen (lastPrice, results) = lastPromise; + let newPrice = lastPrice->sub(CONSTANTS.tenToThe18); + let%AwaitThen _ = + oracleManager->OracleManagerMock.setPrice(~newPrice); + + let%AwaitThen _ = + longShort->LongShort.updateSystemState(~marketIndex); + let%AwaitThen shortValue = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + false /*short*/, + ); + let%AwaitThen longValue = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + true /*long*/, + ); + + ( + newPrice, + [| + ( + newPrice->Ethers.Utils.formatEther, + shortValue->Ethers.Utils.formatEther, + longValue->Ethers.Utils.formatEther, + ), + |] + ->Array.concat(results), + ) + ->JsPromise.resolve; + }, + ); + prices := + prices.contents + ->Array.concat(resultsBelow) + ->Array.concat([| + ( + initialPrice->Ethers.Utils.formatEther, + initialAmountShort->Ethers.Utils.formatEther, + initialAmountLong->Ethers.Utils.formatEther, + ), + |]); + ()->JsPromise.resolve; + }); + it("above", () => { + let {longShort, markets} = contracts.contents; + let {oracleManager, marketIndex, paymentToken} = + markets->Array.getUnsafe(0); + let testUser = accounts.contents->Array.getUnsafe(1); + + let%AwaitThen _ = + HelperActions.mintDirect( + ~marketIndex, + ~amount=initialAmountShort, + ~token=paymentToken, + ~user=testUser, + ~longShort, + ~oracleManagerMock=oracleManager, + ~isLong=false, + ); + + let pricesAbove = Belt.Array.makeBy(numberOfItems * 4, i => i); + + let%AwaitThen (_, resultsAbove) = + pricesAbove->Array.reduce( + (initialPrice, [||])->JsPromise.resolve, + (lastPromise, _) => { + let%AwaitThen (lastPrice, results) = lastPromise; + let newPrice = lastPrice->add(CONSTANTS.tenToThe18); + let%AwaitThen _ = + oracleManager->OracleManagerMock.setPrice(~newPrice); + let%AwaitThen _ = + longShort->LongShort.updateSystemState(~marketIndex); + let%AwaitThen shortValue = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + false /*short*/, + ); + let%AwaitThen longValue = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + true /*long*/, + ); + + ( + newPrice, + results->Array.concat([| + ( + newPrice->Ethers.Utils.formatEther, + shortValue->Ethers.Utils.formatEther, + longValue->Ethers.Utils.formatEther, + ), + |]), + ) + ->JsPromise.resolve; + }, + ); + prices := prices.contents->Array.concat(resultsAbove); + + Node.Fs.writeFileAsUtf8Sync( + "./generatedDataForModels/" ++ name ++ ".txt", + prices.contents + ->Array.reduce("", (priceString, (price, long, short)) => { + priceString ++ "\n" ++ price ++ "," ++ long ++ "," ++ short + }), + ); + ()->JsPromise.resolve; + }); + }, + ); +let describeSkippable = Config.runValueSimulations ? describe : describe_skip; +describeSkippable("Float System", () => { + let contracts: ref(Helpers.coreContracts) = ref(None->Obj.magic); + let accounts: ref(array(Ethers.Wallet.t)) = ref(None->Obj.magic); + + before(() => { + let%Await loadedAccounts = Ethers.getSigners(); + accounts := loadedAccounts; + }); + + before_each(() => { + let%Await deployedContracts = + Helpers.initialize( + ~admin=accounts.contents->Array.getUnsafe(0), + ~exposeInternals=false, + ); + contracts := deployedContracts; + (); + }); + + let initialPrice = bnFromInt(50)->mul(CONSTANTS.tenToThe18); + let initialAmountLong = bnFromInt(100)->mul(CONSTANTS.tenToThe18); + let initialAmountShort = bnFromInt(100)->mul(CONSTANTS.tenToThe18); + let prices = ref([||]); + + generateTestData( + ~contracts, + ~accounts, + ~initialPrice, + ~initialAmountShort, + ~initialAmountLong, + ~prices, + ~name="balancedStart", + ); + + let initialPrice = bnFromInt(50)->mul(CONSTANTS.tenToThe18); + let initialAmountLong = bnFromInt(200)->mul(CONSTANTS.tenToThe18); + let initialAmountShort = bnFromInt(100)->mul(CONSTANTS.tenToThe18); + let prices = ref([||]); + + generateTestData( + ~contracts, + ~accounts, + ~initialPrice, + ~initialAmountShort, + ~initialAmountLong, + ~prices, + ~name="imbalancedLong", + ); + + let initialPrice = bnFromInt(50)->mul(CONSTANTS.tenToThe18); + let initialAmountLong = bnFromInt(100)->mul(CONSTANTS.tenToThe18); + let initialAmountShort = bnFromInt(200)->mul(CONSTANTS.tenToThe18); + let prices = ref([||]); + + generateTestData( + ~contracts, + ~accounts, + ~initialPrice, + ~initialAmountShort, + ~initialAmountLong, + ~prices, + ~name="imbalancedShort", + ); +}); diff --git a/test/Setup.res b/test/Setup.res new file mode 100644 index 0000000..18794bf --- /dev/null +++ b/test/Setup.res @@ -0,0 +1,75 @@ +/* + Put any synchronous global setup that you need done before mocha runs here. +*/ + +module SeedRandom = { + type t + @module external make: string => t = "seedrandom" +} + +module Random = { + type t + @module("random") external use: SeedRandom.t => unit = "use" + + @module("random") external replaceJsRng: unit => unit = "patch" +} + +module Wallet = { + type mnemonic = {phrase: string} + type t = {mnemonic: mnemonic} + + @module("ethers") @scope("Wallet") @val + external createRandom: unit => t = "createRandom" + + @module("ethers") @scope("Wallet") @val + external fromMnemonic: (string, string, string) => t = "fromMnemonic" + + module Generator = { + let fromMnemonic = mnemonic => { + let counter = ref(-1) + () => { + counter := counter.contents + 1 + fromMnemonic(mnemonic, `m/44'/60'/${counter.contents->Int.toString}'/0/0`, "en") + } + } + } + + let replaceCreateRandom: (unit => t) => unit = %raw("(fn) => { + require('ethers').Wallet.createRandom = fn; + }") +} + +let seedTestRng = seed => { + // Limitation: + // if you run only some tests, then you'll + // be lucky to get the same random value for a particular random val + // as if you ran all of them (number of global calls matters) + + // Replace Math.random with a seeded one. + Random.use(seed->SeedRandom.make) + Random.replaceJsRng() + + // Make ethers.Wallet.createRandom use the mnemonic + Wallet.Generator.fromMnemonic(seed)->Wallet.replaceCreateRandom +} + +// called in hardhat.config.js +let mochaSetup = () => { + // 1. replace rng sources with seeded ones + + let seed = + Node.Process.process["env"] + ->Js.Dict.get("TEST_SEED_MNEMONIC") // set this in the shell if wanting to test a particular seed, or hardcode it here + ->Option.flatMap(str => + if str->String.length > 0 { + Some(str) + } else { + None + } + ) + ->Option.getWithDefault(Wallet.createRandom().mnemonic.phrase) + + seedTestRng(seed) + + Js.log(`Running tests with random seed: "${seed}"`) +} diff --git a/test/bindings/chai/Chai.res b/test/bindings/chai/Chai.res new file mode 100644 index 0000000..d958393 --- /dev/null +++ b/test/bindings/chai/Chai.res @@ -0,0 +1,166 @@ +// Quick and dirty bindings from here: https://ethereum-waffle.readthedocs.io/en/latest/matchers.html + +// NOTE: no effort in making these binding proffessional. Mostly just raw javascript. +%%raw(` +const { expect } = require("chai"); +`) + +let bnEqual: ( + ~message: string=?, + Ethers.BigNumber.t, + Ethers.BigNumber.t, +) => unit = %raw(`(message, number1, number2) => expect(number1, message).to.equal(number2)`) + +let intEqual: ( + ~message: string=?, + int, + int, +) => unit = %raw(`(message, number1, number2) => expect(number1, message).to.equal(number2)`) + +let recordEqualFlat: ('a, 'a) => unit = (expected, actual) => { + let a = %raw("(expected, actual) => { + for(const key of Object.keys(actual)){ + expect(actual[key]).to.equal(expected[key]) + } + }") + a(expected, actual) +} +let recordEqualDeep: (~message: string=?, 'a, 'a) => unit = (~message="", expected, actual) => { + let a = %raw("(message, expected, actual) => { + for(const key of Object.keys(actual)){ + expect(actual[key], message + ` at key \"${key}\"`).to.deep.equal(expected[key]) + } + }") + a(message, expected, actual) +} +/* // Keeping these for reference. +let recordEqualFlatLabeled: (~expected: 'a, ~actual: 'a) => unit = (~expected, ~actual) => { + let a = %raw("(expected, actual) => { + for(const key of Object.keys(actual)){ + expect(actual[key]).to.equal(expected[key]) + } + }") + a(expected, actual) +} +let recordArrayEqualFlat: (array<'a>, array<'a>) => unit = (expected, actual) => { + intEqual( + ~message="cannot compare arrays of integers with different lengths", + expected->Array.length, + actual->Array.length, + ) + expected->Array.forEachWithIndex((i, expectedResult) => + recordEqualFlat(expectedResult, actual->Array.getUnsafe(i)) + ) +} +let recordArrayDeepEqualFlat: (~message: string=?, array<'a>, array<'a>) => unit = ( + ~message="record array equality check", + expected, + actual, +) => { + intEqual(expected->Array.length, actual->Array.length) + expected->Array.forEachWithIndex((i, expectedResult) => + recordEqualDeep( + ~message=`${message}: at index #${i->Int.toString}`, + expectedResult, + actual->Array.getUnsafe(i), + ) + ) +} */ + +let addressEqual: ( + ~message: string=?, + ~otherAddress: Ethers.ethAddress, + Ethers.ethAddress, +) => unit = %raw(`(message, address1, address2) => expect(address1, message).to.equal(address2)`) + +let boolEqual: ( + ~message: string=?, + bool, + bool, +) => unit = %raw(`(message, number1, number2) => expect(number1, message).to.equal(number2)`) + +let bnWithin: ( + Ethers.BigNumber.t, + ~min: Ethers.BigNumber.t, + ~max: Ethers.BigNumber.t, +) => unit = %raw(`(number1, min, max) => expect(number1).to.be.within(min, max)`) + +let bnCloseTo: ( + ~message: string=?, + ~distance: int, + Ethers.BigNumber.t, + Ethers.BigNumber.t, +) => unit = %raw(`(message, distance, number1, number2) => expect(number1, message).to.be.closeTo(number2, distance)`) + +type eventCheck +let callEmitEvents: ( + ~call: JsPromise.t, + ~contract: ContractHelpers.t, + ~eventName: string, +) => eventCheck = %raw(`(call, contract, eventName) => expect(call).to.emit(contract, eventName)`) +@send external withArgs0: eventCheck => JsPromise.t = "withArgs" +@send external withArgs1: (eventCheck, 'a) => JsPromise.t = "withArgs" +@send external withArgs2: (eventCheck, 'a, 'b) => JsPromise.t = "withArgs" +@send external withArgs3: (eventCheck, 'a, 'b, 'c) => JsPromise.t = "withArgs" +@send external withArgs4: (eventCheck, 'a, 'b, 'c, 'd) => JsPromise.t = "withArgs" +@send external withArgs5: (eventCheck, 'a, 'b, 'c, 'd, 'e) => JsPromise.t = "withArgs" + +@send external withArgs5Return: (eventCheck, 'a, 'b, 'c, 'd, 'e) => eventCheck = "withArgs" + +@send external withArgs6: (eventCheck, 'a, 'b, 'c, 'd, 'e, 'f) => JsPromise.t = "withArgs" +@send external withArgs7: (eventCheck, 'a, 'b, 'c, 'd, 'e, 'f, 'g) => JsPromise.t = "withArgs" +@send +external withArgs8: (eventCheck, 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h) => JsPromise.t = "withArgs" + +@send +external withArgs9: (eventCheck, 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i) => JsPromise.t = + "withArgs" + +let expectToNotEmit: eventCheck => JsPromise.t< + unit, +> = %raw(`eventCheck => { let shouldRevert = true; + return (eventCheck + .catch(() => + shouldRevert = false + )) + .then(() => { if (shouldRevert) { require("chai").assert.fail('An event was emitted when it should not have been') } } + ); +}`) + +let expectRevertNoReason: ( + ~transaction: JsPromise.t, +) => JsPromise.t = %raw(`(transaction) => expect(transaction).to.be.reverted`) +let expectRevert: ( + ~transaction: JsPromise.t, + ~reason: string, +) => JsPromise.t< + unit, +> = %raw(`(transaction, reason) => expect(transaction).to.be.revertedWith(reason)`) + +let changeBalance: ( + ~transaction: unit => JsPromise.t, + ~token: ContractHelpers.t, + ~to_: Ethers.ethAddress, + ~amount: Ethers.BigNumber.t, +) => JsPromise.t< + unit, +> = %raw(`(transaction, token, to, amount) => expect(transaction).to.changeTokenBalance(token, to, amount)`) +// TODO: implement changeBalanceMulti to test transactions that change the balance of multiple accounts +// let changeBalanceMulti = %raw(`expect(transaction).to.changeTokenBalance(token, wallets, amounts)`) + +let expectToBeAddress: ( + ~address: Ethers.ethAddress, +) => JsPromise.t = %raw(`(address) => expect(address).to.be.properAddress`) +let expectToBePrivateKey: ( + ~privateKey: string, +) => JsPromise.t = %raw(`(privateKey) => expect(privateKey).to.be.properAddress`) +let expectToBeHex: ( + ~hexStr: string, + ~length: int, +) => JsPromise.t = %raw(`(hexStr, hexLength) => expect(hexStr).to.be.properHex(hexLength)`) +let expectHexEqual: ( + ~hex1: string, + ~hex2: string, +) => JsPromise.t = %raw(`(hex1, hex2) => expect(hex1).to.be.hexEqual(hex2)`) + +let expectTrue: bool => unit = %raw(`(value) => expect(value).to.be.true`) diff --git a/test/bindings/ethers/Ethers.res b/test/bindings/ethers/Ethers.res new file mode 100644 index 0000000..6417633 --- /dev/null +++ b/test/bindings/ethers/Ethers.res @@ -0,0 +1,196 @@ +type ethAddressStr = string +type ethAddress + +module Misc = { + let unsafeToOption: (unit => 'a) => option<'a> = unsafeFunc => { + try { + unsafeFunc()->Some + } catch { + | Js.Exn.Error(_obj) => None + } + } +} + +type txResult = { + @dead("txResult.blockHash") blockHash: string, + @dead("txResult.blockNumber") blockNumber: int, + @dead("txResult.byzantium") byzantium: bool, + @dead("txResult.confirmations") confirmations: int, + // contractAddress: null, + // cumulativeGasUsed: Object { _hex: "0x26063", … }, + // events: Array(4) [ {…}, {…}, {…}, … ], + @dead("txResult.from") from: ethAddress, + // gasUsed: Object { _hex: "0x26063", … }, + // logs: Array(4) [ {…}, {…}, {…}, … ], + // logsBloom: "0x00200000000000008000000000000000000020000001000000000000400020000000000000002000000000000000000000000002800010000000008000000000000000000000000000000008000000000040000000000000000000000000000000000000020000014000000000000800024000000000000000000010000000000000000000000000000000000000000000008000000000000000000000000200000008000000000000000000000000000000000800000000000000000000000000001002000000000000000000000000000000000000000020000000040020000000000000000080000000000000000000000000000000080000000000200000" + @dead("txResult.status") status: int, + @dead("txResult._to") _to: ethAddress, + transactionHash: string, + @dead("txResult.transactionIndex") transactionIndex: int, +} +type txHash = string +type txSubmitted = { + hash: txHash, + wait: (. unit) => JsPromise.t, +} +type txError = { + @dead("txError.code") code: int, // -32000 = always failing tx ; 4001 = Rejected by signer. + message: string, + @dead("txError.stack") stack: option, +} + +type abi + +let makeAbi = (abiArray: array): abi => abiArray->Obj.magic + +type ethersBigNumber + +module BigNumber = { + type t = ethersBigNumber + + @scope("ethers.BigNumber") @val + external fromUnsafe: string => t = "from" + @scope("ethers.BigNumber") @val + external fromInt: int => t = "from" + + @send external add: (t, t) => t = "add" + @send external sub: (t, t) => t = "sub" + @send external mul: (t, t) => t = "mul" + @send external div: (t, t) => t = "div" + @send external mod: (t, t) => t = "mod" + @send external pow: (t, t) => t = "pow" + @send external abs: t => t = "abs" + + @send external gt: (t, t) => bool = "gt" + @send external gte: (t, t) => bool = "gte" + @send external lt: (t, t) => bool = "lt" + @send external lte: (t, t) => bool = "lte" + @send external eq: (t, t) => bool = "eq" + + @send external toString: t => string = "toString" + + @send external toNumber: t => int = "toNumber" + @send external toNumberFloat: t => float = "toNumber" +} + +type providerType + +@send +external waitForTransaction: (providerType, string) => JsPromise.t = "waitForTransaction" + +type walletType = {address: ethAddress, provider: providerType} + +module Wallet = { + type t = walletType + + @new @scope("ethers") + external makePrivKeyWallet: (string, providerType) => t = "Wallet" + + @val @scope(("ethers", "Wallet")) + external createRandom: unit => t = "createRandom" + + type rawSignature + @send + external signMessage: (t, string) => JsPromise.t = "signMessage" + + @send external getBalance: t => JsPromise.t = "getBalance" + + type sendParams = { + to_: ethAddress, + value: BigNumber.t, + } + @send + external sendTransaction: (t, sendParams) => JsPromise.t = "sendTransaction" +} + +@val @scope("ethers") +external getSigners: unit => JsPromise.t> = "getSigners" + +module Providers = { + type t = providerType + + @new @scope("ethers") @scope("providers") + external makeProvider: string => t = "JsonRpcProvider" + + @send external getBalance: (t, ethAddress) => JsPromise.t> = "getBalance" + @send + external getSigner: (t, ethAddress) => option = "getSigner" +} + +type providerOrSigner = + | Provider(Providers.t) + | Signer(Wallet.t) + +module Contract = { + type t + + type txOptions = { + @live gasLimit: option, + @live value: BigNumber.t, + } + + type tx = { + hash: txHash, + wait: (. unit) => JsPromise.t, + } + + @new @scope("ethers") + external getContractSigner: (ethAddress, abi, Wallet.t) => t = "Contract" + @new @scope("ethers") + external getContractProvider: (ethAddress, abi, Providers.t) => t = "Contract" + + let make: (ethAddress, abi, providerOrSigner) => t = (address, abi, providerSigner) => { + switch providerSigner { + | Provider(provider) => getContractProvider(address, abi, provider) + | Signer(signer) => getContractSigner(address, abi, signer) + } + } +} + +module Utils = { + type ethUnit = [ + | #wei + | #kwei + | #mwei + | #gwei + | #microether + | #milliether + | #ether + | #kether + | #mether + | #geher + | #tether + ] + @scope("ethers.utils") @val + external parseUnitsUnsafe: (. string, ethUnit) => BigNumber.t = "parseUnits" + let parseUnits = (~amount, ~unit) => Misc.unsafeToOption(() => parseUnitsUnsafe(. amount, unit)) + + let parseEther = (~amount) => parseUnits(~amount, ~unit=#ether) + let parseEtherUnsafe = (~amount) => parseUnitsUnsafe(. amount, #ether) + + @scope("ethers.utils") @val + external getAddressUnsafe: string => ethAddress = "getAddress" + let getAddress: string => option = addressString => + Misc.unsafeToOption(() => getAddressUnsafe(addressString)) + + @scope("ethers.utils") @val + external formatUnits: (. BigNumber.t, ethUnit) => string = "formatUnits" + + let formatEther = formatUnits(. _, #ether) + + let formatEtherToPrecision = (number, digits) => { + let digitMultiplier = Js.Math.pow_float(~base=10.0, ~exp=digits->Float.fromInt) + number + ->formatEther + ->Float.fromString + ->Option.getExn + ->(x => x *. digitMultiplier) + ->Js.Math.floor_float + ->(x => x /. digitMultiplier) + ->Float.toString + } + + let ethAdrToStr: ethAddress => string = Obj.magic + let ethAdrToLowerStr: ethAddress => string = address => + address->ethAdrToStr->Js.String.toLowerCase +} diff --git a/test/bindings/mocha/Mocha.res b/test/bindings/mocha/Mocha.res new file mode 100644 index 0000000..17ec28f --- /dev/null +++ b/test/bindings/mocha/Mocha.res @@ -0,0 +1,19 @@ +@val +external describe: (string, @uncurry (unit => unit)) => unit = "describe" +@val +external describe_skip: (string, @uncurry (unit => unit)) => unit = "describe.skip" +@val +external describe_only: (string, @uncurry (unit => unit)) => unit = "describe.only" + +// Why we use uncurry here: https://rescript-lang.org/docs/manual/latest/bind-to-js-function#extra-solution +// TLDR: then we don't need to use the `.` for uncurrying (https://rescript-lang.org/docs/manual/latest/function#uncurried-function) +@val +external it: (string, @uncurry (unit => 'unitOrPromiseReturnBasedOnTest)) => unit = "it" +@val +external it_only: (string, @uncurry (unit => 'unitOrPromiseReturnBasedOnTest)) => unit = "it.only" +@val +external it_skip: (string, @uncurry (unit => 'unitOrPromiseReturnBasedOnTest)) => unit = "it.skip" +@val +external before_each: (@uncurry (unit => 'unitOrPromiseReturnBasedOnTest)) => unit = "beforeEach" +@val +external before: (@uncurry (unit => 'unitOrPromiseReturnBasedOnTest)) => unit = "before" diff --git a/test/library/Config.res b/test/library/Config.res new file mode 100644 index 0000000..ee2aa00 --- /dev/null +++ b/test/library/Config.res @@ -0,0 +1,23 @@ +@module("dotenv") external configEnv: unit => unit = "config" + +configEnv() + +@val +external optRunValueSimulations: option = "process.env.RUN_VALUE_SIMULATIONS" +let runValueSimulations = + optRunValueSimulations->Option.getWithDefault("false")->Js.String2.toLowerCase == "true" + +@val +external optDontRunIntegrationTests: option = "process.env.DONT_RUN_INTEGRATION_TESTS" +let dontRunIntegrationTests = + optDontRunIntegrationTests->Option.getWithDefault("false")->Js.String2.toLowerCase == "true" + +@val +external optDontRunUnitTests: option = "process.env.DONT_RUN_UNIT_TESTS" +let dontRunUnitTests = + optDontRunUnitTests->Option.getWithDefault("false")->Js.String2.toLowerCase == "true" + +// The CI flag is set to true by defualt inside gh-actions: https://github.blog/changelog/2020-04-15-github-actions-sets-the-ci-environment-variable-to-true/ +@val +external optIsCI: option = "process.env.CI" +let isCI = optIsCI->Option.getWithDefault("false")->Js.String2.toLowerCase == "true" diff --git a/test/library/Contract.re b/test/library/Contract.re new file mode 100644 index 0000000..3dd4c3c --- /dev/null +++ b/test/library/Contract.re @@ -0,0 +1,102 @@ +open ContractHelpers; +open Globals; +open LetOps; + +module PaymentTokenHelpers = { + let mintAndApprove = + ( + t: ERC20Mock.t, + ~user: Ethers.Wallet.t, + ~amount: Ethers.BigNumber.t, + ~spender: Ethers.ethAddress, + ) => + t + ->ERC20Mock.mint(~amount, ~_to=user.address) + ->JsPromise.then_(_ => { + t->connect(~address=user)->ERC20Mock.approve(~amount, ~spender) + }); +}; + +module DataFetchers = { + let marketIndexOfSynth = + (longShort: LongShort.t, ~syntheticToken: SyntheticToken.t) + : JsPromise.t(int) => + longShort + ->LongShort.staker + ->JsPromise.then_(Staker.at) + ->JsPromise.then_(Staker.marketIndexOfToken(_, syntheticToken.address)); +}; + +module LongShortHelpers = { + type marketBalance = { + longValue: Ethers.BigNumber.t, + shortValue: Ethers.BigNumber.t, + }; + let getMarketBalance = (longShort, ~marketIndex) => { + let%AwaitThen longValue = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + true /*long*/, + ); + let%Await shortValue = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + false /*short*/, + ); + {longValue, shortValue}; + }; + let getSyntheticTokenPrice = (longShort, ~marketIndex, ~isLong) => { + let%AwaitThen syntheticTokenAddress = + longShort->LongShort.syntheticTokens(marketIndex, isLong); + let%AwaitThen synthContract = + ContractHelpers.attachToContract( + "SyntheticToken", + ~contractAddress=syntheticTokenAddress, + ); + let%AwaitThen totalSupply = + synthContract->Obj.magic->SyntheticToken.totalSupply; + + let%Await marketSideValueInPaymentToken = + longShort->LongShort.marketSideValueInPaymentToken(marketIndex, isLong); + + let syntheticTokenPrice = + marketSideValueInPaymentToken + ->mul(CONSTANTS.tenToThe18) + ->div(totalSupply); + + syntheticTokenPrice; + }; + let calcSyntheticTokenPrice = (~amountPaymentToken, ~amountSyntheticToken) => { + amountPaymentToken->mul(CONSTANTS.tenToThe18)->div(amountSyntheticToken); + }; + let calcAmountPaymentToken = (~amountSyntheticToken, ~price) => { + amountSyntheticToken->mul(price)->div(CONSTANTS.tenToThe18); + }; + let calcAmountSyntheticToken = (~amountPaymentToken, ~price) => { + amountPaymentToken->mul(CONSTANTS.tenToThe18)->div(price); + }; + let calcEquivalentAmountSyntheticTokensOnTargetSide = + (~amountSyntheticTokenOriginSide, ~priceOriginSide, ~priceTargetSide) => { + amountSyntheticTokenOriginSide + ->mul(priceOriginSide) + ->div(priceTargetSide); + }; +}; + +module SyntheticTokenHelpers = { + let getIsLong = syntheticToken => { + let%Await isLong = syntheticToken->SyntheticToken.isLong; + isLong == true /*long*/; + }; +}; + +module YieldManagerAaveHelpers = { + type contractsType = { + . + "aToken": ERC20MockSmocked.t, + "yieldManagerAave": YieldManagerAave.t, + "paymentToken": ERC20MockSmocked.t, + "treasury": Ethers.Wallet.t, + "aaveIncentivesController": AaveIncentivesControllerMockSmocked.t, + }; +}; diff --git a/test/library/ContractHelpers.res b/test/library/ContractHelpers.res new file mode 100644 index 0000000..dc9b566 --- /dev/null +++ b/test/library/ContractHelpers.res @@ -0,0 +1,237 @@ +type contractFactory +type t + +type bytes4 +type bytes32 +type tuple // used by some open-zeppelin contracts +type transaction = unit // TODO: make this better + +@val @scope("ethers") +external getContractFactory: string => JsPromise.t = "getContractFactory" +@send +external attachAtAddress: (contractFactory, ~contractAddress: Ethers.ethAddress) => JsPromise.t = + "attach" +@send external deploy: contractFactory => JsPromise.t = "deploy" +@send external deploy1: (contractFactory, 'a) => JsPromise.t = "deploy" +@send external deploy2: (contractFactory, 'a, 'b) => JsPromise.t = "deploy" +@send external deploy3: (contractFactory, 'a, 'b, 'c) => JsPromise.t = "deploy" +@send external deploy4: (contractFactory, 'a, 'b, 'c, 'd) => JsPromise.t = "deploy" +@send external deploy5: (contractFactory, 'a, 'b, 'c, 'd, 'e) => JsPromise.t = "deploy" +@send external deploy6: (contractFactory, 'a, 'b, 'c, 'd, 'e, 'f) => JsPromise.t = "deploy" +@send external deploy7: (contractFactory, 'a, 'b, 'c, 'd, 'e, 'f, 'g) => JsPromise.t = "deploy" +@send +external deploy8: (contractFactory, 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h) => JsPromise.t = "deploy" + +@send external deployed: t => JsPromise.t = "deployed" + +let attachToContract = (contractName, ~contractAddress) => { + getContractFactory(contractName)->JsPromise.then(attachAtAddress(~contractAddress)) +} +let deployContract0 = contractName => { + getContractFactory(contractName)->JsPromise.then(deploy)->JsPromise.then(deployed) +} +let deployContract1 = (contractName, firstParam) => { + getContractFactory(contractName)->JsPromise.then(deploy1(_, firstParam))->JsPromise.then(deployed) +} +let deployContract2 = (contractName, firstParam, secondParam) => { + getContractFactory(contractName) + ->JsPromise.then(deploy2(_, firstParam, secondParam)) + ->JsPromise.then(deployed) +} +let deployContract3 = (contractName, firstParam, secondParam, thirdParam) => { + getContractFactory(contractName) + ->JsPromise.then(deploy3(_, firstParam, secondParam, thirdParam)) + ->JsPromise.then(deployed) +} +let deployContract4 = (contractName, firstParam, secondParam, thirdParam, fourthParam) => { + getContractFactory(contractName) + ->JsPromise.then(deploy4(_, firstParam, secondParam, thirdParam, fourthParam)) + ->JsPromise.then(deployed) +} +let deployContract5 = ( + contractName, + firstParam, + secondParam, + thirdParam, + fourthParam, + fifthParam, +) => { + getContractFactory(contractName) + ->JsPromise.then(deploy5(_, firstParam, secondParam, thirdParam, fourthParam, fifthParam)) + ->JsPromise.then(deployed) +} +let deployContract6 = ( + contractName, + firstParam, + secondParam, + thirdParam, + fourthParam, + fifthParam, + sixthParam, +) => { + getContractFactory(contractName) + ->JsPromise.then( + deploy6(_, firstParam, secondParam, thirdParam, fourthParam, fifthParam, sixthParam), + ) + ->JsPromise.then(deployed) +} +let deployContract7 = ( + contractName, + firstParam, + secondParam, + thirdParam, + fourthParam, + fifthParam, + sixthParam, + seventhParam, +) => { + getContractFactory(contractName) + ->JsPromise.then( + deploy7( + _, + firstParam, + secondParam, + thirdParam, + fourthParam, + fifthParam, + sixthParam, + seventhParam, + ), + ) + ->JsPromise.then(deployed) +} + +let deployContract8 = ( + contractName, + firstParam, + secondParam, + thirdParam, + fourthParam, + fifthParam, + sixthParam, + seventhParam, + eighthParam, +) => { + getContractFactory(contractName) + ->JsPromise.then( + deploy8( + _, + firstParam, + secondParam, + thirdParam, + fourthParam, + fifthParam, + sixthParam, + seventhParam, + eighthParam, + ), + ) + ->JsPromise.then(deployed) +} +let deployMockContract0 = contractName => { + SmockGeneral.getMockContractFactory(contractName) + ->JsPromise.then(deploy) + ->JsPromise.then(deployed) +} +let deployMockContract1 = (contractName, firstParam) => { + SmockGeneral.getMockContractFactory(contractName) + ->JsPromise.then(deploy1(_, firstParam)) + ->JsPromise.then(deployed) +} +let deployMockContract2 = (contractName, firstParam, secondParam) => { + SmockGeneral.getMockContractFactory(contractName) + ->JsPromise.then(deploy2(_, firstParam, secondParam)) + ->JsPromise.then(deployed) +} +let deployMockContract3 = (contractName, firstParam, secondParam, thirdParam) => { + SmockGeneral.getMockContractFactory(contractName) + ->JsPromise.then(deploy3(_, firstParam, secondParam, thirdParam)) + ->JsPromise.then(deployed) +} +let deployMockContract4 = (contractName, firstParam, secondParam, thirdParam, fourthParam) => { + SmockGeneral.getMockContractFactory(contractName) + ->JsPromise.then(deploy4(_, firstParam, secondParam, thirdParam, fourthParam)) + ->JsPromise.then(deployed) +} +let deployMockContract5 = ( + contractName, + firstParam, + secondParam, + thirdParam, + fourthParam, + fifthParam, +) => { + SmockGeneral.getMockContractFactory(contractName) + ->JsPromise.then(deploy5(_, firstParam, secondParam, thirdParam, fourthParam, fifthParam)) + ->JsPromise.then(deployed) +} +let deployMockContract6 = ( + contractName, + firstParam, + secondParam, + thirdParam, + fourthParam, + fifthParam, + sixthParam, +) => { + SmockGeneral.getMockContractFactory(contractName) + ->JsPromise.then( + deploy6(_, firstParam, secondParam, thirdParam, fourthParam, fifthParam, sixthParam), + ) + ->JsPromise.then(deployed) +} +let deployMockContract7 = ( + contractName, + firstParam, + secondParam, + thirdParam, + fourthParam, + fifthParam, + sixthParam, + seventhParam, +) => { + SmockGeneral.getMockContractFactory(contractName) + ->JsPromise.then( + deploy7( + _, + firstParam, + secondParam, + thirdParam, + fourthParam, + fifthParam, + sixthParam, + seventhParam, + ), + ) + ->JsPromise.then(deployed) +} + +let deployMockContract8 = ( + contractName, + firstParam, + secondParam, + thirdParam, + fourthParam, + fifthParam, + sixthParam, + seventhParam, + eighthParam, +) => { + SmockGeneral.getMockContractFactory(contractName) + ->JsPromise.then( + deploy8( + _, + firstParam, + secondParam, + thirdParam, + fourthParam, + fifthParam, + sixthParam, + seventhParam, + eighthParam, + ), + ) + ->JsPromise.then(deployed) +} + +@send external connect: ('contract, ~address: Ethers.Wallet.t) => 'contract = "connect" diff --git a/test/library/Globals.re b/test/library/Globals.re new file mode 100644 index 0000000..6ee109c --- /dev/null +++ b/test/library/Globals.re @@ -0,0 +1,70 @@ +open LetOps; +open Mocha; + +let before_once' = fn => { + let ranRef = ref(false); + before_each(() => + if (ranRef^) { + ()->JsPromise.resolve; + } else { + let%Await _ = fn(); + ranRef := true; + } + ); +}; + +let ( + add, + sub, + pow, + bnFromString, + bnFromInt, + mul, + div, + bnToString, + bnToInt, + bnGt, + bnGte, + bnLt, +) = + Ethers.BigNumber.( + add, + sub, + pow, + fromUnsafe, + fromInt, + mul, + div, + toString, + toNumber, + gt, + gte, + lt, + ); + +let bnMin = (a, b) => a->bnGt(b) ? b : a; + +let (zeroBn, twoBn, oneBn, tenToThe18) = + CONSTANTS.(zeroBn, twoBn, oneBn, tenToThe18); + +let describeIntegration = + Config.dontRunIntegrationTests ? describe_skip : describe; + +let describeUnit = Config.dontRunUnitTests ? describe_skip : describe; + +// Some tests should be counted towards the integration test code-coverage - but are really unit tests. For those tests use the bellow +let describeBoth = + if (Config.isCI) { + // In CI it is only run as an integration test + // this doesn't really matter - if integration tests are slower than unit tests, rather make this run as a unit test + if (Config.dontRunIntegrationTests) {describe_skip} else { + describe + }; + } else { + describe; + }; + +let sleep = (~timeMs) => + Js.Promise.make((~resolve, ~reject as _) => + Js.Global.setTimeout(() => resolve(. ()->Obj.magic), timeMs)->ignore + ); diff --git a/test/library/HelperActions.re b/test/library/HelperActions.re new file mode 100644 index 0000000..381bf8e --- /dev/null +++ b/test/library/HelperActions.re @@ -0,0 +1,231 @@ +open LetOps; +open Contract; +open Globals; + +let mintDirect = + ( + ~marketIndex, + ~amount, + ~token, + ~user: Ethers.Wallet.t, + ~longShort: LongShort.t, + ~oracleManagerMock: OracleManagerMock.t, + ~isLong: bool, + ) => { + let%AwaitThen _ = + token->Contract.PaymentTokenHelpers.mintAndApprove( + ~amount, + ~user, + ~spender=longShort.address, + ); + let contract = longShort->ContractHelpers.connect(~address=user); + let%AwaitThen currentOraclePrice = + oracleManagerMock->OracleManagerMock.getLatestPrice; + let tempOraclePrice = currentOraclePrice->add(bnFromInt(1)); + let _ = + oracleManagerMock->OracleManagerMock.setPrice(~newPrice=tempOraclePrice); + let%AwaitThen _ = contract->LongShort.updateSystemState(~marketIndex); + let%AwaitThen _mintNextPrice = + if (isLong) { + contract->LongShort.mintLongNextPrice(~marketIndex, ~amount); + } else { + contract->LongShort.mintShortNextPrice(~marketIndex, ~amount); + }; + // NOTE: this code changes the oracle price then resets it back to the original value which should the same value (for the sake of simplicity in the tests) + let _ = + oracleManagerMock->OracleManagerMock.setPrice( + ~newPrice=currentOraclePrice, + ); + contract->LongShort.updateSystemState(~marketIndex); +}; +let mintAndStakeDirect = + ( + ~marketIndex, + ~amount, + ~token, + ~user: Ethers.Wallet.t, + ~longShort: LongShort.t, + ~oracleManagerMock: OracleManagerMock.t, + ~syntheticToken: SyntheticToken.t, + ) => { + let%AwaitThen isLong = + syntheticToken->Contract.SyntheticTokenHelpers.getIsLong; + let%AwaitThen balanceBeforeMinting = + syntheticToken->SyntheticToken.balanceOf(~account=user.address); + let%AwaitThen _mintDirect = + mintDirect( + ~marketIndex, + ~amount, + ~token, + ~user, + ~longShort, + ~oracleManagerMock, + ~isLong, + ); + let%AwaitThen availableToStakeAfter = + syntheticToken->SyntheticToken.balanceOf(~account=user.address); + let amountToStake = availableToStakeAfter->sub(balanceBeforeMinting); + let syntheticTokenConnected = + syntheticToken->ContractHelpers.connect(~address=user); + syntheticTokenConnected->SyntheticToken.stake(~amount=amountToStake); +}; + +type randomStakeInfo = { + marketIndex: int, + synth: SyntheticToken.t, + amount: Ethers.BigNumber.t, + priceOfSynthForAction: Ethers.BigNumber.t, + valueInEntrySide: Ethers.BigNumber.t, + valueInOtherSide: Ethers.BigNumber.t, +}; +let stakeRandomlyInMarkets = + ( + ~marketsToStakeIn: array(Helpers.markets), + ~userToStakeWith: Ethers.Wallet.t, + ~longShort: LongShort.t, + ) => + [|marketsToStakeIn->Array.getUnsafe(0)|] + ->Belt.Array.reduce( + JsPromise.resolve(([||], [||])), + ( + currentValues, + {paymentToken, longSynth, shortSynth, marketIndex, oracleManager}, + ) => { + let%AwaitThen (synthsUserHasStakedIn, marketsUserHasStakedIn) = currentValues; + let mintStake = + mintAndStakeDirect( + ~marketIndex, + ~token=paymentToken, + ~user=userToStakeWith, + ~longShort, + ~oracleManagerMock=oracleManager, + ); + + let%AwaitThen { + longValue: valueLongBefore, + shortValue: valueShortBefore, + } = + longShort->LongShortHelpers.getMarketBalance(~marketIndex); + + let%Await newSynthsUserHasStakedIn = + switch (Helpers.randomMintLongShort()) { + | Long(amount) => + let%AwaitThen _ = mintStake(~syntheticToken=longSynth, ~amount); + let%Await longTokenPrice = + longShort->LongShortHelpers.getSyntheticTokenPrice( + ~marketIndex, + ~isLong=true, + ); + + synthsUserHasStakedIn->Array.concat([| + { + marketIndex, + synth: longSynth, + amount, + priceOfSynthForAction: longTokenPrice, + valueInEntrySide: valueLongBefore, + valueInOtherSide: valueShortBefore, + }, + |]); + | Short(amount) => + let%AwaitThen _ = mintStake(~syntheticToken=shortSynth, ~amount); + let%Await shortTokenPrice = + longShort->LongShortHelpers.getSyntheticTokenPrice( + ~marketIndex, + ~isLong=false, + ); + synthsUserHasStakedIn->Array.concat([| + { + marketIndex, + synth: shortSynth, + amount, + priceOfSynthForAction: shortTokenPrice, + valueInOtherSide: valueLongBefore, + valueInEntrySide: valueShortBefore, + }, + |]); + | Both(longAmount, shortAmount) => + let%AwaitThen _ = + mintStake(~syntheticToken=longSynth, ~amount=longAmount); + let%AwaitThen longTokenPrice = + longShort->LongShortHelpers.getSyntheticTokenPrice( + ~marketIndex, + ~isLong=true, + ); + let newSynthsUserHasStakedIn = + synthsUserHasStakedIn->Array.concat([| + { + marketIndex, + synth: longSynth, + amount: longAmount, + priceOfSynthForAction: longTokenPrice, + valueInEntrySide: valueLongBefore, + valueInOtherSide: valueShortBefore, + }, + |]); + let%AwaitThen { + longValue: valueLongBefore, + shortValue: valueShortBefore, + } = + longShort->LongShortHelpers.getMarketBalance(~marketIndex); + let%AwaitThen _ = + mintStake(~syntheticToken=shortSynth, ~amount=shortAmount); + let%Await shortTokenPrice = + longShort->LongShortHelpers.getSyntheticTokenPrice( + ~marketIndex, + ~isLong=false, + ); + newSynthsUserHasStakedIn->Array.concat([| + { + marketIndex, + synth: shortSynth, + amount: shortAmount, + priceOfSynthForAction: shortTokenPrice, + valueInOtherSide: valueLongBefore, + valueInEntrySide: valueShortBefore, + }, + |]); + }; + + ( + newSynthsUserHasStakedIn, + marketsUserHasStakedIn->Array.concat([|marketIndex|]), + ); + }, + ); + +let stakeRandomlyInBothSidesOfMarket = + ( + ~marketsToStakeIn: array(Helpers.markets), + ~userToStakeWith: Ethers.Wallet.t, + ~longShort: LongShort.t, + ) => + marketsToStakeIn->Belt.Array.reduce( + JsPromise.resolve(), + ( + prevPromise, + {paymentToken, marketIndex, longSynth, shortSynth, oracleManager}, + ) => { + let%AwaitThen _ = prevPromise; + + let mintStake = + mintAndStakeDirect( + ~marketIndex, + ~token=paymentToken, + ~user=userToStakeWith, + ~longShort, + ~oracleManagerMock=oracleManager, + ); + let%AwaitThen _ = + mintStake( + ~syntheticToken=longSynth, + ~amount=Helpers.randomTokenAmount(), + ); + let%Await _ = + mintStake( + ~syntheticToken=shortSynth, + ~amount=Helpers.randomTokenAmount(), + ); + (); + }, + ); diff --git a/test/library/Helpers.res b/test/library/Helpers.res new file mode 100644 index 0000000..9062af9 --- /dev/null +++ b/test/library/Helpers.res @@ -0,0 +1,377 @@ +open Globals +type markets = { + paymentToken: ERC20Mock.t, + oracleManager: OracleManagerMock.t, + yieldManager: YieldManagerMock.t, + longSynth: SyntheticToken.t, + shortSynth: SyntheticToken.t, + marketIndex: int, +} +type coreContracts = { + floatCapital_v0: FloatCapital_v0.t, + tokenFactory: TokenFactory.t, + treasury: Treasury_v0.t, + floatToken: FloatToken.t, + staker: Staker.t, + longShort: LongShort.t, + gems: GEMS.t, + markets: array, +} + +module Tuple = { + let make2 = fn => (fn(), fn()) + let make3 = fn => (fn(), fn(), fn()) + let make4 = fn => (fn(), fn(), fn(), fn()) + let make5 = fn => (fn(), fn(), fn(), fn(), fn()) + let make6 = fn => (fn(), fn(), fn(), fn(), fn(), fn()) + let make7 = fn => (fn(), fn(), fn(), fn(), fn(), fn(), fn()) + let make8 = fn => (fn(), fn(), fn(), fn(), fn(), fn(), fn(), fn()) +} + +@ocaml.doc(`Generates random BigNumber between 1 and 2147483647 (max js int)`) +let randomInteger = () => Js.Math.random_int(1, Js.Int.max)->Ethers.BigNumber.fromInt + +@ocaml.doc(`Generates random BigNumber between x and y`) +let randomBigIntInRange = (x, y) => Js.Math.random_int(x, y)->Ethers.BigNumber.fromInt + +@ocaml.doc(`Generates a random JS integer between 0 and 2147483647 (max js int)`) +let randomJsInteger = () => Js.Math.random_int(0, Js.Int.max) + +let randomRatio1e18 = () => + bnFromString( + Js.Math.random_int(0, 1000000000)->Int.toString ++ + Js.Math.random_int(0, 1000000000)->Int.toString, + ) + +let adjustNumberRandomlyWithinRange = (~basisPointsMin, ~basisPointsMax, number) => { + let numerator = Js.Math.random_int(basisPointsMin, basisPointsMax)->bnFromInt + + number->add(number->mul(numerator)->div(bnFromInt(100000))) +} + +let accessControlErrorMessage = (~address, ~roleBytesStr) => { + "AccessControl: account " ++ + address->Ethers.Utils.ethAdrToLowerStr ++ + " is missing role " ++ + roleBytesStr +} + +let adminRoleBytesString = "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775" +let adminErrorMessage = (~address) => + accessControlErrorMessage(~address, ~roleBytesStr=adminRoleBytesString) + +@ocaml.doc(`Generates random BigNumber between 0.01 and 21474836.47 of a token (10^18 in BigNumber units)`) +let randomTokenAmount = () => + randomInteger()->Ethers.BigNumber.mul(Ethers.BigNumber.fromUnsafe("10000000000000000")) + +type mint = + | Long(Ethers.BigNumber.t) + | Short(Ethers.BigNumber.t) + | Both(Ethers.BigNumber.t, Ethers.BigNumber.t) + +let randomMintLongShort = () => { + switch Js.Math.random_int(0, 3) { + | 0 => Long(randomTokenAmount()) + | 1 => Short(randomTokenAmount()) + | 2 + | _ => + Both(randomTokenAmount(), randomTokenAmount()) + } +} + +let randomAddress = () => Ethers.Wallet.createRandom().address + +let createSyntheticMarket = ( + ~admin, + ~initialMarketSeedForEachMarketSide=CONSTANTS.tenToThe18, + ~paymentToken: ERC20Mock.t, + ~treasury, + ~marketName, + ~marketSymbol, + longShort: LongShort.t, +) => { + JsPromise.all3(( + OracleManagerMock.make(~admin), + YieldManagerMock.make(~longShort=longShort.address, ~token=paymentToken.address, ~treasury), + paymentToken + ->ERC20Mock.mint(~_to=admin, ~amount=initialMarketSeedForEachMarketSide->mul(bnFromInt(100))) + ->JsPromise.then(_ => + paymentToken->ERC20Mock.approve( + ~spender=longShort.address, + ~amount=initialMarketSeedForEachMarketSide->mul(bnFromInt(100)), + ) + ), + ))->JsPromise.then(((oracleManager, yieldManager, _)) => { + let _ignorePromise = + paymentToken + ->ERC20Mock.mINTER_ROLE + ->JsPromise.map(minterRole => + paymentToken->ERC20Mock.grantRole(~role=minterRole, ~account=yieldManager.address) + ) + longShort + ->LongShort.createNewSyntheticMarket( + ~syntheticName=marketName, + ~syntheticSymbol=marketSymbol, + ~paymentToken=paymentToken.address, + ~oracleManager=oracleManager.address, + ~yieldManager=yieldManager.address, + ) + ->JsPromise.then(_ => longShort->LongShort.latestMarket) + ->JsPromise.then(marketIndex => { + longShort->LongShort.initializeMarket( + ~marketIndex, + ~kInitialMultiplier=CONSTANTS.tenToThe18, + ~kPeriod=Ethers.BigNumber.fromInt(0), + ~unstakeFee_e18=Ethers.BigNumber.fromInt(50), + ~initialMarketSeedForEachMarketSide, + ~balanceIncentiveCurve_exponent=bnFromInt(5), + ~balanceIncentiveCurve_equilibriumOffset=bnFromInt(0), + ~marketTreasurySplitGradient_e18=bnFromInt(1), + ~marketLeverage=CONSTANTS.tenToThe18, + ) + }) + }) +} + +let getAllMarkets = longShort => { + longShort + ->LongShort.latestMarket + ->JsPromise.then(nextMarketIndex => { + let marketIndex = nextMarketIndex + + Belt.Array.range(1, marketIndex) + ->Array.map(marketIndex => + JsPromise.all5(( + longShort + ->LongShort.syntheticTokens(marketIndex, true /* long */) + ->JsPromise.then(SyntheticToken.at), + longShort + ->LongShort.syntheticTokens(marketIndex, false /* short */) + ->JsPromise.then(SyntheticToken.at), + longShort->LongShort.paymentTokens(marketIndex)->JsPromise.then(ERC20Mock.at), + longShort->LongShort.oracleManagers(marketIndex)->JsPromise.then(OracleManagerMock.at), + longShort->LongShort.yieldManagers(marketIndex)->JsPromise.then(YieldManagerMock.at), + ))->JsPromise.map(((longSynth, shortSynth, paymentToken, oracleManager, yieldManager)) => { + { + paymentToken: paymentToken, + oracleManager: oracleManager, + yieldManager: yieldManager, + longSynth: longSynth, + shortSynth: shortSynth, + marketIndex: marketIndex, + } + }) + ) + ->JsPromise.all + }) +} + +let initialize = (~admin: Ethers.Wallet.t, ~exposeInternals: bool) => { + JsPromise.all7(( + FloatCapital_v0.make(), + Treasury_v0.make(), + FloatToken.make(), + exposeInternals ? Staker.Exposed.make() : Staker.make(), + exposeInternals ? LongShort.Exposed.make() : LongShort.make(), + JsPromise.all2(( + ERC20Mock.make(~name="Pay Token 1", ~symbol="PT1"), + ERC20Mock.make(~name="Pay Token 2", ~symbol="PT2"), + )), + GEMS.make(), + ))->JsPromise.then((( + floatCapital, + treasury, + floatToken, + staker, + longShort, + (payToken1, payToken2), + gems, + )) => { + TokenFactory.make(~longShort=longShort.address)->JsPromise.then(tokenFactory => { + JsPromise.all5(( + floatToken->FloatToken.initialize( + ~name="Float token", + ~symbol="FLOAT TOKEN", + ~stakerAddress=staker.address, + ), + treasury->Treasury_v0.initialize( + ~admin=admin.address, + ~paymentToken=payToken1.address, + ~floatToken=floatToken.address, + ~longShort=longShort.address, + ), + gems->GEMS.initialize( + ~admin=admin.address, + ~longShort=longShort.address, + ~staker=staker.address, + ), + longShort->LongShort.initialize( + ~admin=admin.address, + ~tokenFactory=tokenFactory.address, + ~staker=staker.address, + ~gems=gems.address, + ), + staker->Staker.initialize( + ~admin=admin.address, + ~longShort=longShort.address, + ~floatToken=floatToken.address, + ~floatCapital=floatCapital.address, + // NOTE: for now using the floatCapital address as the float treasury + ~floatTreasury=floatCapital.address, + // NOTE: for now using the admin address as the discount signer + ~discountSigner=admin.address, + ~floatPercentage=bnFromString("250000000000000000"), + ~gems=gems.address, + ), + )) + ->JsPromise.then(_ => { + [payToken1, payToken1, payToken2, payToken1] + ->Array.reduceWithIndex(JsPromise.resolve(), (previousPromise, paymentToken, index) => { + previousPromise->JsPromise.then(() => + longShort->createSyntheticMarket( + ~admin=admin.address, + ~treasury=treasury.address, + ~paymentToken, + ~marketName=`Test Market ${index->Int.toString}`, + ~marketSymbol=`TM${index->Int.toString}`, + ) + ) + }) + ->JsPromise.then(_ => { + longShort->getAllMarkets + }) + }) + ->JsPromise.map(markets => { + staker: staker, + longShort: longShort, + floatToken: floatToken, + tokenFactory: tokenFactory, + treasury: treasury, + markets: markets, + floatCapital_v0: floatCapital, + gems: gems, + }) + }) + }) +} + +type stakerUnitTestContracts = { + staker: Staker.t, + longShortSmocked: LongShortSmocked.t, + floatTokenSmocked: FloatTokenSmocked.t, + syntheticTokenSmocked: SyntheticTokenSmocked.t, + floatCapitalSmocked: FloatCapital_v0.t, + gems: GEMS.t, +} + +let initializeStakerUnit = () => { + JsPromise.all6(( + Staker.Exposed.makeSmock()->JsPromise.then(staker => { + staker->StakerSmocked.InternalMock.setup->JsPromise.map(_ => staker) + }), + LongShortSmocked.make(), + FloatTokenSmocked.make(), + SyntheticTokenSmocked.make(), + FloatCapital_v0.make(), + GEMS.make(), + ))->JsPromise.then((( + staker, + longShortSmocked, + floatTokenSmocked, + syntheticTokenSmocked, + floatCapitalSmocked, + gems, + )) => + staker + ->Staker.setVariable(~name="longShort", ~value=longShortSmocked.address) + ->JsPromise.map(_ => staker->Staker.setVariable(~name="gems", ~value=gems.address)) + ->JsPromise.map(_ => { + staker: staker, + longShortSmocked: longShortSmocked, + floatTokenSmocked: floatTokenSmocked, + syntheticTokenSmocked: syntheticTokenSmocked, + floatCapitalSmocked: floatCapitalSmocked, + gems: gems, + }) + ) +} + +type longShortUnitTestContracts = { + longShort: LongShort.t, + stakerSmocked: StakerSmocked.t, + floatTokenSmocked: FloatTokenSmocked.t, + syntheticToken1Smocked: SyntheticTokenSmocked.t, + syntheticToken2Smocked: SyntheticTokenSmocked.t, + tokenFactorySmocked: TokenFactorySmocked.t, + yieldManagerSmocked: YieldManagerAaveSmocked.t, + oracleManagerSmocked: OracleManagerMockSmocked.t, +} + +let deployAYieldManager = (~longShort: Ethers.ethAddress, ~lendingPoolAddressesProvider) => { + ERC20Mock.make(~name="Pay Token 1", ~symbol="PT1")->JsPromise.then(paymentToken => + YieldManagerAave.make()->JsPromise.then(manager => + manager + ->YieldManagerAave.initialize( + ~longShort, + ~treasury=randomAddress(), + ~paymentToken=paymentToken.address, + ~aToken=randomAddress(), + ~lendingPoolAddressesProvider, + ~aaveIncentivesController=randomAddress(), + ~aaveReferralCode=0, + ~admin=randomAddress(), + ) + ->JsPromise.map(_ => manager) + ) + ) +} + +let initializeLongShortUnit = () => { + JsPromise.all9(( + LongShort.Exposed.makeSmock()->JsPromise.then(staker => { + staker->LongShortSmocked.InternalMock.setup->JsPromise.map(_ => staker) + }), + StakerSmocked.make(), + FloatTokenSmocked.make(), + SyntheticTokenSmocked.make(), + SyntheticTokenSmocked.make(), + TokenFactorySmocked.make(), + YieldManagerAaveSmocked.make(), + OracleManagerMockSmocked.make(), + GEMS.make(), + ))->JsPromise.map((( + longShort, + stakerSmocked, + floatTokenSmocked, + syntheticToken1Smocked, + syntheticToken2Smocked, + tokenFactorySmocked, + yieldManagerSmocked, + oracleManagerSmocked, + _gems, + )) => { + { + longShort: longShort, + stakerSmocked: stakerSmocked, + floatTokenSmocked: floatTokenSmocked, + yieldManagerSmocked: yieldManagerSmocked, + oracleManagerSmocked: oracleManagerSmocked, + syntheticToken1Smocked: syntheticToken1Smocked, + syntheticToken2Smocked: syntheticToken2Smocked, + tokenFactorySmocked: tokenFactorySmocked, + } + }) +} + +let increaseTime: int => JsPromise.t< + unit, +> = %raw(`(seconds) => ethers.provider.send("evm_increaseTime", [seconds])`) + +type block = {timestamp: int} +let getBlock: unit => JsPromise.t = %raw(`() => ethers.provider.getBlock()`) + +let getRandomTimestampInPast = () => { + getBlock()->JsPromise.then(({timestamp}) => { + (timestamp - Js.Math.random_int(200, 630720000))->Ethers.BigNumber.fromInt->JsPromise.resolve + }) +} diff --git a/test/library/Js.Promise/JsPromise.res b/test/library/Js.Promise/JsPromise.res new file mode 100644 index 0000000..a86d2b9 --- /dev/null +++ b/test/library/Js.Promise/JsPromise.res @@ -0,0 +1,94 @@ +type t<+'a> = Js.Promise.t<'a> + +@new +external make: ((@uncurry (. 'a) => unit, (. 'e) => unit) => unit) => t<'a> = "Promise" + +@val @scope("Promise") +external resolve: 'a => t<'a> = "resolve" + +@send external then: (t<'a>, @uncurry ('a => t<'b>)) => t<'b> = "then" +@send external then_: (t<'a>, @uncurry ('a => t<'b>)) => t<'b> = "then" + +@send external finally: (t<'a>, unit => unit) => t<'a> = "finally" + +@scope("Promise") @val +external reject: exn => t<_> = "reject" + +@scope("Promise") @val +external all: array> => t> = "all" + +@scope("Promise") @val +external all2: ((t<'a>, t<'b>)) => t<('a, 'b)> = "all" + +@scope("Promise") @val +external all3: ((t<'a>, t<'b>, t<'c>)) => t<('a, 'b, 'c)> = "all" + +@scope("Promise") @val +external all4: ((t<'a>, t<'b>, t<'c>, t<'d>)) => t<('a, 'b, 'c, 'd)> = "all" + +@scope("Promise") @val +external all5: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>)) => t<('a, 'b, 'c, 'd, 'e)> = "all" + +@scope("Promise") @val +external all6: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>)) => t<('a, 'b, 'c, 'd, 'e, 'f)> = "all" + +@scope("Promise") @val +external all7: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>, t<'g>)) => t<( + 'a, + 'b, + 'c, + 'd, + 'e, + 'f, + 'g, +)> = "all" + +@scope("Promise") @val +external all8: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>, t<'g>, t<'h>)) => t<( + 'a, + 'b, + 'c, + 'd, + 'e, + 'f, + 'g, + 'h, +)> = "all" + +@scope("Promise") @val +external all9: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>, t<'g>, t<'h>, t<'i>)) => t<( + 'a, + 'b, + 'c, + 'd, + 'e, + 'f, + 'g, + 'h, + 'i, +)> = "all" + +@send +external _catch: (t<'a>, @uncurry (exn => t<'a>)) => t<'a> = "catch" + +let catch = (promise, callback) => { + _catch(promise, err => { + // In future versions, we could use the better version: + callback(Js.Exn.anyToExnInternal(err)) + + // // for now we need to bring our own JsError type + // let v = if Js.Exn.isCamlExceptionOrOpenVariant(err) { + // err + // } else { + // JsError(unsafeToJsExn(err)) + // } + // callback(v) + }) +} + +@scope("Promise") @val +external race: array> => t<'a> = "race" + +// Added utilitys (not in upstream) +@send +external map: (t<'a>, @uncurry ('a => 'b)) => t<'b> = "then" diff --git a/test/library/Js.Promise/JsPromise.resi b/test/library/Js.Promise/JsPromise.resi new file mode 100644 index 0000000..638afcc --- /dev/null +++ b/test/library/Js.Promise/JsPromise.resi @@ -0,0 +1,270 @@ +// The +'a marks the abstract type parameter as covariant, which essentially means that +// a value of type 'a is immutable and may not be used in some mutable context. +// +// This makes sense for promises, since according to their specification, once a promise has +// been resolved (with a specific value), it will never change its resolved value. +// +// More details about polymorphism / invariance / covariance,... can be found here: +// https://caml.inria.fr/pub/docs/manual-ocaml/polymorphism.html#ss:variance:abstract-data-types +type t<+'a> = Js.Promise.t<'a> + +@ocaml.doc(" +[resolve(value)] creates a resolved Promise with a given `value` + +```rescript +let p = Promise.resolve(5) // Promise.t +``` +") +@val +@scope("Promise") +external resolve: 'a => t<'a> = "resolve" + +@scope("Promise") @val +external reject: exn => t<_> = "reject" + +@ocaml.doc(" +[make(callback)] creates a new Promise based on a `callback` that receives two +uncurried functions `resolve` and `reject` for defining the Promise's result. + +```rescript +open Promise + +let n = 4 +Promise.make((resolve, reject) => { + if(n < 5) { + resolve(. \"success\") + } + else { + reject(. \"failed\") + } +}) +->then(str => { + Js.log(str)->resolve +}) +->catch(e => { + Js.log(\"Error occurred\") + resolve() +}) +->ignore +``` +") +@new +external make: ((@uncurry (. 'a) => unit, (. 'e) => unit) => unit) => t<'a> = "Promise" + +@ocaml.doc(" +[catch(promise, errorCallback)] registers an exception handler in a promise chain. +The `errorCallback` receives an `exn` value that can later be refined into a JS error or ReScript +error. The `errorCallback` needs to return a promise with the same type as the consumed promise. + +```rescript +open Promise + +exception SomeError(string) + +reject(SomeError(\"this is an error\")) +->then(_ => { + Ok(\"This result will never be returned\")->resolve +}) +->catch(e => { + let msg = switch(e) { + | SomeError(msg) => \"ReScript error occurred: \" ++ msg + | JsError(obj) => + switch Js.Exn.message(obj) { + | Some(msg) => \"JS exception occurred: \" ++ msg + | None => \"Some other JS value has been thrown\" + } + | _ => \"Unexpected error occurred\" + } + + Error(msg)->resolve +}) +->then(result => { + switch result { + | Ok(r) => Js.log2(\"Operation successful: \", r) + | Error(msg) => Js.log2(\"Operation failed: \", msg) + }->resolve +}) +->ignore // Ignore needed for side-effects +``` + +In case you want to return another promise in your `callback`, +consider using \`then\` instead. +") +let catch: (t<'a>, exn => t<'a>) => t<'a> + +@ocaml.doc(" +[then(promise, callback)] returns a new promise based on the result of `promise`'s value. +The `callback` needs to explicitly return a new promise via `resolve`. + +It is **not allowed** to resolve a nested promise (like `resolve(resolve(1))`). + +```rescript +Promise.resolve(5) +->then(num => { + resolve(num + 5) +}) +->then(num => { + Js.log2(\"Your lucky number is: \", num) + resolve() +}) +->ignore +``` +") +@send +external then: (t<'a>, @uncurry ('a => t<'b>)) => t<'b> = "then" +@send +external then_: (t<'a>, @uncurry ('a => t<'b>)) => t<'b> = "then" + +@ocaml.doc(" +[finally(promise, callback)] is used to execute a function that is called no matter if a promise +was resolved or rejected. It will return the same `promise` it originally received. + +```rescript +exception SomeError(string) +let isDone = ref(false) + +resolve(5) +->then(_ => { + reject(TestError(\"test\")) +}) +->then(v => { + Js.log2(\"final result\", v) + resolve() +}) +->catch(_ => { + Js.log(\"Error handled\") + resolve() +}) +->finally(() => { + Js.log(\"finally\") + isDone := true +}) +->then(() => { + Js.log2(\"isDone:\", isDone.contents) + resolve() +}) +->ignore +``` +") +@send +external finally: (t<'a>, unit => unit) => t<'a> = "finally" + +/* Combining promises. */ +@scope("Promise") @val +external race: array> => t<'a> = "race" + +@ocaml.doc(" +[all(promises)] runs all promises in parallel and returns a new promise resolving all gathered results in a unified array. + +```rescript +open Promise +let promises = [resolve(1), resolve(2), resolve(3)] + +all(promises) +->then((results) => { + Belt.Array.forEach(results, (num) => { + Js.log2(\"Number: \", num) + }) + + resolve() +}) +->ignore +``` +") +@scope("Promise") +@val +external all: array> => t> = "all" + +@ocaml.doc(" +[all2((p1, p2))]. Like `all()`, but with a fixed size tuple of 2 +") +@scope("Promise") +@val +external all2: ((t<'a>, t<'b>)) => t<('a, 'b)> = "all" + +@ocaml.doc(" +[all3((p1, p2, p3))]. Like `all()`, but with a fixed size tuple of 3 +") +@scope("Promise") +@val +external all3: ((t<'a>, t<'b>, t<'c>)) => t<('a, 'b, 'c)> = "all" + +@ocaml.doc(" +[all4((p1, p2, p3, p4))]. Like `all()`, but with a fixed size tuple of 4 +") +@scope("Promise") +@val +external all4: ((t<'a>, t<'b>, t<'c>, t<'d>)) => t<('a, 'b, 'c, 'd)> = "all" + +@ocaml.doc(" +[all5((p1, p2, p3, p4, p5))]. Like `all()`, but with a fixed size tuple of 5 +") +@scope("Promise") +@val +external all5: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>)) => t<('a, 'b, 'c, 'd, 'e)> = "all" + +@ocaml.doc(" +[all6((p1, p2, p4, p5, p6))]. Like `all()`, but with a fixed size tuple of 6 +") +@scope("Promise") +@val +external all6: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>)) => t<('a, 'b, 'c, 'd, 'e, 'f)> = "all" + +@scope("Promise") @val +external all7: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>, t<'g>)) => t<( + 'a, + 'b, + 'c, + 'd, + 'e, + 'f, + 'g, +)> = "all" + +@scope("Promise") @val +external all8: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>, t<'g>, t<'h>)) => t<( + 'a, + 'b, + 'c, + 'd, + 'e, + 'f, + 'g, + 'h, +)> = "all" + +@scope("Promise") @val +external all9: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>, t<'g>, t<'h>, t<'i>)) => t<( + 'a, + 'b, + 'c, + 'd, + 'e, + 'f, + 'g, + 'h, + 'i, +)> = "all" + +// Added utilitys (not in upstream) +@ocaml.doc(" +[map(promise, callback)] converts an encapsulated value of a promise into +another promise wrapped value. Really useful if you don't want to chain multiple +promise operations together. + +```rescript +resolve(\"Anna\") +->map(str => { + \"Hello \" ++ str +}) +->map(str => { + Js.log(str) +}) +->ignore // Ignore needed for side-effects +``` + +In case you want to return another promise in your `callback`, +consider using \`then\` instead. +") +@send +external map: (t<'a>, @uncurry ('a => 'b)) => t<'b> = "then" diff --git a/test/library/LetOps.re b/test/library/LetOps.re new file mode 100644 index 0000000..db751fe --- /dev/null +++ b/test/library/LetOps.re @@ -0,0 +1,6 @@ +module AwaitThen = { + let let_ = JsPromise.then_; +}; +module Await = { + let let_ = JsPromise.map; +}; diff --git a/test/library/LongShortStateSetters.res b/test/library/LongShortStateSetters.res new file mode 100644 index 0000000..1b89fd6 --- /dev/null +++ b/test/library/LongShortStateSetters.res @@ -0,0 +1,49 @@ +// The type system isn't very happy here, but it seems to work for now (even if it is fragile) +let createValueAtKey = %raw(`(key, value) => { + let result = {} + result[key] = value + return result +}`) + +let turnOffMocking = longShort => { + longShort->LongShort.setVariable(~name="shouldUseMock", ~value=false) +} + +let setAssetPrice = (longShort, ~marketIndex: int, ~assetPrice: Ethers.BigNumber.t) => { + longShort->LongShort.setVariable( + ~name="assetPrice", + ~value=createValueAtKey(marketIndex, assetPrice), + ) +} + +let setMarketUpdateIndex = ( + longShort, + ~marketIndex: int, + ~marketUpdateIndex: Ethers.BigNumber.t, +) => { + longShort->LongShort.setVariable( + ~name="marketUpdateIndex", + ~value=createValueAtKey(marketIndex, marketUpdateIndex), + ) +} +let setLatestMarket = (longShort, ~latestMarket: int) => { + longShort->LongShort.setVariable(~name="latestMarket", ~value=latestMarket) +} + +let setYieldManager = (longShort, ~marketIndex: int, ~yieldManager: Ethers.ethAddress) => { + longShort->LongShort.setVariable( + ~name="yieldManagers", + ~value=createValueAtKey(marketIndex, yieldManager), + ) +} + +let setMarketLeverage_e18 = ( + longShort, + ~marketIndex: int, + ~marketLeverage_e18: Ethers.BigNumber.t, +) => { + longShort->LongShort.setVariable( + ~name="marketLeverage_e18", + ~value=createValueAtKey(marketIndex, marketLeverage_e18), + ) +} diff --git a/test/library/MarketSimulation.res b/test/library/MarketSimulation.res new file mode 100644 index 0000000..6738678 --- /dev/null +++ b/test/library/MarketSimulation.res @@ -0,0 +1,68 @@ +let valueChange = (~totalLockedLong, ~totalLockedShort, ~percentageChange) => { + if totalLockedShort->Ethers.BigNumber.gte(totalLockedLong) { + totalLockedLong + ->Ethers.BigNumber.mul(percentageChange) + ->Ethers.BigNumber.div(CONSTANTS.tenToThe18) + } else { + totalLockedShort + ->Ethers.BigNumber.mul(percentageChange) + ->Ethers.BigNumber.div(CONSTANTS.tenToThe18) + } +} +type bothSides = { + totalLockedLong: Ethers.BigNumber.t, + totalLockedShort: Ethers.BigNumber.t, +} + +let simulateMarketPriceChange = (~oldPrice, ~newPrice, ~totalLockedLong, ~totalLockedShort) => { + switch (oldPrice, newPrice) { + | (a, b) if a->Ethers.BigNumber.eq(b) => { + totalLockedLong: totalLockedLong, + totalLockedShort: totalLockedShort, + } + | (oldPrice, newPrice) if oldPrice->Ethers.BigNumber.lt(newPrice) => { + let percentageChange = + newPrice + ->Ethers.BigNumber.sub(oldPrice) + ->Ethers.BigNumber.mul(CONSTANTS.tenToThe18) + ->Ethers.BigNumber.div(oldPrice) + + if percentageChange->Ethers.BigNumber.gte(CONSTANTS.tenToThe18) { + let totalLocked = totalLockedLong->Ethers.BigNumber.add(totalLockedShort) + { + totalLockedLong: totalLocked, + totalLockedShort: CONSTANTS.zeroBn, + } + } else { + let changeInValue = valueChange(~percentageChange, ~totalLockedLong, ~totalLockedShort) + + { + totalLockedLong: totalLockedLong->Ethers.BigNumber.add(changeInValue), + totalLockedShort: totalLockedShort->Ethers.BigNumber.sub(changeInValue), + } + } + } + | (oldPrice, newPrice) => { + let percentageChange = + oldPrice + ->Ethers.BigNumber.sub(newPrice) + ->Ethers.BigNumber.mul(CONSTANTS.tenToThe18) + ->Ethers.BigNumber.div(oldPrice) + if percentageChange->Ethers.BigNumber.gte(CONSTANTS.tenToThe18) { + let totalLocked = totalLockedLong->Ethers.BigNumber.add(totalLockedShort) + + { + totalLockedLong: CONSTANTS.zeroBn, + totalLockedShort: totalLocked, + } + } else { + let changeInValue = valueChange(~percentageChange, ~totalLockedLong, ~totalLockedShort) + + { + totalLockedLong: totalLockedLong->Ethers.BigNumber.sub(changeInValue), + totalLockedShort: totalLockedShort->Ethers.BigNumber.add(changeInValue), + } + } + } + } +} diff --git a/test/library/SmockGeneral.res b/test/library/SmockGeneral.res new file mode 100644 index 0000000..9d8a500 --- /dev/null +++ b/test/library/SmockGeneral.res @@ -0,0 +1,20 @@ +%%raw(` +require("chai").use(require('@defi-wonderland/smock').smock.matchers); +`) + +type expectation +@module("chai") +external expect: 'a => expectation = "expect" + +@send @scope(("to", "have")) +external toHaveCallCount: (expectation, int) => unit = "callCount" + +@module("@defi-wonderland/smock") @scope("smock") +external getMockContractFactory: string => JsPromise.t<'a> = "mock" + +@send +external setVariableRaw: ('smockedContract, ~name: string, ~value: 'a) => JsPromise.t = + "setVariable" + +@send +external reset: 'smartContractFunction => unit = "reset" diff --git a/test/library/StakerStakeSetters.res b/test/library/StakerStakeSetters.res new file mode 100644 index 0000000..175297c --- /dev/null +++ b/test/library/StakerStakeSetters.res @@ -0,0 +1,22 @@ +// The type system isn't very happy here, but it seems to work for now (even if it is fragile) +let createValueAtKey = %raw(`(key, value) => { + let result = {} + result[key] = value + return result +}`) + +let turnOffMocking = staker => { + staker->Staker.setVariable(~name="shouldUseMock", ~value=false) +} + +let setUserIndexOfLastClaimedReward = ( + staker, + ~marketIndex: int, + ~user: Ethers.ethAddress, + ~rewardIndex: Ethers.BigNumber.t, +) => { + staker->Staker.setVariable( + ~name="userIndexOfLastClaimedReward", + ~value=createValueAtKey(marketIndex, createValueAtKey(user, rewardIndex)), + ) +} diff --git a/test/library/Util.res b/test/library/Util.res new file mode 100644 index 0000000..009d66a --- /dev/null +++ b/test/library/Util.res @@ -0,0 +1,13 @@ +let await = %raw(`(asyncFunction) => { + let result = null; + let waiting = true; + asyncFunction().then((asyncResult) => { + result = asyncResult + waiting = false + }) + + while (waiting) { + } + return result +} +`) diff --git a/test/library/contracts/.gitkeep b/test/library/contracts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/test/library/smock/.gitkeep b/test/library/smock/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/test/tests/TestLongShort.re b/test/tests/TestLongShort.re new file mode 100644 index 0000000..af57776 --- /dev/null +++ b/test/tests/TestLongShort.re @@ -0,0 +1,165 @@ +open LetOps; +open Globals; +open Mocha; + +describe("Float System", () => { + describeIntegration("LongShort", () => { + let contracts: ref(Helpers.coreContracts) = ref(None->Obj.magic); + let accounts: ref(array(Ethers.Wallet.t)) = ref(None->Obj.magic); + + before_each(() => { + let%Await loadedAccounts = Ethers.getSigners(); + accounts := loadedAccounts; + + let%AwaitThen deployedContracts = + Helpers.initialize( + ~admin=accounts.contents->Array.getUnsafe(0), + ~exposeInternals=false, + ); + contracts := deployedContracts; + let setupUser = accounts.contents->Array.getUnsafe(2); + + HelperActions.stakeRandomlyInBothSidesOfMarket( + ~marketsToStakeIn=deployedContracts.markets, + ~userToStakeWith=setupUser, + ~longShort=deployedContracts.longShort, + ); + }); + + UpdateSystemState.testIntegration(~contracts, ~accounts); + + MintNextPrice.testIntegration(~contracts, ~accounts); + ShiftNextPrice.testIntegration(~contracts, ~accounts); + RedeemNextPrice.testIntegration(~contracts, ~accounts); + InitializeMarket.testIntegration(~contracts, ~accounts); + }); + + describeBoth("LongShort - Admin functions", () => { + let contracts: ref(Helpers.coreContracts) = ref(None->Obj.magic); + let accounts: ref(array(Ethers.Wallet.t)) = ref(None->Obj.magic); + + before(() => { + let%Await loadedAccounts = Ethers.getSigners(); + accounts := loadedAccounts; + + let%Await deployedContracts = + Helpers.initialize( + ~admin=accounts.contents->Array.getUnsafe(0), + ~exposeInternals=false, + ); + contracts := deployedContracts; + }); + + describe("updateMarketOracle", () => { + let newOracleManager = Ethers.Wallet.createRandom().address; + let marketIndex = 1; + it("should allow admin to update the oracle", () => { + let%Await originalOracleAddress = + contracts.contents.longShort->LongShort.oracleManagers(marketIndex); + let%Await _ = + contracts.contents.longShort + ->LongShort.updateMarketOracle(~marketIndex, ~newOracleManager); + let%Await updatedOracleAddress = + contracts.contents.longShort->LongShort.oracleManagers(marketIndex); + + Chai.addressEqual( + ~otherAddress=updatedOracleAddress, + newOracleManager, + ); + + // Reset for the next tests + let%Await _ = + contracts.contents.longShort + ->LongShort.updateMarketOracle( + ~marketIndex, + ~newOracleManager=originalOracleAddress, + ); + (); + }); + + it("shouldn't allow non admin to update the oracle", () => { + let attackerAddress = accounts.contents->Array.getUnsafe(5); + + Chai.expectRevert( + ~transaction= + contracts.contents.longShort + ->ContractHelpers.connect(~address=attackerAddress) + ->LongShort.updateMarketOracle(~marketIndex, ~newOracleManager), + ~reason=Helpers.adminErrorMessage(~address=attackerAddress.address), + ); + }); + }); + + describe("changeMarketTreasurySplitGradient", () => { + let newGradient = twoBn; + let marketIndex = 1; + + it("should allow admin to update a gradient", () => { + let%Await _ = + contracts.contents.longShort + ->LongShort.changeMarketTreasurySplitGradient( + ~marketIndex, + ~marketTreasurySplitGradient_e18=newGradient, + ); + + let%Await updatedGradient = + contracts.contents.longShort + ->LongShort.marketTreasurySplitGradient_e18(marketIndex); + + Chai.bnEqual(updatedGradient, newGradient); + }); + + it("shouldn't allow non admin to update the treasury address", () => { + let attackerAddress = accounts.contents->Array.getUnsafe(5); + + Chai.expectRevert( + ~transaction= + contracts.contents.longShort + ->ContractHelpers.connect(~address=attackerAddress) + ->LongShort.changeMarketTreasurySplitGradient( + ~marketIndex, + ~marketTreasurySplitGradient_e18=newGradient, + ), + ~reason=Helpers.adminErrorMessage(~address=attackerAddress.address), + ); + }); + }); + }); + + describe("Smocked", () => { + let contracts = ref("NOT INITIALIZED"->Obj.magic); + let accounts = ref("NOT INITIALIZED"->Obj.magic); + + before(() => { + let%Await loadedAccounts = Ethers.getSigners(); + accounts := loadedAccounts; + + let%Await deployedContracts = Helpers.initializeLongShortUnit(); + + contracts := deployedContracts; + }); + describeUnit("Unit tests", () => { + ExecuteOutstandingNextPriceSettlements.testUnit(~contracts, ~accounts); + ExecuteOutstandingNextPriceSettlementsUserMulti.testUnit( + ~contracts, + ~accounts, + ); + ExecuteNextPriceAction.testUnit(~contracts, ~accounts); + PriceCalculationFunctions.testUnit(~contracts, ~accounts); + DepositFunds.testUnit(~contracts, ~accounts); + GetUsersConfirmedButNotSettledBalance.testUnit(~contracts, ~accounts); + InitializeMarket.testUnit(~contracts, ~accounts); + UpdateSystemState.testUnit(~contracts, ~accounts); + ClaimAndDistributeYieldThenRebalanceMarket.testUnit( + ~contracts, + ~accounts, + ); + UtilsHelpers.testUnit(~contracts, ~accounts); + RedeemNextPrice.testUnit(~contracts, ~accounts); + ShiftNextPrice.testUnit(~contracts, ~accounts); + MintNextPrice.testUnit(~contracts, ~accounts); + BatchedSettlement.testUnit(~contracts, ~accounts); + CreateNewSyntheticMarket.testUnit(~contracts, ~accounts); + }); + }); +}); diff --git a/test/tests/TestStake.re b/test/tests/TestStake.re new file mode 100644 index 0000000..f78f733 --- /dev/null +++ b/test/tests/TestStake.re @@ -0,0 +1,137 @@ +open Globals; +open LetOps; +open Mocha; + +describe("Float System", () => { + describeIntegration("Staking", () => { + let contracts: ref(Helpers.coreContracts) = ref(None->Obj.magic); + let accounts: ref(array(Ethers.Wallet.t)) = ref(None->Obj.magic); + + before(() => { + let%Await loadedAccounts = Ethers.getSigners(); + accounts := loadedAccounts; + }); + + before_each(() => { + let%Await deployedContracts = + Helpers.initialize( + ~admin=accounts.contents->Array.getUnsafe(0), + ~exposeInternals=false, + ); + contracts := deployedContracts; + }); + + it( + "should correctly be able to stake their long/short tokens and view their staked amount immediately", + () => { + let {longShort, markets, staker} = contracts.contents; + let testUser = accounts.contents->Array.getUnsafe(1); + + let%Await (synthsUserHasStakedIn, _marketsUserHasStakedIn) = + HelperActions.stakeRandomlyInMarkets( + ~marketsToStakeIn=markets, + ~userToStakeWith=testUser, + ~longShort, + ); + + let%Await _ = + synthsUserHasStakedIn + ->Array.map(({synth, amount, priceOfSynthForAction}) => { + let%Await amountStaked = + staker->Staker.userAmountStaked( + synth.address, + testUser.address, + ); + + let expectedStakeAmount = + amount + ->mul(CONSTANTS.tenToThe18) + ->div(priceOfSynthForAction); + + Chai.bnEqual( + ~message="amount staked is greater than expected", + amountStaked, + expectedStakeAmount, + ); + }) + ->JsPromise.all; + (); + }, + ); + + it("should update correct markets in the 'claimFloatCustom' function", () => { + let {longShort, markets, staker} = contracts.contents; + let testUser = accounts.contents->Array.getUnsafe(1); + let setupUser = accounts.contents->Array.getUnsafe(2); + + let%Await _ = + HelperActions.stakeRandomlyInBothSidesOfMarket( + ~marketsToStakeIn=contracts^.markets, + ~userToStakeWith=setupUser, + ~longShort=contracts^.longShort, + ); + + let%Await (_synthsUserHasStakedIn, marketsUserHasStakedIn) = + HelperActions.stakeRandomlyInMarkets( + ~marketsToStakeIn=markets, + ~userToStakeWith=testUser, + ~longShort, + ); + + let%Await _ = Helpers.increaseTime(50); + + let%Await _ = + staker + ->ContractHelpers.connect(~address=testUser) + ->Staker.claimFloatCustom(~marketIndexes=marketsUserHasStakedIn); + + let%Await _ = + marketsUserHasStakedIn + ->Array.map(market => { + JsPromise.all2(( + staker->Staker.userIndexOfLastClaimedReward( + market, + testUser.address, + ), + staker->Staker.latestRewardIndex(market), + )) + ->JsPromise.map(((userLastClaimed, latestRewardIndex)) => { + Chai.bnEqual(userLastClaimed, latestRewardIndex) + }) + }) + ->JsPromise.all; + (); + }); + }); + + describe("Smocked", () => { + let contracts = ref("NOT INITIALIZED"->Obj.magic); + let accounts = ref("NOT INITIALIZED"->Obj.magic); + + before(() => { + let%Await loadedAccounts = Ethers.getSigners(); + accounts := loadedAccounts; + + let%Await deployedContracts = Helpers.initializeStakerUnit(); + + contracts := deployedContracts; + }); + describeUnit("Unit tests", () => { + AddNewStakingFund.test(~contracts, ~accounts); + GetKValue.test(~contracts, ~accounts); + CalculateNewCumulativeValue.test(~contracts, ~accounts); + MintFloat.test(~contracts, ~accounts); + MintAccumulatedFloat.test(~contracts, ~accounts); + ClaimFloat.test(~contracts, ~accounts); + StakerAdminFunctions.testUnit(~contracts, ~accounts); + ShiftTokens.testUnit(~contracts, ~accounts); + CalculateAccumulatedFloatInRange.testUnit(~contracts, ~accounts); + ClaimFloatCustom.testUnit(~contracts, ~accounts); + AddNewStateForFloatRewards.testUnit(~contracts, ~accounts); + Withdraw.testUnit(~contracts, ~accounts); + CalculateFloatPerSecond.test(~contracts, ~accounts); + StakerModifiers.testUnit(~contracts, ~accounts); + StakeFromUser.test(~contracts, ~accounts); + }); + }); +}); diff --git a/test/tests/TestYieldManagerAave.re b/test/tests/TestYieldManagerAave.re new file mode 100644 index 0000000..43f36fc --- /dev/null +++ b/test/tests/TestYieldManagerAave.re @@ -0,0 +1,57 @@ +open Globals; +open LetOps; +open Mocha; + +describe("Float System", () => { + let accounts: ref(array(Ethers.Wallet.t)) = ref(None->Obj.magic); + let contracts: ref(Contract.YieldManagerAaveHelpers.contractsType) = + ref(None->Obj.magic); + + let setup = () => { + let%AwaitThen loadedAccounts = Ethers.getSigners(); + accounts := loadedAccounts; + + let treasury = loadedAccounts->Array.getUnsafe(1); + + let longShortAddress = Ethers.Wallet.createRandom().address; + + let%Await paymentTokenSmocked = ERC20MockSmocked.make(); + + let%Await aTokenSmocked = ERC20MockSmocked.make(); + + let%Await aaveIncentivesControllerSmocked = + AaveIncentivesControllerMockSmocked.make(); + let%Await lendingPoolAddressesProviderSmocked = + LendingPoolAddressesProviderMockSmocked.make(); + + let%Await yieldManagerAave = + YieldManagerAave.make(); + + let%Await _ = yieldManagerAave->YieldManagerAave.initialize(~longShort=longShortAddress, + ~treasury=treasury.address, + ~paymentToken=paymentTokenSmocked.address, + ~aToken=aTokenSmocked.address, + ~lendingPoolAddressesProvider= + lendingPoolAddressesProviderSmocked.address, + ~aaveIncentivesController=aaveIncentivesControllerSmocked.address, + ~aaveReferralCode=6543, + ~admin=Helpers.randomAddress()); + + contracts := + { + "aToken": aTokenSmocked, + "yieldManagerAave": yieldManagerAave, + "paymentToken": paymentTokenSmocked, + "treasury": treasury, + "aaveIncentivesController": aaveIncentivesControllerSmocked, + }; + }; + describeUnit("(un-optimised) YieldManagerAave - internals exposed", () => { + before_each(setup) + }); + describeUnit("(optimised) YieldManagerAave - internals exposed ", () => { + before(setup); + + ClaimAaveRewards.testUnit(~contracts); + }); +}); diff --git a/test/tests/longShort/AdjustMarketBasedOnNewAssetPrice.re b/test/tests/longShort/AdjustMarketBasedOnNewAssetPrice.re new file mode 100644 index 0000000..1367900 --- /dev/null +++ b/test/tests/longShort/AdjustMarketBasedOnNewAssetPrice.re @@ -0,0 +1,21 @@ +open Mocha; +open Globals; + +let testUnit = + ( + ~contracts as _: ref(Helpers.coreContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describeUnit("_adjustMarketBasedOnNewAssetPrice", () => { + describe("long pool > short pool", () => { + it("updates the long and short payment token pools correctly", () => + Js.log("TODO") + ) + }); + describe("short pool > long pool", () => { + it("updates the long and short payment token pools correctly", () => + Js.log("TODO") + ) + }); + }); +}; diff --git a/test/tests/longShort/BatchedSettlement.re b/test/tests/longShort/BatchedSettlement.re new file mode 100644 index 0000000..eae0be2 --- /dev/null +++ b/test/tests/longShort/BatchedSettlement.re @@ -0,0 +1,565 @@ +open Mocha; +open Globals; +open LetOps; +open SmockGeneral; + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describeUnit("Batched Settlement", () => { + let marketIndex = Helpers.randomJsInteger(); + describe("_batchConfirmOutstandingPendingActions", () => { + let syntheticTokenPrice_inPaymentTokens_long = + Helpers.randomTokenAmount(); + let syntheticTokenPrice_inPaymentTokens_short = + Helpers.randomTokenAmount(); + + let setup = + ( + ~batched_amountPaymentToken_depositLong, + ~batched_amountPaymentToken_depositShort, + ~batched_amountSyntheticToken_redeemLong, + ~batched_amountSyntheticToken_redeemShort, + ~batchedAmountSyntheticTokenToShiftFromLong, + ~batchedAmountSyntheticTokenToShiftFromShort, + ) => { + let {longShort} = contracts.contents; + let%AwaitThen _ = + longShort->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="_batchConfirmOutstandingPendingActions", + ); + + let%AwaitThen _ = + longShort->LongShort.Exposed.setPerformOutstandingBatchedSettlementsGlobals( + ~marketIndex, + ~batched_amountPaymentToken_depositLong, + ~batched_amountPaymentToken_depositShort, + ~batched_amountSyntheticToken_redeemLong, + ~batched_amountSyntheticToken_redeemShort, + ~batchedAmountSyntheticTokenToShiftFromLong, + ~batchedAmountSyntheticTokenToShiftFromShort, + ); + + longShort->LongShort.Exposed._batchConfirmOutstandingPendingActionsExposedCall( + ~marketIndex, + ~syntheticTokenPrice_inPaymentTokens_long, + ~syntheticTokenPrice_inPaymentTokens_short, + ); + }; + + let runTest = + ( + ~batched_amountPaymentToken_depositLong, + ~batched_amountPaymentToken_depositShort, + ~batched_amountSyntheticToken_redeemLong, + ~batched_amountSyntheticToken_redeemShort, + ~batchedAmountSyntheticTokenToShiftFromLong, + ~batchedAmountSyntheticTokenToShiftFromShort, + ) => { + let batchedAmountSyntheticTokenToMintLong = ref(None->Obj.magic); + let batchedAmountSyntheticTokenToMintShort = ref(None->Obj.magic); + let batchedAmountOfPaymentTokensToBurnLong = ref(None->Obj.magic); + let batchedAmountOfPaymentTokensToBurnShort = ref(None->Obj.magic); + let batchedAmountOfPaymentTokensToShiftToLong = ref(None->Obj.magic); + let batchedAmountOfPaymentTokensToShiftToShort = ref(None->Obj.magic); + let batchedAmountSyntheticTokenToShiftToLong = ref(None->Obj.magic); + let batchedAmountSyntheticTokenToShiftToShort = ref(None->Obj.magic); + let calculatedValueChangeForLong = ref(None->Obj.magic); + let calculatedValueChangeForShort = ref(None->Obj.magic); + let calculatedValueChangeInSynthSupplyLong = ref(None->Obj.magic); + let calculatedValueChangeInSynthSupplyShort = ref(None->Obj.magic); + let returnOfPerformOutstandingBatchedSettlements = + ref(None->Obj.magic); + + before_once'(() => { + let%Await functionCallReturn = + setup( + ~batched_amountPaymentToken_depositLong, + ~batched_amountPaymentToken_depositShort, + ~batched_amountSyntheticToken_redeemLong, + ~batched_amountSyntheticToken_redeemShort, + ~batchedAmountSyntheticTokenToShiftFromLong, + ~batchedAmountSyntheticTokenToShiftFromShort, + ); + + batchedAmountSyntheticTokenToMintLong := + Contract.LongShortHelpers.calcAmountSyntheticToken( + ~amountPaymentToken=batched_amountPaymentToken_depositLong, + ~price=syntheticTokenPrice_inPaymentTokens_long, + ); + batchedAmountSyntheticTokenToMintShort := + Contract.LongShortHelpers.calcAmountSyntheticToken( + ~amountPaymentToken=batched_amountPaymentToken_depositShort, + ~price=syntheticTokenPrice_inPaymentTokens_short, + ); + batchedAmountOfPaymentTokensToBurnLong := + Contract.LongShortHelpers.calcAmountPaymentToken( + ~amountSyntheticToken=batched_amountSyntheticToken_redeemLong, + ~price=syntheticTokenPrice_inPaymentTokens_long, + ); + batchedAmountOfPaymentTokensToBurnShort := + Contract.LongShortHelpers.calcAmountPaymentToken( + ~amountSyntheticToken=batched_amountSyntheticToken_redeemShort, + ~price=syntheticTokenPrice_inPaymentTokens_short, + ); + + batchedAmountOfPaymentTokensToShiftToLong := + Contract.LongShortHelpers.calcAmountPaymentToken( + ~amountSyntheticToken=batchedAmountSyntheticTokenToShiftFromShort, + ~price=syntheticTokenPrice_inPaymentTokens_short, + ); + batchedAmountOfPaymentTokensToShiftToShort := + Contract.LongShortHelpers.calcAmountPaymentToken( + ~amountSyntheticToken=batchedAmountSyntheticTokenToShiftFromLong, + ~price=syntheticTokenPrice_inPaymentTokens_long, + ); + + batchedAmountSyntheticTokenToShiftToShort := + Contract.LongShortHelpers.calcEquivalentAmountSyntheticTokensOnTargetSide( + ~amountSyntheticTokenOriginSide=batchedAmountSyntheticTokenToShiftFromLong, + ~priceOriginSide=syntheticTokenPrice_inPaymentTokens_long, + ~priceTargetSide=syntheticTokenPrice_inPaymentTokens_short, + ); + batchedAmountSyntheticTokenToShiftToLong := + Contract.LongShortHelpers.calcEquivalentAmountSyntheticTokensOnTargetSide( + ~amountSyntheticTokenOriginSide=batchedAmountSyntheticTokenToShiftFromShort, + ~priceOriginSide=syntheticTokenPrice_inPaymentTokens_short, + ~priceTargetSide=syntheticTokenPrice_inPaymentTokens_long, + ); + + calculatedValueChangeForLong := + batched_amountPaymentToken_depositLong + ->sub(batchedAmountOfPaymentTokensToBurnLong.contents) + ->add(batchedAmountOfPaymentTokensToShiftToLong.contents) + ->sub(batchedAmountOfPaymentTokensToShiftToShort.contents); + calculatedValueChangeForShort := + batched_amountPaymentToken_depositShort + ->sub(batchedAmountOfPaymentTokensToBurnShort.contents) + ->add(batchedAmountOfPaymentTokensToShiftToShort.contents) + ->sub(batchedAmountOfPaymentTokensToShiftToLong.contents); + + calculatedValueChangeInSynthSupplyLong := + batchedAmountSyntheticTokenToMintLong.contents + ->sub(batched_amountSyntheticToken_redeemLong) + ->add(batchedAmountSyntheticTokenToShiftToLong.contents) + ->sub(batchedAmountSyntheticTokenToShiftFromLong); + calculatedValueChangeInSynthSupplyShort := + batchedAmountSyntheticTokenToMintShort.contents + ->sub(batched_amountSyntheticToken_redeemShort) + ->add(batchedAmountSyntheticTokenToShiftToShort.contents) + ->sub(batchedAmountSyntheticTokenToShiftFromShort); + returnOfPerformOutstandingBatchedSettlements := functionCallReturn; + }); + it( + "call handleChangeInSyntheticTokensTotalSupply with the correct parameters", + () => { + // NOTE: due to the small optimization in the implementation (and ovoiding stack too deep errors) it is possible that the algorithm over issues float by a unit. + // This is probably not an issue since it overshoots rather than undershoots. However, this should be monitored or changed. + let _ = + LongShortSmocked.InternalMock._handleChangeInSyntheticTokensTotalSupplyCallCheck({ + marketIndex, + isLong: true, + changeInSyntheticTokensTotalSupply: + calculatedValueChangeInSynthSupplyLong.contents, + }); + LongShortSmocked.InternalMock._handleChangeInSyntheticTokensTotalSupplyCallCheck({ + marketIndex, + isLong: false, + changeInSyntheticTokensTotalSupply: + calculatedValueChangeInSynthSupplyShort.contents, + }); + }); + it( + "call handleTotalValueChangeForMarketWithYieldManager with the correct parameters", + () => { + let totalPaymentTokenValueChangeForMarket = + calculatedValueChangeForLong.contents + ->add(calculatedValueChangeForShort.contents); + LongShortSmocked.InternalMock._handleTotalPaymentTokenValueChangeForMarketWithYieldManagerCallCheck({ + marketIndex, + totalPaymentTokenValueChangeForMarket, + }); + }, + ); + it("should return the correct values", () => { + Chai.recordEqualDeep( + returnOfPerformOutstandingBatchedSettlements.contents, + { + long_changeInMarketValue_inPaymentToken: + calculatedValueChangeForLong.contents, + short_changeInMarketValue_inPaymentToken: + calculatedValueChangeForShort.contents, + }, + ) + }); + }; + + describe("there are no actions in the batch", () => { + runTest( + ~batched_amountPaymentToken_depositLong=zeroBn, + ~batched_amountPaymentToken_depositShort=zeroBn, + ~batched_amountSyntheticToken_redeemLong=zeroBn, + ~batched_amountSyntheticToken_redeemShort=zeroBn, + ~batchedAmountSyntheticTokenToShiftFromLong=zeroBn, + ~batchedAmountSyntheticTokenToShiftFromShort=zeroBn, + ) + }); + describe("there is 1 deposit long", () => { + runTest( + ~batched_amountPaymentToken_depositLong=Helpers.randomTokenAmount(), + ~batched_amountPaymentToken_depositShort=zeroBn, + ~batched_amountSyntheticToken_redeemLong=zeroBn, + ~batched_amountSyntheticToken_redeemShort=zeroBn, + ~batchedAmountSyntheticTokenToShiftFromLong=zeroBn, + ~batchedAmountSyntheticTokenToShiftFromShort=zeroBn, + ) + }); + describe("there is 1 deposit short", () => { + runTest( + ~batched_amountPaymentToken_depositLong=zeroBn, + ~batched_amountPaymentToken_depositShort=Helpers.randomTokenAmount(), + ~batched_amountSyntheticToken_redeemLong=zeroBn, + ~batched_amountSyntheticToken_redeemShort=zeroBn, + ~batchedAmountSyntheticTokenToShiftFromLong=zeroBn, + ~batchedAmountSyntheticTokenToShiftFromShort=zeroBn, + ) + }); + describe("there is 1 withdraw long", () => { + runTest( + ~batched_amountPaymentToken_depositLong=zeroBn, + ~batched_amountPaymentToken_depositShort=zeroBn, + ~batched_amountSyntheticToken_redeemLong=Helpers.randomTokenAmount(), + ~batched_amountSyntheticToken_redeemShort=zeroBn, + ~batchedAmountSyntheticTokenToShiftFromLong=zeroBn, + ~batchedAmountSyntheticTokenToShiftFromShort=zeroBn, + ) + }); + describe("there is 1 withdraw short", () => { + runTest( + ~batched_amountPaymentToken_depositLong=zeroBn, + ~batched_amountPaymentToken_depositShort=zeroBn, + ~batched_amountSyntheticToken_redeemLong=zeroBn, + ~batched_amountSyntheticToken_redeemShort= + Helpers.randomTokenAmount(), + ~batchedAmountSyntheticTokenToShiftFromLong=zeroBn, + ~batchedAmountSyntheticTokenToShiftFromShort=zeroBn, + ) + }); + describe("there is 1 shift from long to short", () => { + runTest( + ~batched_amountPaymentToken_depositLong=zeroBn, + ~batched_amountPaymentToken_depositShort=zeroBn, + ~batched_amountSyntheticToken_redeemLong=zeroBn, + ~batched_amountSyntheticToken_redeemShort=zeroBn, + ~batchedAmountSyntheticTokenToShiftFromLong= + Helpers.randomTokenAmount(), + ~batchedAmountSyntheticTokenToShiftFromShort=zeroBn, + ); + it( + "should set batched_amountSyntheticToken_toShiftAwayFrom_marketSide long to zero", + () => { + let%Await _ = + contracts.contents.longShort + ->LongShort.Exposed._batchConfirmOutstandingPendingActionsExposed( + ~marketIndex, + ~syntheticTokenPrice_inPaymentTokens_long, + ~syntheticTokenPrice_inPaymentTokens_short, + ); + + let%Await resultAfterCall = + contracts.contents.longShort + ->LongShort.batched_amountSyntheticToken_toShiftAwayFrom_marketSide( + marketIndex, + true, + ); + Chai.bnEqual(resultAfterCall, zeroBn); + }, + ); + }); + describe("there is 1 shift from short to long", () => { + runTest( + ~batched_amountPaymentToken_depositLong=zeroBn, + ~batched_amountPaymentToken_depositShort=zeroBn, + ~batched_amountSyntheticToken_redeemLong=zeroBn, + ~batched_amountSyntheticToken_redeemShort=zeroBn, + ~batchedAmountSyntheticTokenToShiftFromLong=zeroBn, + ~batchedAmountSyntheticTokenToShiftFromShort= + Helpers.randomTokenAmount(), + ); + it( + "should set batched_amountSyntheticToken_toShiftAwayFrom_marketSide short to zero", + () => { + let%Await _ = + contracts.contents.longShort + ->LongShort.Exposed._batchConfirmOutstandingPendingActionsExposed( + ~marketIndex, + ~syntheticTokenPrice_inPaymentTokens_long, + ~syntheticTokenPrice_inPaymentTokens_short, + ); + + let%Await resultAfterCall = + contracts.contents.longShort + ->LongShort.batched_amountSyntheticToken_toShiftAwayFrom_marketSide( + marketIndex, + false, + ); + Chai.bnEqual(resultAfterCall, zeroBn); + }, + ); + }); + describe( + "there are random deposits and withdrawals (we could be more specific with this test possibly?)", + () => { + runTest( + ~batched_amountPaymentToken_depositLong=Helpers.randomTokenAmount(), + ~batched_amountPaymentToken_depositShort=Helpers.randomTokenAmount(), + ~batched_amountSyntheticToken_redeemLong=Helpers.randomTokenAmount(), + ~batched_amountSyntheticToken_redeemShort= + Helpers.randomTokenAmount(), + ~batchedAmountSyntheticTokenToShiftFromLong= + Helpers.randomTokenAmount(), + ~batchedAmountSyntheticTokenToShiftFromShort= + Helpers.randomTokenAmount(), + ) + }); + }); + describe("_handleChangeInSyntheticTokensTotalSupply", () => { + before_once'(() => { + let { + longShort, + syntheticToken1Smocked: longSyntheticToken, + syntheticToken2Smocked: shortSyntheticToken, + } = + contracts.contents; + + longShort->LongShort.Exposed.setHandleChangeInSyntheticTokensTotalSupplyGlobals( + ~marketIndex, + ~longSyntheticToken=longSyntheticToken.address, + ~shortSyntheticToken=shortSyntheticToken.address, + ); + }); + let testHandleChangeInSyntheticTokensTotalSupply = (~isLong) => { + describe("changeInSyntheticTokensTotalSupply > 0", () => { + let changeInSyntheticTokensTotalSupply = Helpers.randomTokenAmount(); + before_once'(() => { + let {longShort} = contracts.contents; + + longShort->LongShort.Exposed._handleChangeInSyntheticTokensTotalSupplyExposed( + ~marketIndex, + ~isLong, + ~changeInSyntheticTokensTotalSupply, + ); + }); + it( + "should call the mint function on the correct synthetic token with correct arguments.", + () => { + let {longShort, syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + let syntheticToken = + isLong ? syntheticToken1Smocked : syntheticToken2Smocked; + syntheticToken->SyntheticTokenSmocked.mintCallCheck({ + _to: longShort.address, + amount: changeInSyntheticTokensTotalSupply, + }); + }, + ); + it("should NOT call the burn function.", () => { + let {syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + let syntheticToken = + isLong ? syntheticToken1Smocked : syntheticToken2Smocked; + + expect(syntheticToken->SyntheticTokenSmocked.burnFunction) + ->toHaveCallCount(0); + }); + }); + describe("changeInSyntheticTokensTotalSupply < 0", () => { + let changeInSyntheticTokensTotalSupply = + zeroBn->sub(Helpers.randomTokenAmount()); + before_once'(() => { + let {longShort, syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + let syntheticToken = + isLong ? syntheticToken1Smocked : syntheticToken2Smocked; + + let _ = + syntheticToken + ->SyntheticTokenSmocked.mintFunction + ->SmockGeneral.reset; + + longShort->LongShort.Exposed._handleChangeInSyntheticTokensTotalSupplyExposed( + ~marketIndex, + ~isLong, + ~changeInSyntheticTokensTotalSupply, + ); + }); + it( + "should NOT call the mint function on the correct synthetic token.", + () => { + let {syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + let syntheticToken = + isLong ? syntheticToken1Smocked : syntheticToken2Smocked; + + expect(syntheticToken->SyntheticTokenSmocked.mintFunction) + ->toHaveCallCount(0); + }); + it( + "should call the burn function on the correct synthetic token with correct arguments.", + () => { + let {syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + let syntheticToken = + isLong ? syntheticToken1Smocked : syntheticToken2Smocked; + + syntheticToken->SyntheticTokenSmocked.burnCallCheck({ + amount: zeroBn->sub(changeInSyntheticTokensTotalSupply), + }); + }, + ); + }); + describe("changeInSyntheticTokensTotalSupply == 0", () => { + it("should call NEITHER the mint NOR burn function.", () => { + let changeInSyntheticTokensTotalSupply = zeroBn; + let {longShort, syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + let syntheticToken = + isLong ? syntheticToken1Smocked : syntheticToken2Smocked; + let _ = + syntheticToken + ->SyntheticTokenSmocked.mintFunction + ->SmockGeneral.reset; + let _ = + syntheticToken + ->SyntheticTokenSmocked.burnFunction + ->SmockGeneral.reset; + + let%Await _ = + longShort->LongShort.Exposed._handleChangeInSyntheticTokensTotalSupplyExposed( + ~marketIndex, + ~isLong, + ~changeInSyntheticTokensTotalSupply, + ); + + expect(syntheticToken->SyntheticTokenSmocked.mintFunction) + ->toHaveCallCount(0); + expect(syntheticToken->SyntheticTokenSmocked.burnFunction) + ->toHaveCallCount(0); + }) + }); + }; + describe("LongSide", () => { + testHandleChangeInSyntheticTokensTotalSupply(~isLong=true); + testHandleChangeInSyntheticTokensTotalSupply(~isLong=false); + }); + }); + describe( + "_handleTotalPaymentTokenValueChangeForMarketWithYieldManager", () => { + before_once'(() => { + let {longShort, yieldManagerSmocked} = contracts.contents; + + longShort->LongShortStateSetters.setYieldManager( + ~marketIndex, + ~yieldManager=yieldManagerSmocked.address, + ); + }); + describe("totalPaymentTokenValueChangeForMarket > 0", () => { + let totalPaymentTokenValueChangeForMarket = + Helpers.randomTokenAmount(); + before_once'(() => { + let {longShort} = contracts.contents; + + longShort->LongShort.Exposed._handleTotalPaymentTokenValueChangeForMarketWithYieldManagerExposed( + ~marketIndex, + ~totalPaymentTokenValueChangeForMarket, + ); + }); + it( + "should call the depositPaymentToken function on the correct synthetic token with correct arguments.", + () => { + contracts.contents.yieldManagerSmocked + ->YieldManagerAaveSmocked.depositPaymentTokenCallCheck({ + amount: totalPaymentTokenValueChangeForMarket, + }) + }); + it("should NOT call the removePaymentTokenFromMarket function.", () => + expect( + contracts.contents.yieldManagerSmocked + ->YieldManagerAaveSmocked.removePaymentTokenFromMarketFunction, + ) + ->toHaveCallCount(0) + ); + }); + describe("totalPaymentTokenValueChangeForMarket < 0", () => { + let totalPaymentTokenValueChangeForMarket = + zeroBn->sub(Helpers.randomTokenAmount()); + before_once'(() => { + let {longShort, yieldManagerSmocked} = contracts.contents; + + let _ = + yieldManagerSmocked + ->YieldManagerAaveSmocked.depositPaymentTokenFunction + ->SmockGeneral.reset; + + longShort->LongShort.Exposed._handleTotalPaymentTokenValueChangeForMarketWithYieldManagerExposed( + ~marketIndex, + ~totalPaymentTokenValueChangeForMarket, + ); + }); + it( + "should NOT call the depositPaymentToken function on the correct synthetic token.", + () => + expect( + contracts.contents.yieldManagerSmocked + ->YieldManagerAaveSmocked.depositPaymentTokenFunction, + ) + ->toHaveCallCount(0) + ); + it( + "should call the removePaymentTokenFromMarket function on the correct synthetic token with correct arguments.", + () => { + contracts.contents.yieldManagerSmocked + ->YieldManagerAaveSmocked.removePaymentTokenFromMarketCallCheck({ + amount: zeroBn->sub(totalPaymentTokenValueChangeForMarket), + }) + }); + }); + describe("totalPaymentTokenValueChangeForMarket == 0", () => { + it( + "should call NEITHER the depositPaymentToken NOR removePaymentTokenFromMarket function.", + () => { + let totalPaymentTokenValueChangeForMarket = zeroBn; + + let {longShort, yieldManagerSmocked} = contracts.contents; + + let _ = + yieldManagerSmocked + ->YieldManagerAaveSmocked.depositPaymentTokenFunction + ->SmockGeneral.reset; + let _ = + yieldManagerSmocked + ->YieldManagerAaveSmocked.removePaymentTokenFromMarketFunction + ->SmockGeneral.reset; + + let%Await _ = + longShort->LongShort.Exposed._handleTotalPaymentTokenValueChangeForMarketWithYieldManagerExposed( + ~marketIndex, + ~totalPaymentTokenValueChangeForMarket, + ); + + expect( + yieldManagerSmocked->YieldManagerAaveSmocked.depositPaymentTokenFunction, + ) + ->toHaveCallCount(0); + expect( + yieldManagerSmocked->YieldManagerAaveSmocked.removePaymentTokenFromMarketFunction, + ) + ->toHaveCallCount(0); + }, + ) + }); + }); + }); +}; diff --git a/test/tests/longShort/ClaimAndDistributeYieldThenRebalanceMarket.re b/test/tests/longShort/ClaimAndDistributeYieldThenRebalanceMarket.re new file mode 100644 index 0000000..3a1d5eb --- /dev/null +++ b/test/tests/longShort/ClaimAndDistributeYieldThenRebalanceMarket.re @@ -0,0 +1,231 @@ +open LetOps; +open Mocha; +open Globals; +open Helpers; + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describeUnit("_claimAndDistributeYieldThenRebalanceMarket", () => { + let marketIndex = Helpers.randomJsInteger(); + let oldAssetPrice = Helpers.randomTokenAmount(); + let treasuryYieldPercent_e18 = Helpers.randomRatio1e18(); + + let marketAmountFromYieldManager = Helpers.randomTokenAmount(); + + before_once'(() => { + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="_claimAndDistributeYieldThenRebalanceMarket", + ) + }); + + let setup = (~newAssetPrice) => { + let%AwaitThen _ = + contracts.contents.longShort + ->LongShortStateSetters.setAssetPrice( + ~marketIndex, + ~assetPrice=oldAssetPrice, + ); + let%AwaitThen _ = + contracts.contents.longShort + ->LongShortStateSetters.setMarketLeverage_e18( + ~marketLeverage_e18=CONSTANTS.tenToThe18, + ~marketIndex, + ); + + contracts.contents.longShort + ->LongShort.Exposed._claimAndDistributeYieldThenRebalanceMarketExposedCall( + ~marketIndex, + ~newAssetPrice, + ); + }; + + let runTests = + ( + ~marketSideValueInPaymentTokenLong, + ~marketSideValueInPaymentTokenShort, + ) => { + let totalValueLockedInMarket = + marketSideValueInPaymentTokenLong->add( + marketSideValueInPaymentTokenShort, + ); + + let (yieldDistributedValueLong, yieldDistributedValueShort) = + if (marketSideValueInPaymentTokenLong->bnGt( + marketSideValueInPaymentTokenShort, + )) { + ( + marketSideValueInPaymentTokenLong, + marketSideValueInPaymentTokenShort->add( + marketAmountFromYieldManager, + ), + ); + } else { + ( + marketSideValueInPaymentTokenLong->add( + marketAmountFromYieldManager, + ), + marketSideValueInPaymentTokenShort, + ); + }; + + before_once'(() => { + let%Await _ = + contracts.contents.longShort + ->LongShort.Exposed.setClaimAndDistributeYieldThenRebalanceMarketGlobals( + ~marketIndex, + ~marketSideValueInPaymentTokenLong, + ~marketSideValueInPaymentTokenShort, + ~yieldManager=contracts.contents.yieldManagerSmocked.address, + ); + + let isLongSideUnderbalanced = + marketSideValueInPaymentTokenLong->bnLt( + marketSideValueInPaymentTokenShort, + ); + + LongShortSmocked.InternalMock.mock_getYieldSplitToReturn( + isLongSideUnderbalanced, + treasuryYieldPercent_e18, + ); + + contracts.contents.yieldManagerSmocked + ->YieldManagerAaveSmocked.mockDistributeYieldForTreasuryAndReturnMarketAllocationToReturn( + marketAmountFromYieldManager, + ); + }); + + describe("Function calls", () => { + before_once'(() => { + let newAssetPrice = + Helpers.adjustNumberRandomlyWithinRange( + ~basisPointsMin=-99999, + ~basisPointsMax=99999, + oldAssetPrice, + ); + + setup(~newAssetPrice); + }); + it("calls _getYieldSplit with correct parameters", () => { + LongShortSmocked.InternalMock._getYieldSplitCallCheck({ + marketIndex, + longValue: marketSideValueInPaymentTokenLong, + shortValue: marketSideValueInPaymentTokenShort, + totalValueLockedInMarket, + }) + }); + it( + "gets the treasuryYieldPercent from _getYieldSplit and calls distributeYieldForTreasuryAndReturnMarketAllocation on the yieldManager with correct amount", + () => { + contracts.contents.yieldManagerSmocked + ->YieldManagerAaveSmocked.distributeYieldForTreasuryAndReturnMarketAllocationCallCheck({ + totalValueRealizedForMarket: totalValueLockedInMarket, + treasuryYieldPercent_e18, + }) + }); + }); + + it( + "returns the correct updated long and short values when price has remained the same (newAssetPrice == oldAssetPrice)", + () => { + let newAssetPrice = oldAssetPrice; + let%Await {longValue, shortValue} = setup(~newAssetPrice); + + Chai.bnEqual(yieldDistributedValueLong, longValue); + Chai.bnEqual(yieldDistributedValueShort, shortValue); + }, + ); + + it( + "returns the correct updated long and short values when price has increased (newAssetPrice > oldAssetPrice)", + () => { + // make the price increase + let newAssetPrice = + Helpers.adjustNumberRandomlyWithinRange( + ~basisPointsMin=0, + ~basisPointsMax=99999, + oldAssetPrice, + ); + + let%Await {longValue, shortValue} = setup(~newAssetPrice); + + let unbalancedSidePoolValue = + bnMin(yieldDistributedValueLong, yieldDistributedValueShort); + + let valueChange = + newAssetPrice + ->sub(oldAssetPrice) + ->mul(unbalancedSidePoolValue) + ->div(oldAssetPrice); + + Chai.bnEqual( + yieldDistributedValueLong->add(valueChange), + longValue, + ); + Chai.bnEqual( + yieldDistributedValueShort->sub(valueChange), + shortValue, + ); + }, + ); + + it( + "returns the correct updated long and short values when price has decreased (newAssetPrice < oldAssetPrice)", + () => { + // make the price decrease + let newAssetPrice = + Helpers.adjustNumberRandomlyWithinRange( + ~basisPointsMin=-99999, + ~basisPointsMax=0, + oldAssetPrice, + ); + + let%Await {longValue, shortValue} = setup(~newAssetPrice); + + let unbalancedSidePoolValue = + bnMin(yieldDistributedValueLong, yieldDistributedValueShort); + + let valueChange = + newAssetPrice + ->sub(oldAssetPrice) + ->mul(unbalancedSidePoolValue) + ->div(oldAssetPrice); + + Chai.bnEqual( + yieldDistributedValueLong->add(valueChange), + longValue, + ); + Chai.bnEqual( + yieldDistributedValueShort->sub(valueChange), + shortValue, + ); + }, + ); + }; + (); + + describe("Long Side is Overvalued", () => { + let marketSideValueInPaymentTokenShort = Helpers.randomTokenAmount(); + let marketSideValueInPaymentTokenLong = + marketSideValueInPaymentTokenShort->add(Helpers.randomTokenAmount()); + + runTests( + ~marketSideValueInPaymentTokenLong, + ~marketSideValueInPaymentTokenShort, + ); + }); + describe("Short Side is Overvalued", () => { + let marketSideValueInPaymentTokenLong = Helpers.randomTokenAmount(); + let marketSideValueInPaymentTokenShort = + marketSideValueInPaymentTokenLong->add(Helpers.randomTokenAmount()); + + runTests( + ~marketSideValueInPaymentTokenLong, + ~marketSideValueInPaymentTokenShort, + ); + }); + }); +}; diff --git a/test/tests/longShort/CreateNewSyntheticMarket.re b/test/tests/longShort/CreateNewSyntheticMarket.re new file mode 100644 index 0000000..1d21eb8 --- /dev/null +++ b/test/tests/longShort/CreateNewSyntheticMarket.re @@ -0,0 +1,125 @@ +open LetOps; +open Mocha; +open Globals; +open Helpers; + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describeUnit("createNewSyntheticMarketExternalSyntheticTokens", () => { + let latestMarket = Helpers.randomJsInteger(); + + let marketIndex = latestMarket + 1; + + let syntheticName = "Flippening"; + let syntheticSymbol = "FLP"; + + let assetPrice = Helpers.randomTokenAmount(); + + let (longToken, shortToken, paymentToken) = + Helpers.Tuple.make3(Helpers.randomAddress); + + let createNewSyntheticMarketUpgradeableCallRef = ref(None->Obj.magic); + + before_once'(() => { + contracts.contents.oracleManagerSmocked + ->OracleManagerMockSmocked.mockUpdatePriceToReturn(assetPrice); + let%AwaitThen _ = + contracts.contents.longShort + ->LongShortStateSetters.setLatestMarket(~latestMarket); + createNewSyntheticMarketUpgradeableCallRef := + contracts.contents.longShort + ->LongShort.createNewSyntheticMarketExternalSyntheticTokens( + ~syntheticName, + ~syntheticSymbol, + ~longToken, + ~shortToken, + ~paymentToken, + ~oracleManager=contracts.contents.oracleManagerSmocked.address, + ~yieldManager=contracts.contents.yieldManagerSmocked.address, + ); + createNewSyntheticMarketUpgradeableCallRef.contents; + }); + + it("increments latest market", () => { + let%Await latestMarketContractVal = + contracts.contents.longShort->LongShort.latestMarket; + Chai.intEqual(marketIndex, latestMarketContractVal); + }); + + it("sets payment token correctly", () => { + let%Await paymentTokenContractVal = + contracts.contents.longShort->LongShort.paymentTokens(marketIndex); + Chai.addressEqual(paymentTokenContractVal, ~otherAddress=paymentToken); + }); + + it("sets yield manager correctly", () => { + let%Await yieldManagerContractVal = + contracts.contents.longShort->LongShort.yieldManagers(marketIndex); + Chai.addressEqual( + yieldManagerContractVal, + ~otherAddress=contracts.contents.yieldManagerSmocked.address, + ); + }); + + it("sets oracle manager correctly", () => { + let%Await oracleManagerContractVal = + contracts.contents.longShort->LongShort.oracleManagers(marketIndex); + Chai.addressEqual( + oracleManagerContractVal, + ~otherAddress=contracts.contents.oracleManagerSmocked.address, + ); + }); + + it("sets asset price correctly", () => { + let%Await assetPriceContractVal = + contracts.contents.longShort->LongShort.assetPrice(marketIndex); + Chai.bnEqual(assetPriceContractVal, assetPrice); + }); + + it("sets synthetic tokens correctly", () => { + let%AwaitThen longTokenContractVal = + contracts.contents.longShort + ->LongShort.syntheticTokens(marketIndex, true); + let%Await shortTokenContractVal = + contracts.contents.longShort + ->LongShort.syntheticTokens(marketIndex, false); + Chai.addressEqual(longTokenContractVal, ~otherAddress=longToken); + Chai.addressEqual( + shortTokenContractVal, + ~otherAddress=shortTokenContractVal, + ); + }); + + it("calls initializeForMarket on yield manager", () => { + contracts.contents.yieldManagerSmocked + ->YieldManagerAaveSmocked.initializeForMarketCallCheck + }); + + it("calls updatePrice price on the oracle", () => { + contracts.contents.oracleManagerSmocked + ->OracleManagerMockSmocked.updatePriceCallCheck + }); + + it("emits SyntheticMarketCreated with correct args", () => { + Chai.callEmitEvents( + ~call=createNewSyntheticMarketUpgradeableCallRef.contents, + ~contract=contracts.contents.longShort->Obj.magic, + ~eventName="SyntheticMarketCreated", + ) + ->Chai.withArgs9( + marketIndex, + longToken, + shortToken, + paymentToken, + assetPrice, + syntheticName, + syntheticSymbol, + contracts.contents.oracleManagerSmocked.address, + contracts.contents.yieldManagerSmocked.address, + ) + }); + }); +}; diff --git a/test/tests/longShort/DepositFunds.re b/test/tests/longShort/DepositFunds.re new file mode 100644 index 0000000..ae638aa --- /dev/null +++ b/test/tests/longShort/DepositFunds.re @@ -0,0 +1,59 @@ +open Mocha; +open LetOps; + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describe("depositing funds", () => { + let amount = Helpers.randomTokenAmount(); + let marketIndex = 1; + + describe("_transferPaymentTokensFromUserToYieldManager", () => { + let paymentTokenSmocked = ref(ERC20MockSmocked.uninitializedValue); + let testYieldManager = Helpers.randomAddress(); + + let setup = (~testWallet: Ethers.walletType) => { + let%Await _ = + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="_transferPaymentTokensFromUserToYieldManager", + ); + + let%AwaitThen smockedPaymentToken = ERC20MockSmocked.make(); + smockedPaymentToken->ERC20MockSmocked.mockTransferFromToReturn(true); + paymentTokenSmocked := smockedPaymentToken; + + let%AwaitThen _ = + contracts.contents.longShort + ->LongShort.Exposed.setDepositFundsGlobals( + ~marketIndex, + ~paymentToken=smockedPaymentToken.address, + ~yieldManager=testYieldManager, + ); + + let longShort = + contracts.contents.longShort + ->ContractHelpers.connect(~address=testWallet); + + longShort->LongShort.Exposed._transferPaymentTokensFromUserToYieldManagerExposed( + ~marketIndex, + ~amount, + ); + }; + + it("calls paymentToken.transferFrom with correct arguments", () => { + let testWallet = accounts.contents->Array.getUnsafe(1); + let%Await _ = setup(~testWallet); + + paymentTokenSmocked.contents + ->ERC20MockSmocked.transferFromCallCheck({ + sender: testWallet.address, + recipient: testYieldManager, + amount, + }); + }); + }); + }); +}; diff --git a/test/tests/longShort/ExecuteNextPriceAction.re b/test/tests/longShort/ExecuteNextPriceAction.re new file mode 100644 index 0000000..83f76e6 --- /dev/null +++ b/test/tests/longShort/ExecuteNextPriceAction.re @@ -0,0 +1,467 @@ +open LetOps; +open Mocha; +open Globals; +open SmockGeneral; + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describeUnit("Execute next price action", () => { + let marketIndex = Helpers.randomJsInteger(); + let user = Helpers.randomAddress(); + + before_once'(() => + contracts.contents.longShort->LongShortStateSetters.turnOffMocking + ); + + describe("_executeOutstandingNextPriceMints", () => { + let setup = + ( + ~isLong, + ~userNextPrice_syntheticToken_redeemAmount, + ~userNextPrice_currentUpdateIndex, + ~syntheticToken_priceSnapshot, + ) => { + let {longShort, syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + + syntheticToken1Smocked->SyntheticTokenSmocked.mockTransferToReturn( + true, + ); + syntheticToken2Smocked->SyntheticTokenSmocked.mockTransferToReturn( + true, + ); + + longShort->LongShort.Exposed.setExecuteOutstandingNextPriceMintsGlobals( + ~marketIndex, + ~user, + ~isLong, + ~syntheticToken= + (isLong ? syntheticToken1Smocked : syntheticToken2Smocked).address, + ~userNextPrice_syntheticToken_redeemAmount, + ~userNextPrice_currentUpdateIndex, + ~syntheticToken_priceSnapshot, + ); + }; + let testExecuteOutstandingNextPriceMints = (~isLong) => { + describe("userNextPriceDepositAmount == 0", () => { + let executeOutstandingNextPriceMintsTx = + ref("Undefined"->Obj.magic); + + before_once'(() => { + let {longShort, syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + + let%Await _ = + setup( + ~isLong, + ~userNextPrice_syntheticToken_redeemAmount=zeroBn, + ~userNextPrice_currentUpdateIndex=Helpers.randomInteger(), + ~syntheticToken_priceSnapshot=Helpers.randomTokenAmount(), + ); + + let _ = + (isLong ? syntheticToken1Smocked : syntheticToken2Smocked) + ->SyntheticTokenSmocked.transferFunction + ->SmockGeneral.reset; + + executeOutstandingNextPriceMintsTx := + longShort->LongShort.Exposed._executeOutstandingNextPriceMintsExposed( + ~marketIndex, + ~user, + ~isLong, + ); + }); + it("should not call any functions or change any state", () => { + let {syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + + let%Await _ = executeOutstandingNextPriceMintsTx.contents; + + expect( + (isLong ? syntheticToken1Smocked : syntheticToken2Smocked) + ->SyntheticTokenSmocked.transferFunction, + ) + ->toHaveCallCount(0); + }); + + it( + "should not emit the ExecuteNextPriceMintSettlementUser event", () => { + Chai.callEmitEvents( + ~call=executeOutstandingNextPriceMintsTx.contents, + ~contract=contracts.contents.longShort->Obj.magic, + ~eventName="ExecuteNextPriceMintSettlementUser", + ) + ->Chai.expectToNotEmit + }); + }); + describe("userNextPriceDepositAmount > 0", () => { + let executeOutstandingNextPriceMintsTx = + ref("Undefined"->Obj.magic); + let userNextPrice_syntheticToken_redeemAmount = + Helpers.randomTokenAmount(); + let syntheticToken_priceSnapshot = Helpers.randomTokenAmount(); + + before_once'(() => { + let%Await _ = + setup( + ~isLong, + ~userNextPrice_syntheticToken_redeemAmount, + ~userNextPrice_currentUpdateIndex=Helpers.randomInteger(), + ~syntheticToken_priceSnapshot, + ); + + executeOutstandingNextPriceMintsTx := + contracts.contents.longShort + ->LongShort.Exposed._executeOutstandingNextPriceMintsExposed( + ~marketIndex, + ~user, + ~isLong, + ); + }); + + it( + "should call transfer on the correct amount of synthetic tokens to the user", + () => { + let {syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + + let%Await _ = executeOutstandingNextPriceMintsTx.contents; + let expectedAmountOfSynthToRecieve = + Contract.LongShortHelpers.calcAmountSyntheticToken( + ~amountPaymentToken=userNextPrice_syntheticToken_redeemAmount, + ~price=syntheticToken_priceSnapshot, + ); + (isLong ? syntheticToken1Smocked : syntheticToken2Smocked) + ->SyntheticTokenSmocked.transferCallCheck({ + recipient: user, + amount: expectedAmountOfSynthToRecieve, + }); + }); + + it("should reset userNextPriceDepositAmount to zero", () => { + let%Await userNextPriceDepositAmount = + contracts.contents.longShort + ->LongShort.userNextPrice_paymentToken_depositAmount( + marketIndex, + isLong, + user, + ); + Chai.bnEqual(zeroBn, userNextPriceDepositAmount); + }); + }); + }; + describe("Long Side", () => + testExecuteOutstandingNextPriceMints(~isLong=true) + ); + describe("Short Side", () => + testExecuteOutstandingNextPriceMints(~isLong=false) + ); + }); + + describe("_executeOutstandingNextPriceRedeems", () => { + let yieldManagerSmocked = + ref(YieldManagerMockSmocked.uninitializedValue); + + let setup = + ( + ~isLong, + ~userNextPrice_syntheticToken_redeemAmount, + ~userNextPrice_currentUpdateIndex, + ~syntheticToken_priceSnapshot, + ) => { + let {longShort} = contracts^; + + let%Await smockedYieldManeger = YieldManagerMockSmocked.make(); + + yieldManagerSmocked := smockedYieldManeger; + + longShort->LongShort.Exposed.setExecuteOutstandingNextPriceRedeemsGlobals( + ~marketIndex, + ~user, + ~isLong, + ~yieldManager=smockedYieldManeger.address, + ~userNextPrice_syntheticToken_redeemAmount, + ~userNextPrice_currentUpdateIndex, + ~syntheticToken_priceSnapshot, + ); + }; + let testExecuteOutstandingNextPriceRedeems = (~isLong) => { + describe("userNextPriceDepositAmount == 0", () => { + let executeOutstandingNextPriceRedeemsTx = + ref("Undefined"->Obj.magic); + + before_once'(() => { + let%Await _ = + setup( + ~isLong, + ~userNextPrice_syntheticToken_redeemAmount=zeroBn, + ~userNextPrice_currentUpdateIndex=Helpers.randomInteger(), + ~syntheticToken_priceSnapshot=Helpers.randomTokenAmount(), + ); + + executeOutstandingNextPriceRedeemsTx := + contracts.contents.longShort + ->LongShort.Exposed._executeOutstandingNextPriceRedeemsExposed( + ~marketIndex, + ~user, + ~isLong, + ); + }); + it("should not call any functions or change any state", () => { + let%Await _ = executeOutstandingNextPriceRedeemsTx.contents; + expect( + yieldManagerSmocked.contents + ->YieldManagerMockSmocked.transferPaymentTokensToUserFunction, + ) + ->toHaveCallCount(0); + }); + + it( + "should not emit the ExecuteNextPriceRedeemSettlementUser event", + () => { + Chai.callEmitEvents( + ~call=executeOutstandingNextPriceRedeemsTx.contents, + ~contract=contracts.contents.longShort->Obj.magic, + ~eventName="ExecuteNextPriceRedeemSettlementUser", + ) + ->Chai.expectToNotEmit + }); + }); + describe("userNextPriceDepositAmount > 0", () => { + let executeOutstandingNextPriceRedeemsTx = + ref("Undefined"->Obj.magic); + let userNextPrice_syntheticToken_redeemAmount = + Helpers.randomTokenAmount(); + let syntheticToken_priceSnapshot = Helpers.randomTokenAmount(); + + before_once'(() => { + let%Await _ = + setup( + ~isLong, + ~userNextPrice_syntheticToken_redeemAmount, + ~userNextPrice_currentUpdateIndex=Helpers.randomInteger(), + ~syntheticToken_priceSnapshot, + ); + + executeOutstandingNextPriceRedeemsTx := + contracts.contents.longShort + ->LongShort.Exposed._executeOutstandingNextPriceRedeemsExposed( + ~marketIndex, + ~user, + ~isLong, + ); + }); + + it( + "should call transfer on the correct amount of Payment Tokens to the user", + () => { + let%Await _ = executeOutstandingNextPriceRedeemsTx.contents; + let expectedAmountOfPaymentTokenToRecieve = + Contract.LongShortHelpers.calcAmountPaymentToken( + ~amountSyntheticToken=userNextPrice_syntheticToken_redeemAmount, + ~price=syntheticToken_priceSnapshot, + ); + yieldManagerSmocked.contents + ->YieldManagerMockSmocked.transferPaymentTokensToUserCallCheck({ + user, + amount: expectedAmountOfPaymentTokenToRecieve, + }); + }); + + it("should reset userNextPriceDepositAmount to zero", () => { + let%Await userNextPriceDepositAmount = + contracts.contents.longShort + ->LongShort.userNextPrice_paymentToken_depositAmount( + marketIndex, + isLong, + user, + ); + Chai.bnEqual(zeroBn, userNextPriceDepositAmount); + }); + }); + }; + describe("Long Side", () => + testExecuteOutstandingNextPriceRedeems(~isLong=true) + ); + describe("Short Side", () => + testExecuteOutstandingNextPriceRedeems(~isLong=false) + ); + }); + + describe("_executeOutstandingNextPriceTokenShifts", () => { + let setup = + ( + ~isShiftFromLong, + ~userNextPrice_syntheticToken_toShiftAwayFrom_marketSide, + ~userNextPrice_currentUpdateIndex, + ~syntheticToken_priceSnapshotShiftedFrom, + ~syntheticToken_priceSnapshotShiftedTo, + ) => { + let {longShort, syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + + syntheticToken1Smocked->SyntheticTokenSmocked.mockTransferToReturn( + true, + ); + syntheticToken2Smocked->SyntheticTokenSmocked.mockTransferToReturn( + true, + ); + + longShort->LongShort.Exposed.setExecuteOutstandingNextPriceTokenShiftsGlobals( + ~marketIndex, + ~user, + ~isShiftFromLong, + ~syntheticTokenShiftedTo= + (isShiftFromLong ? syntheticToken1Smocked : syntheticToken2Smocked). + address, + ~userNextPrice_syntheticToken_toShiftAwayFrom_marketSide, + ~userNextPrice_currentUpdateIndex, + ~syntheticToken_priceSnapshotShiftedFrom, + ~syntheticToken_priceSnapshotShiftedTo, + ); + }; + let testExecuteOutstandingNextPriceRedeems = (~isShiftFromLong) => { + describe("syntheticToken_toShiftAwayFrom_marketSide == 0", () => { + let executeOutstandingNextPriceRedeemsTx = + ref("Undefined"->Obj.magic); + + before_once'(() => { + let {longShort, syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + + let%Await _ = + setup( + ~isShiftFromLong, + ~userNextPrice_syntheticToken_toShiftAwayFrom_marketSide=zeroBn, + ~userNextPrice_currentUpdateIndex=Helpers.randomInteger(), + ~syntheticToken_priceSnapshotShiftedFrom= + Helpers.randomTokenAmount(), + ~syntheticToken_priceSnapshotShiftedTo= + Helpers.randomTokenAmount(), + ); + + let _ = + ( + isShiftFromLong + ? syntheticToken1Smocked : syntheticToken2Smocked + ) + ->SyntheticTokenSmocked.transferFunction + ->SmockGeneral.reset; + + executeOutstandingNextPriceRedeemsTx := + longShort->LongShort.Exposed._executeOutstandingNextPriceTokenShiftsExposed( + ~marketIndex, + ~user, + ~isShiftFromLong, + ); + }); + it("should not call any functions or change any state", () => { + let {syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + + let%Await _ = executeOutstandingNextPriceRedeemsTx.contents; + + expect( + ( + isShiftFromLong + ? syntheticToken1Smocked : syntheticToken2Smocked + ) + ->SyntheticTokenSmocked.transferFunction, + ) + ->toHaveCallCount(0); + }); + + it( + "should not emit the ExecuteNextPriceRedeemSettlementUser event", + () => { + Chai.callEmitEvents( + ~call=executeOutstandingNextPriceRedeemsTx.contents, + ~contract=contracts.contents.longShort->Obj.magic, + ~eventName="ExecuteNextPriceRedeemSettlementUser", + ) + ->Chai.expectToNotEmit + }); + }); + describe( + "userNextPrice_syntheticToken_toShiftAwayFrom_marketSide > 0", () => { + let userNextPrice_syntheticToken_toShiftAwayFrom_marketSide = + Helpers.randomTokenAmount(); + let syntheticToken_priceSnapshotShiftedFrom = + Helpers.randomTokenAmount(); + let syntheticToken_priceSnapshotShiftedTo = + Helpers.randomTokenAmount(); + + before_once'(() => { + let%Await _ = + setup( + ~isShiftFromLong, + ~userNextPrice_syntheticToken_toShiftAwayFrom_marketSide, + ~userNextPrice_currentUpdateIndex=Helpers.randomInteger(), + ~syntheticToken_priceSnapshotShiftedFrom, + ~syntheticToken_priceSnapshotShiftedTo, + ); + + let {longShort} = contracts.contents; + + // LongShortS; + + longShort->LongShort.Exposed._executeOutstandingNextPriceTokenShiftsExposed( + ~marketIndex, + ~user, + ~isShiftFromLong, + ); + }); + + it( + "should call transfer on the correct amount of Syntetic Tokens to the user", + () => { + let {syntheticToken1Smocked, syntheticToken2Smocked} = + contracts.contents; + + let expectedAmountOfPaymentTokenToRecieve = + Contract.LongShortHelpers.calcAmountPaymentToken( + ~amountSyntheticToken=userNextPrice_syntheticToken_toShiftAwayFrom_marketSide, + ~price=syntheticToken_priceSnapshotShiftedFrom, + ); + + let expectedAmountOfOtherSyntheticTokenToRecieve = + Contract.LongShortHelpers.calcAmountSyntheticToken( + ~amountPaymentToken=expectedAmountOfPaymentTokenToRecieve, + ~price=syntheticToken_priceSnapshotShiftedTo, + ); + (isShiftFromLong ? syntheticToken1Smocked : syntheticToken2Smocked) + ->SyntheticTokenSmocked.transferCallCheck({ + recipient: user, + amount: expectedAmountOfOtherSyntheticTokenToRecieve, + }); + }); + + it( + "should reset userNextPrice_syntheticToken_toShiftAwayFrom_marketSide to zero", + () => { + let%Await userNextPrice_syntheticToken_toShiftAwayFrom_marketSide = + contracts.contents.longShort + ->LongShort.userNextPrice_syntheticToken_toShiftAwayFrom_marketSide( + marketIndex, + isShiftFromLong, + user, + ); + Chai.bnEqual( + zeroBn, + userNextPrice_syntheticToken_toShiftAwayFrom_marketSide, + ); + }); + }); + }; + describe("Long Side", () => + testExecuteOutstandingNextPriceRedeems(~isShiftFromLong=true) + ); + describe("Short Side", () => + testExecuteOutstandingNextPriceRedeems(~isShiftFromLong=false) + ); + }); + }); +}; diff --git a/test/tests/longShort/ExecuteOutstandingNextPriceSettlements.re b/test/tests/longShort/ExecuteOutstandingNextPriceSettlements.re new file mode 100644 index 0000000..73c4440 --- /dev/null +++ b/test/tests/longShort/ExecuteOutstandingNextPriceSettlements.re @@ -0,0 +1,177 @@ +open LetOps; +open Mocha; +open Globals; +open SmockGeneral; + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describe("executeOutstandingNextPriceSettlements", () => { + let marketIndex = 1; + let user = Helpers.randomAddress(); + let defaultuserNextPrice_currentUpdateIndex = bnFromInt(22); + let defaultMarketUpdateIndex = + defaultuserNextPrice_currentUpdateIndex->add(oneBn); + + let setup = (~userNextPrice_currentUpdateIndex, ~marketUpdateIndex) => { + let%AwaitThen _ = + contracts.contents.longShort->LongShortSmocked.InternalMock.setup; + + let%AwaitThen _ = + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="_executeOutstandingNextPriceSettlements", + ); + + let%AwaitThen _ = + contracts.contents.longShort + ->LongShort.Exposed.setExecuteOutstandingNextPriceSettlementsGlobals( + ~marketIndex, + ~user, + ~userNextPrice_currentUpdateIndex, + ~marketUpdateIndex, + ); + + contracts.contents.longShort + ->LongShort.Exposed._executeOutstandingNextPriceSettlementsExposed( + ~user, + ~marketIndex, + ); + }; + + describe("happy case", () => { + before_once'(() => + setup( + ~userNextPrice_currentUpdateIndex=defaultuserNextPrice_currentUpdateIndex, + ~marketUpdateIndex=defaultMarketUpdateIndex, + ) + ); + + it( + "calls nextPriceMint/nextPriceRedeem functions with correct arguments", + () => { + let _ = + LongShortSmocked.InternalMock._executeOutstandingNextPriceMintsCallCheck({ + marketIndex, + user, + isLong: true, + }); + let _ = + LongShortSmocked.InternalMock._executeOutstandingNextPriceMintsCallCheck({ + marketIndex, + user, + isLong: false, + }); + + let _ = + LongShortSmocked.InternalMock._executeOutstandingNextPriceRedeemsCallCheck({ + marketIndex, + user, + isLong: true, + }); + LongShortSmocked.InternalMock._executeOutstandingNextPriceRedeemsCallCheck({ + marketIndex, + user, + isLong: false, + }); + }); + + it("sets userNextPrice_currentUpdateIndex[marketIndex][user] to 0", () => { + let%Await updateduserNextPrice_currentUpdateIndex = + contracts^.longShort + ->LongShort.userNextPrice_currentUpdateIndex(marketIndex, user); + + Chai.bnEqual(updateduserNextPrice_currentUpdateIndex, zeroBn); + }); + + it( + "emits ExecuteNextPriceSettlementsUser event with correct parameters", + () => { + Chai.callEmitEvents( + ~call= + setup( + ~userNextPrice_currentUpdateIndex=defaultuserNextPrice_currentUpdateIndex, + ~marketUpdateIndex=defaultMarketUpdateIndex, + ), + ~eventName="ExecuteNextPriceSettlementsUser", + ~contract=contracts.contents.longShort->Obj.magic, + ) + ->Chai.withArgs2(user, marketIndex) + }); + }); + + describe("sad cases", () => { + it( + "doesn't emit ExecuteNextPriceSettlementsUser event if userNextPrice_currentUpdateIndex[marketIndex][user] = 0", + () => { + Chai.callEmitEvents( + ~call= + setup( + ~userNextPrice_currentUpdateIndex=bnFromInt(0), + ~marketUpdateIndex=defaultMarketUpdateIndex, + ), + ~eventName="ExecuteNextPriceSettlementsUser", + ~contract=contracts.contents.longShort->Obj.magic, + ) + ->Chai.expectToNotEmit + }); + + it( + "doesn't call nextPriceMint/nextPriceRedeem functions if userNextPrice_currentUpdateIndex[marketIndex][user] = 0", + () => { + let%Await _ = + setup( + ~userNextPrice_currentUpdateIndex=bnFromInt(0), + ~marketUpdateIndex=defaultMarketUpdateIndex, + ); + expect( + LongShortSmocked.InternalMock._executeOutstandingNextPriceMintsFunction(), + ) + ->toHaveCallCount(0); + expect( + LongShortSmocked.InternalMock._executeOutstandingNextPriceRedeemsFunction(), + ) + ->toHaveCallCount(0); + }, + ); + + it( + "doesn't emit ExecuteNextPriceSettlementsUser event if userNextPrice_currentUpdateIndex[marketIndex][user] > marketUpdateIndex[marketIndex]", + () => { + Chai.callEmitEvents( + ~call= + setup( + ~userNextPrice_currentUpdateIndex=defaultuserNextPrice_currentUpdateIndex, + ~marketUpdateIndex= + defaultuserNextPrice_currentUpdateIndex->sub(oneBn), + ), + ~eventName="ExecuteNextPriceSettlementsUser", + ~contract=contracts.contents.longShort->Obj.magic, + ) + ->Chai.expectToNotEmit + }); + + it( + "doesn't call nextPriceMint/nextPriceRedeem functions if userNextPrice_currentUpdateIndex[marketIndex][user] > marketUpdateIndex[marketIndex]", + () => { + let%Await _ = + setup( + ~userNextPrice_currentUpdateIndex=defaultuserNextPrice_currentUpdateIndex, + ~marketUpdateIndex= + defaultuserNextPrice_currentUpdateIndex->sub(oneBn), + ); + expect( + LongShortSmocked.InternalMock._executeOutstandingNextPriceMintsFunction(), + ) + ->toHaveCallCount(0); + expect( + LongShortSmocked.InternalMock._executeOutstandingNextPriceRedeemsFunction(), + ) + ->toHaveCallCount(0); + }, + ); + }); + }); +}; diff --git a/test/tests/longShort/ExecuteOutstandingNextPriceSettlementsUserMulti.re b/test/tests/longShort/ExecuteOutstandingNextPriceSettlementsUserMulti.re new file mode 100644 index 0000000..4cbb73d --- /dev/null +++ b/test/tests/longShort/ExecuteOutstandingNextPriceSettlementsUserMulti.re @@ -0,0 +1,51 @@ +open LetOps; +open Mocha; + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describe("executeOutstandingNextPriceSettlementsUserMulti", () => { + it( + "calls _executeOutstandingNextPriceSettlements with correct arguments for given array of market indexes", + () => { + let user = Helpers.randomAddress(); + let marketIndexes = [|1, 2, 3, 4|]; + + let%Await _ = + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="executeOutstandingNextPriceSettlementsUserMulti", + ); + + let%Await _ = + contracts.contents.longShort + ->LongShort.Exposed.executeOutstandingNextPriceSettlementsUserMulti( + ~user, + ~marketIndexes, + ); + + let _ = + LongShortSmocked.InternalMock._executeOutstandingNextPriceSettlementsCallCheck({ + user, + marketIndex: 1, + }); + let _ = + LongShortSmocked.InternalMock._executeOutstandingNextPriceSettlementsCallCheck({ + user, + marketIndex: 2, + }); + let _ = + LongShortSmocked.InternalMock._executeOutstandingNextPriceSettlementsCallCheck({ + user, + marketIndex: 3, + }); + LongShortSmocked.InternalMock._executeOutstandingNextPriceSettlementsCallCheck({ + user, + marketIndex: 4, + }); + }, + ) + }); +}; diff --git a/test/tests/longShort/GetUsersConfirmedButNotSettledBalance.re b/test/tests/longShort/GetUsersConfirmedButNotSettledBalance.re new file mode 100644 index 0000000..9d66940 --- /dev/null +++ b/test/tests/longShort/GetUsersConfirmedButNotSettledBalance.re @@ -0,0 +1,229 @@ +open LetOps; +open Mocha; +open Globals; + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describe("getUsersConfirmedButNotSettledSynthBalance", () => { + let user = Helpers.randomAddress(); + let isLong = + switch (Js.Math.random_int(0, 2)) { + | 0 => false + | _ => true + }; + let marketIndex = 1; + + before_once'(() => { + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="getUsersConfirmedButNotSettledSynthBalance", + ) + }); + + describe( + {j|[happy case] [isLong: $isLong] userNextPrice_currentUpdateIndex within bounds|j}, + () => { + let userNextPrice_currentUpdateIndex = oneBn; + let marketUpdateIndex = twoBn; + + describe( + "userNextPriceDepositAmount non-zero and userNextPrice_syntheticToken_toShiftAwayFrom_marketSide zero", + () => { + let userNextPrice_paymentToken_depositAmount_isLong = + Helpers.randomTokenAmount(); + let syntheticToken_priceSnapshot_isLong = + Helpers.randomTokenAmount(); + let syntheticToken_priceSnapshot_notIsLong = + Helpers.randomTokenAmount(); + let userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong = zeroBn; + + it("should return correct result", () => { + let%Await _ = + contracts.contents.longShort + ->LongShort.Exposed.setGetUsersConfirmedButNotSettledBalanceGlobals( + ~marketIndex, + ~user, + ~isLong, + ~userNextPrice_currentUpdateIndex, + ~marketUpdateIndex, + ~userNextPrice_paymentToken_depositAmount_isLong, + ~syntheticToken_priceSnapshot_isLong, + ~syntheticToken_priceSnapshot_notIsLong, + ~userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong, + ); + + let expectedResult = + userNextPrice_paymentToken_depositAmount_isLong + ->mul(tenToThe18) + ->div(syntheticToken_priceSnapshot_isLong); + let%Await actualResult = + contracts.contents.longShort + ->LongShort.getUsersConfirmedButNotSettledSynthBalance( + ~user, + ~marketIndex, + ~isLong, + ); + Chai.bnEqual(expectedResult, actualResult); + }); + }, + ); + + describe( + "userNextPriceDepositAmount zero and userNextPrice_syntheticToken_toShiftAwayFrom_marketSide non-zero", + () => { + let userNextPrice_paymentToken_depositAmount_isLong = zeroBn; + let syntheticToken_priceSnapshot_isLong = + Helpers.randomTokenAmount(); + let syntheticToken_priceSnapshot_notIsLong = + Helpers.randomTokenAmount(); + let userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong = + Helpers.randomTokenAmount(); + + it("should return correct result", () => { + let%Await _ = + contracts.contents.longShort + ->LongShort.Exposed.setGetUsersConfirmedButNotSettledBalanceGlobals( + ~marketIndex, + ~user, + ~isLong, + ~userNextPrice_currentUpdateIndex, + ~marketUpdateIndex, + ~userNextPrice_paymentToken_depositAmount_isLong, + ~syntheticToken_priceSnapshot_isLong, + ~syntheticToken_priceSnapshot_notIsLong, + ~userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong, + ); + + let expectedResult = + userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong + ->mul(syntheticToken_priceSnapshot_notIsLong) + ->div(syntheticToken_priceSnapshot_isLong); + let%Await actualResult = + contracts.contents.longShort + ->LongShort.getUsersConfirmedButNotSettledSynthBalance( + ~user, + ~marketIndex, + ~isLong, + ); + Chai.bnEqual(expectedResult, actualResult); + }); + }, + ); + describe( + "userNextPriceDepositAmount non-zero and userNextPrice_syntheticToken_toShiftAwayFrom_marketSide non-zero", + () => { + let userNextPrice_paymentToken_depositAmount_isLong = + Helpers.randomTokenAmount(); + let syntheticToken_priceSnapshot_isLong = + Helpers.randomTokenAmount(); + let syntheticToken_priceSnapshot_notIsLong = + Helpers.randomTokenAmount(); + let userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong = + Helpers.randomTokenAmount(); + + it("should return correct result", () => { + let%Await _ = + contracts.contents.longShort + ->LongShort.Exposed.setGetUsersConfirmedButNotSettledBalanceGlobals( + ~marketIndex, + ~user, + ~isLong, + ~userNextPrice_currentUpdateIndex, + ~marketUpdateIndex, + ~userNextPrice_paymentToken_depositAmount_isLong, + ~syntheticToken_priceSnapshot_isLong, + ~syntheticToken_priceSnapshot_notIsLong, + ~userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong, + ); + + let expectedResult = + userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong + ->mul(syntheticToken_priceSnapshot_notIsLong) + ->div(syntheticToken_priceSnapshot_isLong) + ->add( + userNextPrice_paymentToken_depositAmount_isLong + ->mul(tenToThe18) + ->div(syntheticToken_priceSnapshot_isLong), + ); + let%Await actualResult = + contracts.contents.longShort + ->LongShort.getUsersConfirmedButNotSettledSynthBalance( + ~user, + ~marketIndex, + ~isLong, + ); + Chai.bnEqual(expectedResult, actualResult); + }); + }, + ); + }, + ); + describe( + {j|[sad case] [isLong: $isLong] userNextPrice_currentUpdateIndex out of bounds|j}, + () => { + let userNextPrice_paymentToken_depositAmount_isLong = + Helpers.randomTokenAmount(); + let syntheticToken_priceSnapshot_isLong = Helpers.randomTokenAmount(); + let syntheticToken_priceSnapshot_notIsLong = + Helpers.randomTokenAmount(); + let userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong = + Helpers.randomTokenAmount(); + + let setup = (~userNextPrice_currentUpdateIndex, ~marketUpdateIndex) => { + contracts.contents.longShort + ->LongShort.Exposed.setGetUsersConfirmedButNotSettledBalanceGlobals( + ~marketIndex, + ~user, + ~isLong, + ~userNextPrice_currentUpdateIndex, + ~marketUpdateIndex, + ~userNextPrice_paymentToken_depositAmount_isLong, + ~syntheticToken_priceSnapshot_isLong, + ~syntheticToken_priceSnapshot_notIsLong, + ~userNextPrice_syntheticToken_toShiftAwayFrom_marketSide_notIsLong, + ); + }; + + it("returns 0 if userNextPrice_currentUpdateIndex == 0", () => { + let userNextPrice_currentUpdateIndex = zeroBn; + let marketUpdateIndex = oneBn; + + let%Await _ = + setup(~userNextPrice_currentUpdateIndex, ~marketUpdateIndex); + + let%Await result = + contracts^.longShort + ->LongShort.getUsersConfirmedButNotSettledSynthBalance( + ~user, + ~marketIndex, + ~isLong, + ); + + Chai.bnEqual(zeroBn, result); + }); + it( + "returns 0 if userNextPrice_currentUpdateIndex > currentMarketUpdateIndex", + () => { + let userNextPrice_currentUpdateIndex = twoBn; + let marketUpdateIndex = oneBn; + + let%Await _ = + setup(~userNextPrice_currentUpdateIndex, ~marketUpdateIndex); + + let%Await result = + contracts^.longShort + ->LongShort.getUsersConfirmedButNotSettledSynthBalance( + ~user, + ~marketIndex, + ~isLong, + ); + + Chai.bnEqual(zeroBn, result); + }); + }, + ); + }); +}; diff --git a/test/tests/longShort/InitializeMarket.re b/test/tests/longShort/InitializeMarket.re new file mode 100644 index 0000000..d766e13 --- /dev/null +++ b/test/tests/longShort/InitializeMarket.re @@ -0,0 +1,255 @@ +open LetOps; +open Mocha; +open Globals; + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describe("initializeMarket", () => { + let stakerSmockedRef = ref(StakerSmocked.uninitializedValue); + let longShortRef: ref(LongShort.t) = ref(""->Obj.magic); + + let sampleAddress = Ethers.Wallet.createRandom().address; + + let setup = (~marketIndex, ~marketIndexValue, ~latestMarket) => { + let {longShort} = contracts^; + longShortRef := longShort; + let%Await smocked = StakerSmocked.make(); + stakerSmockedRef := smocked; + let%Await _ = (longShortRef^)->LongShortSmocked.InternalMock.setup; + let%Await _ = + (longShortRef^) + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="initializeMarket", + ); + + (longShortRef^) + ->LongShort.Exposed.setInitializeMarketParams( + ~marketIndex, + ~marketIndexValue, + ~latestMarket, + ~staker=stakerSmockedRef^.address, + ~longAddress=sampleAddress, + ~shortAddress=sampleAddress, + ); + }; + + it( + "calls all functions (staker.addNewStakingFund, adminOnly, seedMarketInitially) and mutates state (marketExists) correctly", + () => { + let%Await _ = + setup(~marketIndex=1, ~marketIndexValue=false, ~latestMarket=1); + let%Await _ = + (longShortRef^) + ->ContractHelpers.connect(~address=(accounts^)->Array.getUnsafe(0)) + ->LongShort.initializeMarket( + ~marketIndex=1, + ~kPeriod=Ethers.BigNumber.fromUnsafe("4"), + ~kInitialMultiplier= + Ethers.BigNumber.fromUnsafe("60000000000000000"), + ~unstakeFee_e18=Ethers.BigNumber.fromUnsafe("5000000000000000"), // 0.5% or 50 basis points + ~initialMarketSeedForEachMarketSide=CONSTANTS.tenToThe18, + ~balanceIncentiveCurve_exponent=bnFromInt(5), + ~balanceIncentiveCurve_equilibriumOffset=bnFromInt(0), + ~marketTreasurySplitGradient_e18=bnFromInt(1), + ~marketLeverage=CONSTANTS.tenToThe18, + ); + + (stakerSmockedRef^) + ->StakerSmocked.addNewStakingFundCallCheck({ + kInitialMultiplier: + Ethers.BigNumber.fromUnsafe("60000000000000000"), + marketIndex: 1, + longToken: sampleAddress, + shortToken: sampleAddress, + kPeriod: Ethers.BigNumber.fromUnsafe("4"), + unstakeFee_e18: Ethers.BigNumber.fromUnsafe("5000000000000000"), // 0.5% or 50 basis points + balanceIncentiveCurve_exponent: bnFromInt(5), + balanceIncentiveCurve_equilibriumOffset: bnFromInt(0), + }); + + let%Await isMarket = (longShortRef^)->LongShort.marketExists(1); + + Chai.boolEqual(isMarket, true); + + LongShortSmocked.InternalMock._seedMarketInitiallyCallCheck({ + marketIndex: 1, + initialMarketSeedForEachMarketSide: CONSTANTS.tenToThe18, + }); + }, + ); + it("reverts if market exists", () => { + let%Await _ = + setup(~marketIndex=1, ~marketIndexValue=true, ~latestMarket=1); + let%Await _ = + Chai.expectRevertNoReason( + ~transaction= + (longShortRef^) + ->ContractHelpers.connect( + ~address=(accounts^)->Array.getUnsafe(0), + ) + ->LongShort.initializeMarket( + ~marketIndex=1, + ~kPeriod=Ethers.BigNumber.fromUnsafe("4"), + ~kInitialMultiplier= + Ethers.BigNumber.fromUnsafe("60000000000000000"), + ~unstakeFee_e18= + Ethers.BigNumber.fromUnsafe("5000000000000000"), // 0.5% or 50 basis points + ~initialMarketSeedForEachMarketSide=CONSTANTS.tenToThe18, + ~balanceIncentiveCurve_exponent=bnFromInt(5), + ~balanceIncentiveCurve_equilibriumOffset=bnFromInt(0), + ~marketTreasurySplitGradient_e18=bnFromInt(1), + ~marketLeverage=CONSTANTS.tenToThe18, + ), + ); + (); + }); + it("reverts if market index is greater than latest market index", () => { + let%Await _ = + setup(~marketIndex=1, ~marketIndexValue=false, ~latestMarket=1); + let%Await _ = + Chai.expectRevertNoReason( + ~transaction= + (longShortRef^) + ->ContractHelpers.connect( + ~address=(accounts^)->Array.getUnsafe(0), + ) + ->LongShort.initializeMarket( + ~marketIndex=2, + ~kPeriod=Ethers.BigNumber.fromUnsafe("4"), + ~kInitialMultiplier= + Ethers.BigNumber.fromUnsafe("60000000000000000"), + ~unstakeFee_e18= + Ethers.BigNumber.fromUnsafe("5000000000000000"), // 0.5% or 50 basis points + ~initialMarketSeedForEachMarketSide=CONSTANTS.tenToThe18, + ~balanceIncentiveCurve_exponent=bnFromInt(5), + ~balanceIncentiveCurve_equilibriumOffset=bnFromInt(0), + ~marketTreasurySplitGradient_e18=bnFromInt(1), + ~marketLeverage=CONSTANTS.tenToThe18, + ), + ); + (); + }); + }); +}; + +let testIntegration = + ( + ~contracts: ref(Helpers.coreContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describe("initializeMarket", () => { + it("Shouldn't allow initialization of a market that doesn't exist", () => { + let nonExistantMarket = 654654; + + Chai.expectRevert( + ~transaction= + contracts.contents.longShort + ->LongShort.initializeMarket( + ~marketIndex=nonExistantMarket, + ~kInitialMultiplier=CONSTANTS.oneBn, + ~kPeriod=CONSTANTS.oneBn, + ~unstakeFee_e18=Ethers.BigNumber.fromUnsafe("5000000000000000"), // 0.5% or 50 basis points + ~initialMarketSeedForEachMarketSide=CONSTANTS.tenToThe18, + ~balanceIncentiveCurve_exponent=bnFromInt(5), + ~balanceIncentiveCurve_equilibriumOffset=bnFromInt(0), + ~marketTreasurySplitGradient_e18=bnFromInt(1), + ~marketLeverage=CONSTANTS.tenToThe18, + ), + ~reason="index too high", + ); + }); + + it( + "Shouldn't allow initialization of a market that has already been initialized", + () => { + let {longShort, markets} = contracts.contents; + let {marketIndex} = markets->Array.getUnsafe(0); + + Chai.expectRevert( + ~transaction= + longShort->LongShort.initializeMarket( + ~marketIndex, + ~kInitialMultiplier=CONSTANTS.oneBn, + ~kPeriod=CONSTANTS.oneBn, + ~unstakeFee_e18=Ethers.BigNumber.fromUnsafe("5000000000000000"), // 0.5% or 50 basis points + ~initialMarketSeedForEachMarketSide=CONSTANTS.tenToThe18, + ~balanceIncentiveCurve_exponent=bnFromInt(5), + ~balanceIncentiveCurve_equilibriumOffset=bnFromInt(0), + ~marketTreasurySplitGradient_e18=bnFromInt(1), + ~marketLeverage=CONSTANTS.tenToThe18, + ), + ~reason="already initialized", + ); + }); + + it( + "Shouldn't allow initialization with less than 1 eth units of payment token", + () => { + let {longShort, markets} = contracts.contents; + let {paymentToken, oracleManager} = markets->Array.getUnsafe(0); + + let%Await lendingPoolAddressesProviderSmocked = + LendingPoolAddressesProviderMockSmocked.make(); + lendingPoolAddressesProviderSmocked->LendingPoolAddressesProviderMockSmocked.mockGetLendingPoolToReturn( + Helpers.randomAddress(), + ); + + //Can't deploy a market with the same yield manager as another market + let%Await newYieldManager = + Helpers.deployAYieldManager( + ~longShort=longShort.address, + ~lendingPoolAddressesProvider= + lendingPoolAddressesProviderSmocked.address, + ); + + let%Await _ = + longShort->LongShort.createNewSyntheticMarket( + ~syntheticName="Test", + ~syntheticSymbol="T", + ~paymentToken=paymentToken.address, + ~oracleManager=oracleManager.address, + ~yieldManager=newYieldManager.address, + ); + let%Await latestMarket = longShort->LongShort.latestMarket; + + Chai.expectRevert( + ~transaction= + longShort->LongShort.initializeMarket( + ~marketIndex=latestMarket, + ~kInitialMultiplier=CONSTANTS.tenToThe18, + ~kPeriod=CONSTANTS.oneBn, + ~unstakeFee_e18=Ethers.BigNumber.fromUnsafe("5000000000000000"), // 0.5% or 50 basis points + ~initialMarketSeedForEachMarketSide=CONSTANTS.oneBn, + ~balanceIncentiveCurve_exponent=bnFromInt(5), + ~balanceIncentiveCurve_equilibriumOffset=bnFromInt(0), + ~marketTreasurySplitGradient_e18=bnFromInt(1), + ~marketLeverage=CONSTANTS.tenToThe18, + ), + ~reason="Insufficient market seed", + ); + }); + + it( + "Shouldn't allow creation of a market with the a yield manager already in use", + () => { + let {longShort, markets} = contracts.contents; + let {paymentToken, oracleManager, yieldManager} = + markets->Array.getUnsafe(0); + + Chai.expectRevert( + ~transaction= + longShort->LongShort.createNewSyntheticMarket( + ~syntheticName="Test", + ~syntheticSymbol="T", + ~paymentToken=paymentToken.address, + ~oracleManager=oracleManager.address, + ~yieldManager=yieldManager.address, + ), + ~reason="Yield Manager is already in use", + ); + }); + }); +}; diff --git a/test/tests/longShort/MintNextPrice.re b/test/tests/longShort/MintNextPrice.re new file mode 100644 index 0000000..eb746a4 --- /dev/null +++ b/test/tests/longShort/MintNextPrice.re @@ -0,0 +1,297 @@ +open Globals; +open LetOps; +open Mocha; + +let testIntegration = + ( + ~contracts: ref(Helpers.coreContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => + describe("mintLongNextPrice", () => { + it("should work as expected happy path", () => { + // let admin = accounts.contents->Array.getUnsafe(0); + let testUser = accounts.contents->Array.getUnsafe(8); + let amountToNextPriceMint = Helpers.randomTokenAmount(); + + let {longShort, markets} = + // let {tokenFactory, treasury, floatToken, staker, longShort, markets} = + contracts.contents; + let { + paymentToken, + oracleManager, + // yieldManager, + longSynth, + // shortSynth, + marketIndex, + } = + markets->Array.getUnsafe(0); + + let%AwaitThen _longValueBefore = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + true /*long*/, + ); + + let%AwaitThen _ = + paymentToken->ERC20Mock.mint( + ~_to=testUser.address, + ~amount=amountToNextPriceMint, + ); + + let%AwaitThen _ = + paymentToken + ->ContractHelpers.connect(~address=testUser) + ->ERC20Mock.approve( + ~spender=longShort.address, + ~amount=amountToNextPriceMint, + ); + + let%AwaitThen _ = + longShort + ->ContractHelpers.connect(~address=testUser) + ->LongShort.mintLongNextPrice( + ~marketIndex, + ~amount=amountToNextPriceMint, + ); + + let%AwaitThen previousPrice = + oracleManager->OracleManagerMock.getLatestPrice; + + let nextPrice = + previousPrice + ->mul(bnFromInt(12)) // 20% increase + ->div(bnFromInt(10)); + + // let%AwaitThen userNextPriceActions = + // longShort->Contract.LongShort.userNextPriceActions( + // ~marketIndex, + // ~user=testUser.address, + // ); + + // let%AwaitThen usersBalanceBeforeOracleUpdate = + // longSynth->Contract.SyntheticToken.balanceOf( + // ~account=testUser.address, + // ); + + let%AwaitThen _ = + oracleManager->OracleManagerMock.setPrice(~newPrice=nextPrice); + + let%AwaitThen _ = longShort->LongShort.updateSystemState(~marketIndex); + + let%AwaitThen usersBalanceBeforeSettlement = + longSynth->SyntheticToken.balanceOf(~account=testUser.address); + + // This triggers the _executeOutstandingNextPriceSettlements function + let%AwaitThen _ = + longShort + ->ContractHelpers.connect(~address=testUser) + ->LongShort.mintLongNextPrice(~marketIndex, ~amount=bnFromInt(0)); + let%AwaitThen usersUpdatedBalance = + longSynth->SyntheticToken.balanceOf(~account=testUser.address); + + Chai.bnEqual( + ~message= + "Balance after price system update but before user settlement should be the same as after settlement", + usersBalanceBeforeSettlement, + usersUpdatedBalance, + ); + + let%Await longTokenPrice = + longShort->Contract.LongShortHelpers.getSyntheticTokenPrice( + ~marketIndex, + ~isLong=true, + ); + + let expectedNumberOfTokensToRecieve = + amountToNextPriceMint + ->mul(CONSTANTS.tenToThe18) + ->div(longTokenPrice); + + Chai.bnEqual( + ~message="balance is incorrect", + expectedNumberOfTokensToRecieve, + usersUpdatedBalance, + ); + }) + }); + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describeUnit("mintNextPrice external functions", () => { + let marketIndex = 1; + let amount = Helpers.randomTokenAmount(); + + before_once'(() => + contracts.contents.longShort->LongShortSmocked.InternalMock.setup + ); + + describe("mintLongNextPrice", () => { + it("calls _mintNextPrice with isLong==true", () => { + let%Await _ = + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="mintLongNextPrice", + ); + + let%Await _ = + contracts.contents.longShort + ->LongShort.mintLongNextPrice(~marketIndex, ~amount); + + LongShortSmocked.InternalMock._mintNextPriceCallCheck({ + marketIndex, + amount, + isLong: true, + }); + }) + }); + + describe("mintShortNextPrice", () => { + it("calls _mintNextPrice with isLong==false", () => { + let%Await _ = + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="mintShortNextPrice", + ); + + let%Await _ = + contracts.contents.longShort + ->LongShort.mintShortNextPrice(~marketIndex, ~amount); + + // let mintNextPriceCallCheck = + // LongShortSmocked.InternalMock._mintNextPriceCallCheck(); + + LongShortSmocked.InternalMock._mintNextPriceCallCheck({ + marketIndex, + amount, + isLong: false, + }); + }) + }); + }); + + describe("mintNextPrice internal function", () => { + let marketIndex = 1; + let marketUpdateIndex = Helpers.randomInteger(); + let amount = Helpers.randomTokenAmount(); + let mintNextPriceExposedTxRef = ref("Not defined yet"->Obj.magic); + + let testMarketSide = (~isLong) => { + before_once'(() => { + Js.log("Running" ++ (isLong ? "Long" : "Short")); + let testWallet = accounts.contents->Array.getUnsafe(1); + + let%AwaitThen _ = + contracts.contents.longShort->LongShortSmocked.InternalMock.setup; + + let%AwaitThen _ = + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="_mintNextPrice", + ); + + let%AwaitThen _ = + contracts.contents.longShort + ->LongShortStateSetters.setMarketUpdateIndex( + ~marketIndex, + ~marketUpdateIndex, + ); + + let longShort = + contracts.contents.longShort + ->ContractHelpers.connect(~address=testWallet); + + mintNextPriceExposedTxRef := + longShort->LongShort.Exposed._mintNextPriceExposed( + ~marketIndex, + ~amount, + ~isLong, + ); + mintNextPriceExposedTxRef.contents; + }); + + it("calls the executeOutstandingNextPriceSettlements modifier", () => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + LongShortSmocked.InternalMock._executeOutstandingNextPriceSettlementsCallCheck({ + user: testWallet.address, + marketIndex, + }); + }); + + it("emits the NextPriceDeposit event", () => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + Chai.callEmitEvents( + ~call=mintNextPriceExposedTxRef.contents, + ~eventName="NextPriceDeposit", + ~contract=contracts.contents.longShort->Obj.magic, + ) + ->Chai.withArgs5( + marketIndex, + isLong, + amount, + testWallet.address, + marketUpdateIndex->add(oneBn), + ); + }); + + it("calls depositFunds with correct parameters", () => { + LongShortSmocked.InternalMock._transferPaymentTokensFromUserToYieldManagerCallCheck({ + marketIndex, + amount, + }) + }); + + it("updates the correct state variables with correct values", () => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + let%AwaitThen updatedBatchedAmountOfTokens_deposit = + contracts.contents.longShort + ->LongShort.batched_amountPaymentToken_deposit(marketIndex, isLong); + + let%AwaitThen updatedUserNextPriceDepositAmount = + contracts.contents.longShort + ->LongShort.userNextPrice_paymentToken_depositAmount( + marketIndex, + isLong, + testWallet.address, + ); + + let%Await updateduserNextPrice_currentUpdateIndex = + contracts.contents.longShort + ->LongShort.userNextPrice_currentUpdateIndex( + marketIndex, + testWallet.address, + ); + + Chai.bnEqual( + ~message="batched_amountPaymentToken_deposit not updated correctly", + updatedBatchedAmountOfTokens_deposit, + amount, + ); + + Chai.bnEqual( + ~message="userNextPriceDepositAmount not updated correctly", + updatedUserNextPriceDepositAmount, + amount, + ); + + Chai.bnEqual( + ~message="userNextPrice_currentUpdateIndex not updated correctly", + updateduserNextPrice_currentUpdateIndex, + marketUpdateIndex->add(oneBn), + ); + }); + }; + + describe("long", () => { + testMarketSide(~isLong=true) + }); + describe("short", () => { + testMarketSide(~isLong=false) + }); + }); +}; diff --git a/test/tests/longShort/PriceCalculationFunctions.re b/test/tests/longShort/PriceCalculationFunctions.re new file mode 100644 index 0000000..8d0dfad --- /dev/null +++ b/test/tests/longShort/PriceCalculationFunctions.re @@ -0,0 +1,89 @@ +open LetOps; +open Mocha; +open Helpers; + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describe("_getSyntheticTokenPrice", () => { + it("should test function returns correct price", () => { + let randomAmountPaymentToken = Helpers.randomTokenAmount(); + let randomAmountSyntheticToken = Helpers.randomTokenAmount(); + + let%Await actualResult = + contracts^.longShort + ->LongShort.Exposed._getSyntheticTokenPriceExposed( + ~amountPaymentTokenBackingSynth=randomAmountPaymentToken, + ~amountSyntheticToken=randomAmountSyntheticToken, + ); + + let expectedResult = + Contract.LongShortHelpers.calcSyntheticTokenPrice( + ~amountPaymentToken=randomAmountPaymentToken, + ~amountSyntheticToken=randomAmountSyntheticToken, + ); + + Chai.bnEqual( + ~message= + "expected result different to actual result for _getSyntheticTokenPrice call", + actualResult, + expectedResult, + ); + }) + }); + + describe("_getAmountPaymentToken", () => { + it("should test function returns correct amount", () => { + let randomAmountSyntheticToken = Helpers.randomTokenAmount(); + let randomTokenPrice = Helpers.randomTokenAmount(); + + let%Await actualResult = + contracts^.longShort + ->LongShort.Exposed._getAmountPaymentTokenExposed( + ~amountSyntheticToken=randomAmountSyntheticToken, + ~syntheticTokenPriceInPaymentTokens=randomTokenPrice, + ); + + let expectedResult = + Contract.LongShortHelpers.calcAmountPaymentToken( + ~amountSyntheticToken=randomAmountSyntheticToken, + ~price=randomTokenPrice, + ); + Chai.bnEqual( + ~message= + "expected result different to actual result for _getAmountPaymentToken call", + actualResult, + expectedResult, + ); + }) + }); + + describe("_getAmountSyntheticToken", () => { + it("should test function returns correct amount", () => { + let randomAmountPaymentToken = Helpers.randomTokenAmount(); + let randomTokenPrice = Helpers.randomTokenAmount(); + + let%Await actualResult = + contracts^.longShort + ->LongShort.Exposed._getAmountSyntheticTokenExposed( + ~amountPaymentTokenBackingSynth=randomAmountPaymentToken, + ~syntheticTokenPriceInPaymentTokens=randomTokenPrice, + ); + + let expectedResult = + Contract.LongShortHelpers.calcAmountSyntheticToken( + ~amountPaymentToken=randomAmountPaymentToken, + ~price=randomTokenPrice, + ); + + Chai.bnEqual( + ~message= + "expected result different to actual result for _getAmountSyntheticTokencd call", + actualResult, + expectedResult, + ); + }) + }); +}; diff --git a/test/tests/longShort/RedeemNextPrice.re b/test/tests/longShort/RedeemNextPrice.re new file mode 100644 index 0000000..2fafbf4 --- /dev/null +++ b/test/tests/longShort/RedeemNextPrice.re @@ -0,0 +1,338 @@ +open Globals; +open LetOps; +open Mocha; + +let testIntegration = + ( + ~contracts: ref(Helpers.coreContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => + describe("nextPriceRedeem", () => { + let runNextPriceRedeemTest = (~isLong) => + it( + "should work as expected happy path for redeem " + ++ (isLong ? "Long" : "Short"), + () => { + let testUser = accounts.contents->Array.getUnsafe(8); + let amountToNextPriceMint = Helpers.randomTokenAmount(); + + let {longShort, markets} = contracts.contents; + + let longShortUserConnected = + longShort->ContractHelpers.connect(~address=testUser); + + let { + paymentToken, + oracleManager, + longSynth, + shortSynth, + marketIndex, + } = + markets->Array.getUnsafe(0); + + let testSynth = isLong ? longSynth : shortSynth; + let redeemNextPriceFunction = + isLong + ? LongShort.redeemLongNextPrice : LongShort.redeemShortNextPrice; + + let%AwaitThen _longValueBefore = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + isLong, + ); + + let%AwaitThen _ = + paymentToken->ERC20Mock.mint( + ~_to=testUser.address, + ~amount=amountToNextPriceMint, + ); + + let%AwaitThen _ = + paymentToken->ERC20Mock.setShouldMockTransfer(~value=false); + + let%AwaitThen _ = + paymentToken + ->ContractHelpers.connect(~address=testUser) + ->ERC20Mock.approve( + ~spender=longShort.address, + ~amount=amountToNextPriceMint, + ); + + let%AwaitThen _ = + HelperActions.mintDirect( + ~marketIndex, + ~amount=amountToNextPriceMint, + ~token=paymentToken, + ~user=testUser, + ~longShort, + ~oracleManagerMock=oracleManager, + ~isLong, + ); + + let%AwaitThen usersBalanceAvailableForRedeem = + testSynth->SyntheticToken.balanceOf(~account=testUser.address); + let%AwaitThen _ = + longShortUserConnected->redeemNextPriceFunction( + ~marketIndex, + ~tokens_redeem=usersBalanceAvailableForRedeem, + ); + let%AwaitThen usersBalanceAfterNextPriceRedeem = + testSynth->SyntheticToken.balanceOf(~account=testUser.address); + + Chai.bnEqual( + ~message= + "Balance after price system update but before user settlement should be the same as after settlement", + usersBalanceAfterNextPriceRedeem, + CONSTANTS.zeroBn, + ); + + let%AwaitThen paymentTokenBalanceBeforeWithdrawal = + paymentToken->ERC20Mock.balanceOf(~account=testUser.address); + + let%AwaitThen previousPrice = + oracleManager->OracleManagerMock.getLatestPrice; + + let nextPrice = + previousPrice + ->mul(bnFromInt(12)) // 20% increase + ->div(bnFromInt(10)); + + let%AwaitThen _ = + oracleManager->OracleManagerMock.setPrice(~newPrice=nextPrice); + + let%AwaitThen _ = + longShort->LongShort.updateSystemState(~marketIndex); + let%AwaitThen latestUpdateIndex = + longShort->LongShort.marketUpdateIndex(marketIndex); + let%AwaitThen redemptionPriceWithFees = + longShort->LongShort.syntheticToken_priceSnapshot( + marketIndex, + isLong, + latestUpdateIndex, + ); + + let amountExpectedToBeRedeemed = + usersBalanceAvailableForRedeem + ->mul(redemptionPriceWithFees) + ->div(CONSTANTS.tenToThe18); + + let%AwaitThen _ = + longShort->LongShort.executeOutstandingNextPriceSettlementsUser( + ~marketIndex, + ~user=testUser.address, + ); + + let%Await paymentTokenBalanceAfterWithdrawal = + paymentToken->ERC20Mock.balanceOf(~account=testUser.address); + + let deltaBalanceChange = + paymentTokenBalanceAfterWithdrawal->sub( + paymentTokenBalanceBeforeWithdrawal, + ); + + Chai.bnEqual( + ~message="Balance of paymentToken didn't update correctly", + deltaBalanceChange, + amountExpectedToBeRedeemed, + ); + }, + ); + + runNextPriceRedeemTest(~isLong=true); + runNextPriceRedeemTest(~isLong=false); + }); + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describe("redeemNextPrice external functions", () => { + let marketIndex = 1; + let tokens_redeem = Helpers.randomTokenAmount(); + + before_once'(() => + contracts.contents.longShort->LongShortSmocked.InternalMock.setup + ); + + describe("redeemLongNextPrice", () => { + it("calls _redeemNextPrice with isLong==true", () => { + let%Await _ = + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="redeemLongNextPrice", + ); + + let%Await _ = + contracts.contents.longShort + ->LongShort.redeemLongNextPrice(~marketIndex, ~tokens_redeem); + + LongShortSmocked.InternalMock._redeemNextPriceCallCheck({ + marketIndex, + tokens_redeem, + isLong: true, + }); + }) + }); + + describe("redeemShortNextPrice", () => { + it("calls _redeemNextPrice with isLong==false", () => { + let%Await _ = + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="redeemShortNextPrice", + ); + + let%Await _ = + contracts.contents.longShort + ->LongShort.redeemShortNextPrice(~marketIndex, ~tokens_redeem); + + LongShortSmocked.InternalMock._redeemNextPriceCallCheck({ + marketIndex, + tokens_redeem, + isLong: false, + }); + }) + }); + }); + + describe("redeemNextPrice internal function", () => { + let marketIndex = 1; + let marketUpdateIndex = Helpers.randomInteger(); + let amount = Helpers.randomTokenAmount(); + let smockedSyntheticToken = ref(SyntheticTokenSmocked.uninitializedValue); + let redeemNextPriceExposedTxRef = ref("Not defined yet"->Obj.magic); + + let testMarketSide = (~isLong) => { + before_once'(() => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + let%AwaitThen longSynthSmocked = SyntheticTokenSmocked.make(); + longSynthSmocked->SyntheticTokenSmocked.mockTransferFromToReturn( + true, + ); + smockedSyntheticToken := longSynthSmocked; + + let%AwaitThen _ = + contracts.contents.longShort->LongShortSmocked.InternalMock.setup; + + let%AwaitThen _ = + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="_redeemNextPrice", + ); + + let%AwaitThen _ = + contracts.contents.longShort + ->LongShort.Exposed.setRedeemNextPriceGlobals( + ~marketIndex, + ~marketUpdateIndex, + ~syntheticToken=longSynthSmocked.address, + ~isLong, + ); + + let longShort = + contracts.contents.longShort + ->ContractHelpers.connect(~address=testWallet); + + redeemNextPriceExposedTxRef := + longShort->LongShort.Exposed._redeemNextPriceExposed( + ~marketIndex, + ~tokens_redeem=amount, + ~isLong, + ); + redeemNextPriceExposedTxRef.contents; + }); + + it("calls the executeOutstandingNextPriceSettlements modifier", () => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + LongShortSmocked.InternalMock._executeOutstandingNextPriceSettlementsCallCheck({ + user: testWallet.address, + marketIndex, + }); + }); + + it("emits the NextPriceRedeem event", () => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + Chai.callEmitEvents( + ~call=redeemNextPriceExposedTxRef.contents, + ~eventName="NextPriceRedeem", + ~contract=contracts.contents.longShort->Obj.magic, + ) + ->Chai.withArgs5( + marketIndex, + isLong, + amount, + testWallet.address, + marketUpdateIndex->add(oneBn), + ); + }); + + it( + "transfers synthetic tokens (calls transferFrom with the correct parameters)", + () => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + smockedSyntheticToken.contents + ->SyntheticTokenSmocked.transferFromCallCheck({ + sender: testWallet.address, + recipient: contracts.contents.longShort.address, + amount, + }); + }); + + it("updates the correct state variables with correct values", () => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + let%AwaitThen updatedbatched_amountSyntheticToken_redeem = + contracts.contents.longShort + ->LongShort.batched_amountSyntheticToken_redeem( + marketIndex, + isLong, + ); + + let%AwaitThen updatedUserNextPriceRedemptionAmount = + contracts.contents.longShort + ->LongShort.userNextPrice_syntheticToken_redeemAmount( + marketIndex, + isLong, + testWallet.address, + ); + + let%Await updateduserNextPrice_currentUpdateIndex = + contracts.contents.longShort + ->LongShort.userNextPrice_currentUpdateIndex( + marketIndex, + testWallet.address, + ); + + Chai.bnEqual( + ~message="batched_amountSyntheticToken_redeem not updated correctly", + updatedbatched_amountSyntheticToken_redeem, + amount, + ); + + Chai.bnEqual( + ~message="userNextPriceRedemptionAmount not updated correctly", + updatedUserNextPriceRedemptionAmount, + amount, + ); + + Chai.bnEqual( + ~message="userNextPrice_currentUpdateIndex not updated correctly", + updateduserNextPrice_currentUpdateIndex, + marketUpdateIndex->add(oneBn), + ); + }); + }; + + describe("long", () => { + testMarketSide(~isLong=true) + }); + describe("short", () => { + testMarketSide(~isLong=false) + }); + }); +}; diff --git a/test/tests/longShort/ShiftNextPrice.re b/test/tests/longShort/ShiftNextPrice.re new file mode 100644 index 0000000..0548b57 --- /dev/null +++ b/test/tests/longShort/ShiftNextPrice.re @@ -0,0 +1,353 @@ +open Globals; +open LetOps; +open Mocha; +let testIntegration = + ( + ~contracts: ref(Helpers.coreContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => + describe("nextPriceShiftPosition", () => { + let runNextPriceShiftPositionTest = (~isShiftFromLong) => + it( + "should work as expected happy path for token shifting " + ++ (isShiftFromLong ? "Long" : "Short"), + () => { + let testUser = accounts.contents->Array.getUnsafe(8); + let amountToNextPriceMint = Helpers.randomTokenAmount(); + + let {longShort, markets} = contracts.contents; + + let longShortUserConnected = + longShort->ContractHelpers.connect(~address=testUser); + + let { + paymentToken, + oracleManager, + longSynth, + shortSynth, + marketIndex, + } = + markets->Array.getUnsafe(0); + + let fromSynth = isShiftFromLong ? longSynth : shortSynth; + let toSynth = isShiftFromLong ? shortSynth : longSynth; + let redeemNextPriceFunction = + isShiftFromLong + ? LongShort.shiftPositionFromLongNextPrice + : LongShort.shiftPositionFromShortNextPrice; + + let%AwaitThen _longValueBefore = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + isShiftFromLong, + ); + + let%AwaitThen _ = + paymentToken->ERC20Mock.mint( + ~_to=testUser.address, + ~amount=amountToNextPriceMint, + ); + + let%AwaitThen _ = + paymentToken->ERC20Mock.setShouldMockTransfer(~value=false); + + let%AwaitThen _ = + paymentToken + ->ContractHelpers.connect(~address=testUser) + ->ERC20Mock.approve( + ~spender=longShort.address, + ~amount=amountToNextPriceMint, + ); + + let%AwaitThen _ = + HelperActions.mintDirect( + ~marketIndex, + ~amount=amountToNextPriceMint, + ~token=paymentToken, + ~user=testUser, + ~longShort, + ~oracleManagerMock=oracleManager, + ~isLong=isShiftFromLong, + ); + + let%AwaitThen usersBalanceAvailableForShift = + fromSynth->SyntheticToken.balanceOf(~account=testUser.address); + let%AwaitThen _ = + longShortUserConnected->redeemNextPriceFunction( + ~marketIndex, + ~amountSyntheticTokensToShift=usersBalanceAvailableForShift, + ); + let%AwaitThen usersBalanceAfterNextPriceShift = + fromSynth->SyntheticToken.balanceOf(~account=testUser.address); + + Chai.bnEqual( + ~message= + "Balance after price system update but before user settlement should be the same as after settlement", + usersBalanceAfterNextPriceShift, + CONSTANTS.zeroBn, + ); + + let%AwaitThen otherSyntheticTokenBalanceBeforeShift = + toSynth->SyntheticToken.balanceOf(~account=testUser.address); + + let%AwaitThen previousPrice = + oracleManager->OracleManagerMock.getLatestPrice; + + let nextPrice = + previousPrice + ->mul(bnFromInt(12)) // 20% increase + ->div(bnFromInt(10)); + + let%AwaitThen _ = + oracleManager->OracleManagerMock.setPrice(~newPrice=nextPrice); + + let%AwaitThen _ = + longShort->LongShort.updateSystemState(~marketIndex); + let%AwaitThen latestUpdateIndex = + longShort->LongShort.marketUpdateIndex(marketIndex); + let%AwaitThen shiftPriceFromSynth = + longShort->LongShort.syntheticToken_priceSnapshot( + marketIndex, + isShiftFromLong, + latestUpdateIndex, + ); + let%AwaitThen shiftPriceToSynth = + longShort->LongShort.syntheticToken_priceSnapshot( + marketIndex, + !isShiftFromLong, + latestUpdateIndex, + ); + + let amountSyntheticTokenExpectedToRecieveOnOtherSide = + usersBalanceAvailableForShift + ->mul(shiftPriceFromSynth) + ->div(shiftPriceToSynth); + + let%AwaitThen _ = + longShort->LongShort.executeOutstandingNextPriceSettlementsUser( + ~marketIndex, + ~user=testUser.address, + ); + + let%Await toSynthBalanceAfterShift = + toSynth->SyntheticToken.balanceOf(~account=testUser.address); + + let deltaBalanceChange = + toSynthBalanceAfterShift->sub( + otherSyntheticTokenBalanceBeforeShift, + ); + + Chai.bnEqual( + ~message="Balance of paymentToken didn't update correctly", + deltaBalanceChange, + amountSyntheticTokenExpectedToRecieveOnOtherSide, + ); + }, + ); + + runNextPriceShiftPositionTest(~isShiftFromLong=true); + // runNextPriceShiftPositionTest(~isShiftFromLong=false); + }); + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describe("shiftNextPrice external functions", () => { + let marketIndex = 1; + let amountSyntheticTokensToShift = Helpers.randomTokenAmount(); + + before_once'(() => + contracts.contents.longShort->LongShortSmocked.InternalMock.setup + ); + + describe("shiftPositionFromLongNextPrice", () => { + it("calls _shiftPositionNextPrice with isShiftFromLong==true", () => { + let%Await _ = + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="shiftPositionFromLongNextPrice", + ); + + let%Await _ = + contracts.contents.longShort + ->LongShort.shiftPositionFromLongNextPrice( + ~marketIndex, + ~amountSyntheticTokensToShift, + ); + + LongShortSmocked.InternalMock.shiftPositionNextPriceCallCheck({ + marketIndex, + amountSyntheticTokensToShift, + isShiftFromLong: true, + }); + }) + }); + + describe("shiftPositionFromShortNextPrice", () => { + it("calls _shiftPositionNextPrice with isShiftFromLong==false", () => { + let%Await _ = + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="shiftPositionFromShortNextPrice", + ); + + let%Await _ = + contracts.contents.longShort + ->LongShort.shiftPositionFromShortNextPrice( + ~marketIndex, + ~amountSyntheticTokensToShift, + ); + + LongShortSmocked.InternalMock.shiftPositionNextPriceCallCheck({ + marketIndex, + amountSyntheticTokensToShift, + isShiftFromLong: false, + }); + }) + }); + }); + + describe("shiftPositionNextPrice function", () => { + let marketIndex = 1; + let marketUpdateIndex = Helpers.randomInteger(); + let amount = Helpers.randomTokenAmount(); + let smockedSyntheticToken = ref(SyntheticTokenSmocked.uninitializedValue); + let shiftPositionNextPriceExposedTxRef = + ref("Not defined yet"->Obj.magic); + + let testMarketSide = (~isShiftFromLong) => { + before_once'(() => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + let {longShort} = contracts.contents; + + let%AwaitThen longSynthSmocked = SyntheticTokenSmocked.make(); + longSynthSmocked->SyntheticTokenSmocked.mockTransferFromToReturn( + true, + ); + smockedSyntheticToken := longSynthSmocked; + + let%AwaitThen _ = longShort->LongShortSmocked.InternalMock.setup; + + let%AwaitThen _ = + longShort->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="shiftPositionNextPrice", + ); + + let%AwaitThen _ = + longShort->LongShort.Exposed.setShiftNextPriceGlobals( + ~marketIndex, + ~marketUpdateIndex, + ~syntheticTokenShiftedFrom=longSynthSmocked.address, + ~isShiftFromLong, + ); + + let longShort = + longShort->ContractHelpers.connect(~address=testWallet); + + shiftPositionNextPriceExposedTxRef := + longShort->LongShort.shiftPositionNextPrice( + ~marketIndex, + ~amountSyntheticTokensToShift=amount, + ~isShiftFromLong, + ); + shiftPositionNextPriceExposedTxRef.contents; + }); + + it("calls the executeOutstandingNextPriceSettlements modifier", () => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + // TODO: fix bug in codegen that adds the modifiers to the generated code too (which means this gets called twice - even though it only gets called once!) + LongShortSmocked.InternalMock._executeOutstandingNextPriceSettlementsCallCheck({ + user: testWallet.address, + marketIndex, + }); + }); + + it("emits the NextPriceSyntheticPositionShift event", () => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + Chai.callEmitEvents( + ~call=shiftPositionNextPriceExposedTxRef.contents, + ~eventName="NextPriceSyntheticPositionShift", + ~contract=contracts.contents.longShort->Obj.magic, + ) + ->Chai.withArgs5( + marketIndex, + isShiftFromLong, + amount, + testWallet.address, + marketUpdateIndex->add(oneBn), + ); + }); + + it( + "transfers synthetic tokens (calls transferFrom with the correct parameters)", + () => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + smockedSyntheticToken.contents + ->SyntheticTokenSmocked.transferFromCallCheck({ + sender: testWallet.address, + recipient: contracts.contents.longShort.address, + amount, + }); + }); + + it("updates the correct state variables with correct values", () => { + let testWallet = accounts.contents->Array.getUnsafe(1); + + let%AwaitThen updatedbatched_amountSyntheticTokenToShiftMarketSide = + contracts.contents.longShort + ->LongShort.batched_amountSyntheticToken_toShiftAwayFrom_marketSide( + marketIndex, + isShiftFromLong, + ); + + let%AwaitThen updateduserNextPrice_syntheticToken_toShiftAwayFrom_marketSide = + contracts.contents.longShort + ->LongShort.userNextPrice_syntheticToken_toShiftAwayFrom_marketSide( + marketIndex, + isShiftFromLong, + testWallet.address, + ); + + let%Await updateduserNextPrice_currentUpdateIndex = + contracts.contents.longShort + ->LongShort.userNextPrice_currentUpdateIndex( + marketIndex, + testWallet.address, + ); + + Chai.bnEqual( + ~message= + "batched_amountSyntheticTokenToShiftMarketSide not updated correctly", + updatedbatched_amountSyntheticTokenToShiftMarketSide, + amount, + ); + + Chai.bnEqual( + ~message= + "userNextPrice_syntheticToken_toShiftAwayFrom_marketSide not updated correctly", + updateduserNextPrice_syntheticToken_toShiftAwayFrom_marketSide, + amount, + ); + + Chai.bnEqual( + ~message="userNextPrice_currentUpdateIndex not updated correctly", + updateduserNextPrice_currentUpdateIndex, + marketUpdateIndex->add(oneBn), + ); + }); + }; + + describe("long", () => { + testMarketSide(~isShiftFromLong=true) + }); + describe("short", () => { + testMarketSide(~isShiftFromLong=false) + }); + }); +}; diff --git a/test/tests/longShort/UpdateSystemState.re b/test/tests/longShort/UpdateSystemState.re new file mode 100644 index 0000000..07be35d --- /dev/null +++ b/test/tests/longShort/UpdateSystemState.re @@ -0,0 +1,551 @@ +open LetOps; +open Mocha; +open Globals; +open SmockGeneral; + +let randomValueChange = tokenAmount => { + tokenAmount + ->mul(Js.Math.random_int(-100, 101)->Ethers.BigNumber.fromInt) + ->div(Ethers.BigNumber.fromUnsafe("100")); +}; + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describeUnit("updateSystemState", () => { + describe("_updateSystemStateInternal", () => { + let marketIndex = Helpers.randomJsInteger(); + + let ( + oldAssetPrice, + oldLongPrice, + oldShortPrice, + oldLongValue, + oldShortValue, + oldLongValueAfterYield, + oldShortValueAfterYield, + ) = + Helpers.Tuple.make7(Helpers.randomTokenAmount); + + let (longSynthSupply, shortSynthSupply) = + Helpers.Tuple.make2(Helpers.randomTokenAmount); + + let valueChangeLong = randomValueChange(oldLongValueAfterYield); + let valueChangeShort = randomValueChange(oldShortValueAfterYield); + + let newAssetPrice = oldAssetPrice->add(oneBn); + + let latestUpdateIndexForMarket = Helpers.randomInteger(); + + let staker: ref(StakerSmocked.t) = ref(None->Obj.magic); + let oracle: ref(OracleManagerMockSmocked.t) = ref(None->Obj.magic); + let longSynth: ref(SyntheticTokenSmocked.t) = ref(None->Obj.magic); + let shortSynth: ref(SyntheticTokenSmocked.t) = ref(None->Obj.magic); + + let potentialNewLongPrice: ref(Ethers.BigNumber.t) = ref(zeroBn); + let potentialNewShortPrice: ref(Ethers.BigNumber.t) = ref(zeroBn); + let setup = + ( + ~oldAssetPrice, + ~newAssetPrice, + ~oldLongPrice, + ~oldShortPrice, + ~stakerNextPrice_currentUpdateIndex, + ) => { + let%AwaitThen _ = + contracts.contents.longShort->LongShortSmocked.InternalMock.setup; + let%AwaitThen _ = + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="_updateSystemStateInternal", + ); + + LongShortSmocked.InternalMock.mock_claimAndDistributeYieldThenRebalanceMarketToReturn( + oldLongValueAfterYield, + oldShortValueAfterYield, + ); + LongShortSmocked.InternalMock.mock_batchConfirmOutstandingPendingActionsToReturn( + valueChangeLong, + valueChangeShort, + ); + + let%AwaitThen stakerSmocked = StakerSmocked.make(); + + let%AwaitThen oracleSmocked = OracleManagerMockSmocked.make(); + + let _ = + oracleSmocked->OracleManagerMockSmocked.mockUpdatePriceToReturn( + newAssetPrice, + ); + + oracle := oracleSmocked; + staker := stakerSmocked; + + let%AwaitThen longSynthSmocked = SyntheticTokenSmocked.make(); + + longSynthSmocked->SyntheticTokenSmocked.mockTotalSupplyToReturn( + longSynthSupply, + ); + + longSynth := longSynthSmocked; + + let%AwaitThen shortSynthSmocked = SyntheticTokenSmocked.make(); + + shortSynthSmocked->SyntheticTokenSmocked.mockTotalSupplyToReturn( + shortSynthSupply, + ); + + shortSynth := shortSynthSmocked; + + let longShort = contracts.contents.longShort; + + // function is pure so we don't mock it + let%AwaitThen predictedLongPrice = + longShort->LongShort.Exposed._getSyntheticTokenPriceExposed( + ~amountPaymentTokenBackingSynth=oldLongValueAfterYield, + ~amountSyntheticToken=longSynthSupply, + ); + + potentialNewLongPrice := predictedLongPrice; + + let%AwaitThen predictedShortPrice = + longShort->LongShort.Exposed._getSyntheticTokenPriceExposed( + ~amountPaymentTokenBackingSynth=oldShortValueAfterYield, + ~amountSyntheticToken=shortSynthSupply, + ); + + potentialNewShortPrice := predictedShortPrice; + + let%AwaitThen _ = + longShort->LongShort.Exposed.set_updateSystemStateInternalGlobals( + ~marketIndex, + ~latestUpdateIndexForMarket, + ~syntheticTokenPrice_inPaymentTokens_long=oldLongPrice, + ~syntheticTokenPrice_inPaymentTokens_short=oldShortPrice, + ~assetPrice=oldAssetPrice, + ~oracleManager=oracleSmocked.address, + ~staker=stakerSmocked.address, + ~longValue=oldLongValue, + ~shortValue=oldShortValue, + ~synthLong=longSynthSmocked.address, + ~synthShort=shortSynthSmocked.address, + ~stakerNextPrice_currentUpdateIndex, + ); + + longShort->LongShort.Exposed._updateSystemStateInternalExposed( + ~marketIndex, + ); + }; + let setupWithoutPriceChange = + setup( + ~oldAssetPrice, + ~newAssetPrice=oldAssetPrice, + ~oldLongPrice, + ~oldShortPrice, + ); + + let assertNoUpdateStateOrNonOracleCallCheck = (~checkNoStakerCalls) => { + if (checkNoStakerCalls) { + expect( + staker.contents + ->StakerSmocked.pushUpdatedMarketPricesToUpdateFloatIssuanceCalculationsFunction, + ) + ->toHaveCallCount(0); + }; + + let%AwaitThen updateIndex = + contracts.contents.longShort + ->LongShort.marketUpdateIndex(marketIndex); + + let%AwaitThen newLongPrice = + contracts.contents.longShort + ->LongShort.syntheticToken_priceSnapshot( + marketIndex, + true, + updateIndex, + ); + + let%AwaitThen newShortPrice = + contracts.contents.longShort + ->LongShort.syntheticToken_priceSnapshot( + marketIndex, + false, + updateIndex, + ); + + let%Await assetPrice = + contracts.contents.longShort->LongShort.assetPrice(marketIndex); + + Chai.bnEqual(oldAssetPrice, assetPrice); + Chai.bnEqual(updateIndex, latestUpdateIndexForMarket); + Chai.bnEqual(newLongPrice, oldLongPrice); + Chai.bnEqual(newShortPrice, oldShortPrice); + + expect( + LongShortSmocked.InternalMock._claimAndDistributeYieldThenRebalanceMarketFunction(), + ) + ->toHaveCallCount(0); + expect( + LongShortSmocked.InternalMock._getSyntheticTokenPriceFunction(), + ) + ->toHaveCallCount(0); + expect( + LongShortSmocked.InternalMock._batchConfirmOutstandingPendingActionsFunction(), + ) + ->toHaveCallCount(0); + expect(longSynth.contents->SyntheticTokenSmocked.totalSupplyFunction) + ->toHaveCallCount(0); + expect(shortSynth.contents->SyntheticTokenSmocked.totalSupplyFunction) + ->toHaveCallCount(0); + }; + + it( + "shouldn't call pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations if there is no price update", + () => { + let%Await _ = + setupWithoutPriceChange( + ~stakerNextPrice_currentUpdateIndex=zeroBn, + ); + + assertNoUpdateStateOrNonOracleCallCheck(~checkNoStakerCalls=true); + }, + ); + it("calls for the latest price from the oracle", () => { + let%Await _ = + setupWithoutPriceChange(~stakerNextPrice_currentUpdateIndex=zeroBn); + oracle.contents->OracleManagerMockSmocked.updatePriceCallCheck; + }); + + describe("There is a price change", () => { + let setupWithPriceChange = + setup( + ~oldAssetPrice, + ~newAssetPrice, + ~oldLongPrice, + ~oldShortPrice, + ); + + it( + "it should call the pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations on the staker function if there is a price change", + () => { + let%Await _ = + setupWithPriceChange( + ~stakerNextPrice_currentUpdateIndex=zeroBn, + ); + staker.contents + ->StakerSmocked.pushUpdatedMarketPricesToUpdateFloatIssuanceCalculationsCallCheck({ + marketIndex, + marketUpdateIndex: latestUpdateIndexForMarket->add(oneBn), + longPrice: potentialNewLongPrice.contents, + shortPrice: potentialNewShortPrice.contents, + longValue: oldLongValueAfterYield->add(valueChangeLong), + shortValue: oldShortValueAfterYield->add(valueChangeShort), + }); + }, + ); + + it( + "it should call `_claimAndDistributeYieldThenRebalanceMarket` with correct arguments", + () => { + let%Await _ = + setupWithPriceChange( + ~stakerNextPrice_currentUpdateIndex=zeroBn, + ); + LongShortSmocked.InternalMock._claimAndDistributeYieldThenRebalanceMarketCallCheck({ + marketIndex, + newAssetPrice, + }); + }, + ); + it( + "it should call `_performOutstandingSettlements` with correct arguments", + () => { + let%Await _ = + setupWithPriceChange(~stakerNextPrice_currentUpdateIndex=zeroBn); + LongShortSmocked.InternalMock._batchConfirmOutstandingPendingActionsCallCheck({ + marketIndex, + syntheticTokenPrice_inPaymentTokens_long: + potentialNewLongPrice.contents, + syntheticTokenPrice_inPaymentTokens_short: + potentialNewShortPrice.contents, + }); + }); + + it("should call `totalSupply` on the long and short synth tokens", () => { + let%Await _ = + setupWithPriceChange(~stakerNextPrice_currentUpdateIndex=zeroBn); + longSynth.contents->SyntheticTokenSmocked.totalSupplyCallCheck; + + shortSynth.contents->SyntheticTokenSmocked.totalSupplyCallCheck; + }); + + it( + "should mutate syntheticToken_priceSnapshots for long and short correctly", + () => { + let%Await _ = + setupWithPriceChange(~stakerNextPrice_currentUpdateIndex=zeroBn); + let newUpdateIndex = latestUpdateIndexForMarket->add(oneBn); + let%AwaitThen newLongPrice = + contracts.contents.longShort + ->LongShort.syntheticToken_priceSnapshot( + marketIndex, + true, + newUpdateIndex, + ); + + let%Await newShortPrice = + contracts.contents.longShort + ->LongShort.syntheticToken_priceSnapshot( + marketIndex, + false, + newUpdateIndex, + ); + + newLongPrice->Chai.bnEqual(potentialNewLongPrice.contents); + newShortPrice->Chai.bnEqual(potentialNewShortPrice.contents); + }); + + it( + "should mutate marketSideValueInPaymentTokens for long and short correctly", + () => { + let%AwaitThen _ = + setupWithPriceChange(~stakerNextPrice_currentUpdateIndex=zeroBn); + let%AwaitThen newLongValue = + contracts.contents.longShort + ->LongShort.marketSideValueInPaymentToken(marketIndex, true); + + let%Await newShortValue = + contracts.contents.longShort + ->LongShort.marketSideValueInPaymentToken(marketIndex, false); + + newLongValue->Chai.bnEqual( + oldLongValueAfterYield->add(valueChangeLong), + ); + newShortValue->Chai.bnEqual( + oldShortValueAfterYield->add(valueChangeShort), + ); + }); + + it("it should update the (underlying) asset price correctly", () => { + let%AwaitThen _ = + setupWithPriceChange(~stakerNextPrice_currentUpdateIndex=zeroBn); + let%Await assetPrice = + contracts.contents.longShort->LongShort.assetPrice(marketIndex); + Chai.bnEqual(assetPrice, newAssetPrice); + }); + + it("it should increment the marketUpdateIndex by 1", () => { + let%AwaitThen _ = + setupWithPriceChange(~stakerNextPrice_currentUpdateIndex=zeroBn); + let%Await updateIndex = + contracts.contents.longShort + ->LongShort.marketUpdateIndex(marketIndex); + Chai.bnEqual(latestUpdateIndexForMarket->add(oneBn), updateIndex); + }); + + it( + "it should emit the SystemStateUpdated event with the correct arguments", + () => { + Chai.callEmitEvents( + ~call= + setupWithPriceChange( + ~stakerNextPrice_currentUpdateIndex=zeroBn, + ), + ~eventName="SystemStateUpdated", + ~contract=contracts.contents.longShort->Obj.magic, + ) + ->Chai.withArgs7( + marketIndex, + latestUpdateIndexForMarket->add(oneBn), + newAssetPrice, + oldLongValueAfterYield->add(valueChangeLong), + oldShortValueAfterYield->add(valueChangeShort), + potentialNewLongPrice.contents, + potentialNewShortPrice.contents, + ) + }); + }); + }); + + let setupWithUpdateSystemStateInternalMocked = (~functionName) => { + let%AwaitThen _ = + contracts.contents.longShort->LongShortSmocked.InternalMock.setup; + contracts.contents.longShort + ->LongShortSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName, + ); + }; + describe("updateSystemStateMulti", () => { + it( + "should call `_updateSystemStateInternal` for each market in the array", + () => { + let marketIndexes = + Array.makeBy(Js.Math.random_int(0, 51), _ => + Helpers.randomJsInteger() + ); + let%AwaitThen _ = + setupWithUpdateSystemStateInternalMocked( + ~functionName="updateSystemStateMulti", + ); + + // we don't mock modifiers + let%AwaitThen _ = + contracts.contents.longShort + ->LongShort.Exposed.setMarketExistsMulti(~marketIndexes); + + let%Await _ = + contracts.contents.longShort + ->LongShort.updateSystemStateMulti(~marketIndexes); + + marketIndexes->Array.map(index => { + LongShortSmocked.InternalMock._updateSystemStateInternalCallCheck({ + marketIndex: index, + }) + }); + }) + }); + describe("updateSystemState", () => { + it( + "should call to `_updateSystemStateInternal` with the correct market as an argument", + () => { + let marketIndex = Helpers.randomJsInteger(); + let%AwaitThen _ = + setupWithUpdateSystemStateInternalMocked( + ~functionName="updateSystemState", + ); + + let%AwaitThen _ = + contracts.contents.longShort + ->LongShort.Exposed.setMarketExistsMulti( + ~marketIndexes=[|marketIndex|], + ); + + let%Await _ = + contracts.contents.longShort + ->LongShort.updateSystemState(~marketIndex); + + LongShortSmocked.InternalMock._updateSystemStateInternalCallCheck({ + marketIndex: marketIndex, + }); + }, + ) + }); + }); +}; + +let testIntegration = + ( + ~contracts: ref(Helpers.coreContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describe("updateSystemState", () => { + let testDistributeYield = (~longIsOverBalanced) => + it( + "distribute yield to markets flow " + ++ ( + longIsOverBalanced ? "(long over balanced)" : "(short over balanced)" + ), + () => { + let {longShort, markets} = contracts.contents; + let {yieldManager, oracleManager, marketIndex, paymentToken} = + markets->Array.getUnsafe(0); + let testUser = accounts.contents->Array.getUnsafe(2); + + // 32.1... DAI - any random amount would do... + let amountOfYieldToAward = bnFromString("3216543216543216542"); + + let%Await amountToMintToGuaranteeImbalance = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + !longIsOverBalanced, + ); + // Make sure the correct side is over-balanced! + let%AwaitThen _ = + HelperActions.mintDirect( + ~marketIndex, + ~amount=amountToMintToGuaranteeImbalance, + ~token=paymentToken, + ~user=testUser, + ~longShort, + ~oracleManagerMock=oracleManager, + ~isLong=longIsOverBalanced, + ); + + // get total balance pools etc before (and amount for treasury) + let%Await longTokenPoolValueBefore = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + true, + ); + let%Await shortTokenPoolValueBefore = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + false, + ); + + let%Await totalDueForTreasuryBefore = + yieldManager->YieldManagerMock.totalReservedForTreasury; + let totalValueRelatedToMarketBefore = + longTokenPoolValueBefore + ->add(shortTokenPoolValueBefore) + ->add(totalDueForTreasuryBefore); + + // add some yield + let _ = + yieldManager->YieldManagerMock.settleWithYieldAbsolute( + ~totalYield=amountOfYieldToAward, + ); + + // update oracle price + let%Await currentOraclePrice = + oracleManager->OracleManagerMock.getLatestPrice; + let%Await _ = + oracleManager->OracleManagerMock.setPrice( + ~newPrice=currentOraclePrice->add(bnFromInt(1)), + ); + + // run long short update state + let%Await _ = longShort->LongShort.updateSystemState(~marketIndex); + + // get total balance pools after and amount for treasury + let%Await longTokenPoolValueAfter = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + true, + ); + let%Await shortTokenPoolValueAfter = + longShort->LongShort.marketSideValueInPaymentToken( + marketIndex, + false, + ); + let%Await totalDueForTreasuryAfter = + yieldManager->YieldManagerMock.totalReservedForTreasury; + let totalValueRelatedToMarketAfter = + longTokenPoolValueAfter + ->add(shortTokenPoolValueAfter) + ->add(totalDueForTreasuryAfter); + + Chai.bnEqual( + ~message= + "yield is either being lost or over-allocated - should be exactly the same", + totalValueRelatedToMarketBefore->add(amountOfYieldToAward), + totalValueRelatedToMarketAfter, + ); + }, + ); + + testDistributeYield(~longIsOverBalanced=true); + testDistributeYield(~longIsOverBalanced=false); + it("cannot call updateSystemState on a market that doesn't exist", () => { + let nonExistantMarketIndex = 321321654; + Chai.expectRevert( + ~transaction= + contracts.contents.longShort + ->LongShort.updateSystemState(~marketIndex=nonExistantMarketIndex), + ~reason="market doesn't exist", + ); + }); + }); +}; diff --git a/test/tests/longShort/UtilsHelpers.re b/test/tests/longShort/UtilsHelpers.re new file mode 100644 index 0000000..c33570b --- /dev/null +++ b/test/tests/longShort/UtilsHelpers.re @@ -0,0 +1,103 @@ +open Mocha; +open Globals; +open LetOps; + +let testUnit = + ( + ~contracts: ref(Helpers.longShortUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describe("Long Short Utilities and helpers", () => { + describe("_getYieldSplit", () => { + let marketIndex = 1; + + let test = + ( + ~marketSideValueInPaymentTokenLong, + ~marketSideValueInPaymentTokenShort, + ) => { + let totalValueLockedInMarket = + marketSideValueInPaymentTokenLong->add( + marketSideValueInPaymentTokenShort, + ); + + let isLongSideUnderbalanced = + marketSideValueInPaymentTokenShort->bnGte( + marketSideValueInPaymentTokenLong, + ); + + let imbalance = + isLongSideUnderbalanced + ? marketSideValueInPaymentTokenShort->sub( + marketSideValueInPaymentTokenLong, + ) + : marketSideValueInPaymentTokenLong->sub( + marketSideValueInPaymentTokenShort, + ); + + let%AwaitThen marketTreasurySplitGradient_e18 = + contracts.contents.longShort + ->LongShort.marketTreasurySplitGradient_e18(marketIndex); + + let marketPercentCalculated_e18 = + imbalance + ->mul(marketTreasurySplitGradient_e18) + ->div(totalValueLockedInMarket); + let marketPercent_e18 = + bnMin(marketPercentCalculated_e18, CONSTANTS.tenToThe18); + + let treasuryPercent_e18 = + CONSTANTS.tenToThe18->sub(marketPercent_e18); + + let expectedResult = treasuryPercent_e18; + + let%Await actualResult = + contracts.contents.longShort + ->LongShort.Exposed._getYieldSplitExposed( + ~marketIndex, + ~longValue=marketSideValueInPaymentTokenLong, + ~shortValue=marketSideValueInPaymentTokenShort, + ~totalValueLockedInMarket, + ); + Chai.bnEqual( + ~message= + "expectedResult and result after `_getYieldSplit` not the same", + expectedResult, + actualResult.treasuryYieldPercent_e18, + ); + }; + + it("works as expected if longValue > shortValue", () => { + let marketSideValueInPaymentTokenShort = Helpers.randomTokenAmount(); + let marketSideValueInPaymentTokenLong = + marketSideValueInPaymentTokenShort->add( + Helpers.randomTokenAmount(), + ); + + test( + ~marketSideValueInPaymentTokenLong, + ~marketSideValueInPaymentTokenShort, + ); + }); + it("works as expected if shortValue > longValue", () => { + let marketSideValueInPaymentTokenLong = Helpers.randomTokenAmount(); + let marketSideValueInPaymentTokenShort = + marketSideValueInPaymentTokenLong->add(Helpers.randomTokenAmount()); + + test( + ~marketSideValueInPaymentTokenLong, + ~marketSideValueInPaymentTokenShort, + ); + }); + it("works as expected if shortValue == longValue", () => { + let marketSideValueInPaymentTokenLong = Helpers.randomTokenAmount(); + let marketSideValueInPaymentTokenShort = marketSideValueInPaymentTokenLong; + + test( + ~marketSideValueInPaymentTokenLong, + ~marketSideValueInPaymentTokenShort, + ); + }); + }) + }); +}; diff --git a/test/tests/stake/AddNewStakingFund.re b/test/tests/stake/AddNewStakingFund.re new file mode 100644 index 0000000..6eb7b5f --- /dev/null +++ b/test/tests/stake/AddNewStakingFund.re @@ -0,0 +1,118 @@ +open Globals; +open LetOps; +open Mocha; +open SmockGeneral; + +let test = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describe("addNewStakingFund", () => { + let marketIndex = 1; + let sampleLongAddress = Helpers.randomAddress(); + let sampleShortAddress = Helpers.randomAddress(); + let kInitialMultiplier = + CONSTANTS.tenToThe18->add(Helpers.randomInteger()); + let kPeriod = Helpers.randomInteger(); + let unstakeFee_e18 = Helpers.randomInteger(); + + let timestampRef = ref(0); + + let promiseRef: ref(JsPromise.t(ContractHelpers.transaction)) = + ref(()->JsPromise.resolve->Obj.magic); + + before_once'(() => { + let%Await _ = + contracts^.staker + ->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="addNewStakingFund", + ); + + let longShortAddress = (accounts^)->Array.getUnsafe(5); + let%AwaitThen _ = + contracts^.staker + ->Staker.Exposed.setLongShort(~longShort=longShortAddress.address); + + let%AwaitThen {timestamp} = Helpers.getBlock(); + timestampRef := timestamp; + let promise = + contracts^.staker + ->ContractHelpers.connect(~address=longShortAddress) + ->Staker.Exposed.addNewStakingFund( + ~marketIndex, + ~longToken=sampleLongAddress, + ~shortToken=sampleShortAddress, + ~kInitialMultiplier, + ~kPeriod, + ~unstakeFee_e18, + ~balanceIncentiveCurve_exponent=bnFromInt(5), + ~balanceIncentiveCurve_equilibriumOffset=bnFromInt(0), + ); + promiseRef := promise; + promise; + }); + + it_skip("calls the onlyLongShortModifier", () => { + expect(StakerSmocked.InternalMock.onlyLongShortModifierLogicFunction()) + ->toHaveCallCount(0) + }); + + it("calls _changeUnstakeFee with correct arguments", () => { + Js.log(9); + StakerSmocked.InternalMock._changeUnstakeFeeCallCheck({ + marketIndex, + newMarketUnstakeFee_e18: unstakeFee_e18, + }); + }); + + it("mutates accumulativeFloatPerSyntheticTokenSnapshots", () => { + let%Await params = + contracts^.staker + ->Staker.accumulativeFloatPerSyntheticTokenSnapshots( + 1, + CONSTANTS.zeroBn, + ); + + params->Chai.recordEqualFlat({ + timestamp: Ethers.BigNumber.fromInt(timestampRef^ + 1), // one second per block in hardhat + accumulativeFloatPerSyntheticToken_long: CONSTANTS.zeroBn, + accumulativeFloatPerSyntheticToken_short: CONSTANTS.zeroBn, + }); + }); + + it("mutates syntheticTokens", () => { + let%Await tokenLong = + contracts^.staker->Staker.syntheticTokens(1, true); + let%Await tokenShort = + contracts^.staker->Staker.syntheticTokens(1, false); + + Chai.addressEqual(~otherAddress=tokenLong, sampleLongAddress); + Chai.addressEqual(~otherAddress=tokenShort, sampleShortAddress); + }); + + it("mutates marketIndexOfTokens", () => { + let%AwaitThen longMarketIndex = + contracts^.staker->Staker.marketIndexOfToken(sampleLongAddress); + let%Await shortMarketIndex = + contracts^.staker->Staker.marketIndexOfToken(sampleShortAddress); + + Chai.intEqual(marketIndex, longMarketIndex); + Chai.intEqual(marketIndex, shortMarketIndex); + }); + + it("emits AccumulativeIssuancePerStakedSynthSnapshotCreated event", () => { + Chai.callEmitEvents( + ~call=promiseRef^, + ~contract=contracts^.staker->Obj.magic, + ~eventName="AccumulativeIssuancePerStakedSynthSnapshotCreated", + ) + ->Chai.withArgs4( + marketIndex, + CONSTANTS.zeroBn, + CONSTANTS.zeroBn, + CONSTANTS.zeroBn, + ) + }); + }); +}; diff --git a/test/tests/stake/AddNewStateForFloatRewards.re b/test/tests/stake/AddNewStateForFloatRewards.re new file mode 100644 index 0000000..38f8ced --- /dev/null +++ b/test/tests/stake/AddNewStateForFloatRewards.re @@ -0,0 +1,158 @@ +open Globals; +open LetOps; +open Mocha; + +let testUnit = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + let marketIndex = Helpers.randomJsInteger(); + let ( + longPrice, + shortPrice, + longValue, + shortValue, + timeDeltaGreaterThanZero, + longAccum, + shortAccum, + ) = + Helpers.Tuple.make7(Helpers.randomInteger); + + describe("pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations", () => { + let timestampRef: ref(Ethers.BigNumber.t) = ref(CONSTANTS.zeroBn); + let txReference = ref("NotSetYet"->Obj.magic); + + before_once'(() => { + contracts.contents.staker + ->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName= + "pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations", + ) + }); + + let setup = (~marketUpdateIndex, ~timeDelta) => { + let%Await {timestamp} = Helpers.getBlock(); + timestampRef := (timestamp + 1)->Ethers.BigNumber.fromInt /* one second per bloc*/; + + StakerSmocked.InternalMock.mock_calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshotToReturn( + timeDelta, + ); + StakerSmocked.InternalMock.mock_calculateNewCumulativeIssuancePerStakedSynthToReturn( + longAccum, + shortAccum, + ); + + txReference := + contracts.contents.staker + ->Staker.pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations( + ~marketIndex, + ~longPrice, + ~shortPrice, + ~longValue, + ~shortValue, + ~marketUpdateIndex, + ); + }; + + describe("modifiers", () => + it("calls the onlyLongShort modifier", () => { + let%Await _ = + contracts.contents.staker + ->Staker.pushUpdatedMarketPricesToUpdateFloatIssuanceCalculations( + ~marketIndex, + ~marketUpdateIndex=Helpers.randomInteger(), + ~longPrice, + ~shortPrice, + ~longValue, + ~shortValue, + ); + + StakerSmocked.InternalMock.onlyLongShortModifierLogicCallCheck(); + }) + ); + + describe("case timeDelta > 0", () => { + let marketUpdateIndex = Helpers.randomTokenAmount(); + + before_once'(() => + setup(~timeDelta=timeDeltaGreaterThanZero, ~marketUpdateIndex) + ); + }); + + describe("case marketUpdateIndex > 0", () => { + let latestRewardIndex = Helpers.randomInteger(); + let marketUpdateIndex = Helpers.randomInteger(); + let pushUpdatedMarketPricesToUpdateFloatIssuanceCalculationsTxPromise = + ref("Not set yet"->Obj.magic); + + before_once'(() => { + let%Await _ = + contracts.contents.staker + ->Staker.Exposed.setLatestRewardIndexGlobals( + ~marketIndex, + ~latestRewardIndex, + ); + + pushUpdatedMarketPricesToUpdateFloatIssuanceCalculationsTxPromise := + setup(~timeDelta=timeDeltaGreaterThanZero, ~marketUpdateIndex); + + pushUpdatedMarketPricesToUpdateFloatIssuanceCalculationsTxPromise. + contents; + }); + }); + + describe("", () => { + let marketUpdateIndex = Helpers.randomTokenAmount(); + + before_once'(() => + setup(~timeDelta=timeDeltaGreaterThanZero, ~marketUpdateIndex) + ); + + it( + "calls calculateNewCumulativeIssuancePerStakedSynth with correct arguments", + () => { + let%Await _ = txReference.contents; + StakerSmocked.InternalMock._calculateNewCumulativeIssuancePerStakedSynthCallCheck({ + marketIndex, + previousMarketUpdateIndex: marketUpdateIndex->sub(oneBn), + longPrice, + shortPrice, + longValue, + shortValue, + }); + }); + it("sets the latestRewardIndex correctly", () => { + let%Await latestRewardIndex = + contracts.contents.staker->Staker.latestRewardIndex(marketIndex); + latestRewardIndex->Chai.bnEqual(marketUpdateIndex); + }); + it("mutates accumulativeFloatPerSyntheticTokenSnapshots", () => { + let%Await rewardParams = + contracts^.staker + ->Staker.accumulativeFloatPerSyntheticTokenSnapshots( + marketIndex, + marketUpdateIndex, + ); + rewardParams->Chai.recordEqualFlat({ + timestamp: timestampRef.contents, + accumulativeFloatPerSyntheticToken_long: longAccum, + accumulativeFloatPerSyntheticToken_short: shortAccum, + }); + }); + it("emits AccumulativeIssuancePerStakedSynthSnapshotCreated event", () => { + Chai.callEmitEvents( + ~call=txReference.contents, + ~contract=contracts.contents.staker->Obj.magic, + ~eventName="AccumulativeIssuancePerStakedSynthSnapshotCreated", + ) + ->Chai.withArgs4( + marketIndex, + marketUpdateIndex, + longAccum, + shortAccum, + ) + }); + }); + }); +}; diff --git a/test/tests/stake/CalculateAccumulatedFloat.re b/test/tests/stake/CalculateAccumulatedFloat.re new file mode 100644 index 0000000..f560803 --- /dev/null +++ b/test/tests/stake/CalculateAccumulatedFloat.re @@ -0,0 +1,347 @@ +open Globals; +open LetOps; +open Mocha; + +let makeIterator = anyArray => { + let indexRef = ref(0); + () => { + let index = indexRef^; + indexRef := (index + 1) mod anyArray->Array.length; + anyArray->Array.getExn(index); + }; +}; + +let smockedCalculateAccumulatedFloatInRangeMultiBinding = [%raw + {|(_r, arr) => _r._calculateAccumulatedFloatInRangeMock.returns(makeIterator(arr))|} +]; + +// TODO: now that `_calculateAccumulatedFloatInRange` is unit tested, simplify these tests and use mocks correctly (this is a bit of an integration test) +let test = (~contracts: ref(Helpers.coreContracts)) => + describe("calculateAccumulatedFloat", () => { + // generate all parameters randomly + let marketIndex = Js.Math.random_int(1, 100000); + let longToken = Ethers.Wallet.createRandom().address; + let shortToken = Ethers.Wallet.createRandom().address; + let user = Ethers.Wallet.createRandom().address; + + let accumulativeFloatPerTokenUserLong = Helpers.randomTokenAmount(); + let accumulativeFloatPerTokenLatestLong = + accumulativeFloatPerTokenUserLong->add(Helpers.randomTokenAmount()); + let newUserAmountStakedLong = Helpers.randomTokenAmount(); + + let accumulativeFloatPerTokenUserShort = Helpers.randomTokenAmount(); + let accumulativeFloatPerTokenLatestShort = + accumulativeFloatPerTokenUserShort->add(Helpers.randomTokenAmount()); + let newUserAmountStakedShort = Helpers.randomTokenAmount(); + + // TODO: this test isn't mocking `_calculateAccumulatedFloatInRange` - create tests for `_calculateAccumulatedFloatInRange` in isolation rather + it("[HAPPY] should correctly return the float tokens due for the user", () => { + let {staker} = contracts.contents; + + // Value of these two isn't important, as long as `usersLatestClaimedReward` is less than `newLatestRewardIndex` + let usersLatestClaimedReward = Helpers.randomInteger(); + let newLatestRewardIndex = + usersLatestClaimedReward->add(Helpers.randomInteger()); + + let%AwaitThen _ = + staker->Staker.Exposed.setFloatRewardCalcParams( + ~marketIndex, + ~longToken, + ~shortToken, + ~newLatestRewardIndex, + ~user, + ~usersLatestClaimedReward, + ~accumulativeFloatPerTokenLatestLong, + ~accumulativeFloatPerTokenLatestShort, + ~accumulativeFloatPerTokenUserLong, + ~accumulativeFloatPerTokenUserShort, + ~newUserAmountStakedLong, + ~newUserAmountStakedShort, + ); + let%Await floatDue = + staker->Staker.Exposed._calculateAccumulatedFloatAndExecuteOutstandingShiftsExposedCall( + ~marketIndex, + ~user, + ); + + let expectedFloatDueLong = + accumulativeFloatPerTokenLatestLong + ->sub(accumulativeFloatPerTokenUserLong) + ->mul(newUserAmountStakedLong) + ->div(CONSTANTS.floatIssuanceFixedDecimal); + + let expectedFloatDueShort = + accumulativeFloatPerTokenLatestShort + ->sub(accumulativeFloatPerTokenUserShort) + ->mul(newUserAmountStakedShort) + ->div(CONSTANTS.floatIssuanceFixedDecimal); + + Chai.bnEqual( + floatDue, + expectedFloatDueLong->add(expectedFloatDueShort), + ~message="calculated float due is incorrect", + ); + }); + + // TODO: this test isn't mocking `_calculateAccumulatedFloatInRange` + it( + "should return zero if `usersLatestClaimedReward` is equal to `newLatestRewardIndex`", + () => { + let {staker} = contracts.contents; + + // exact value doesn't matter, must be equal! + let newLatestRewardIndex = Helpers.randomInteger(); + let usersLatestClaimedReward = newLatestRewardIndex; + + let%AwaitThen _ = + staker->Staker.Exposed.setFloatRewardCalcParams( + ~marketIndex, + ~longToken, + ~shortToken, + ~newLatestRewardIndex, + ~user, + ~usersLatestClaimedReward, + ~accumulativeFloatPerTokenLatestLong, + ~accumulativeFloatPerTokenLatestShort, + ~accumulativeFloatPerTokenUserLong, + ~accumulativeFloatPerTokenUserShort, + ~newUserAmountStakedLong, + ~newUserAmountStakedShort, + ); + let%Await floatDue = + staker->Staker.Exposed._calculateAccumulatedFloatAndExecuteOutstandingShiftsExposedCall( + ~marketIndex, + ~user, + ); + + Chai.bnEqual( + floatDue, + bnFromInt(0), + ~message="calculated float due should be zero", + ); + }, + ); + + // TODO: this test isn't mocking `_calculateAccumulatedFloatInRange` + it( + "If the user has zero tokens staked they should get zero float tokens", + () => { + let {staker} = contracts.contents; + // Value of these two isn't important, as long as `usersLatestClaimedReward` is less than `newLatestRewardIndex` + let usersLatestClaimedReward = Helpers.randomInteger(); + let newLatestRewardIndex = + usersLatestClaimedReward->add(Helpers.randomInteger()); + + let%AwaitThen _ = + staker->Staker.Exposed.setFloatRewardCalcParams( + ~marketIndex, + ~longToken, + ~shortToken, + ~newLatestRewardIndex, + ~user, + ~usersLatestClaimedReward, + ~accumulativeFloatPerTokenLatestLong, + ~accumulativeFloatPerTokenLatestShort, + ~accumulativeFloatPerTokenUserLong, + ~accumulativeFloatPerTokenUserShort, + ~newUserAmountStakedLong=Ethers.BigNumber.fromInt(0), + ~newUserAmountStakedShort=Ethers.BigNumber.fromInt(0), + ); + let%Await floatDue = + staker->Staker.Exposed._calculateAccumulatedFloatAndExecuteOutstandingShiftsExposedCall( + ~marketIndex, + ~user, + ); + Chai.bnEqual( + floatDue, + bnFromInt(0), + ~message="calculated float due should be zero", + ); + }); + + describe("User has pending token shifts", () => { + // Value of these two isn't important, as long as `usersLatestClaimedReward` is less than `newLatestRewardIndex` + let usersLatestClaimedReward = Helpers.randomInteger(); + let rewardBeforeShiftInterval = Helpers.randomTokenAmount(); + let rewardAfterShiftInterval = Helpers.randomTokenAmount(); + let amountToShift = Helpers.randomTokenAmount(); + let userNextPrice_stakedActionIndex = Helpers.randomInteger(); + let latestRewardIndex = userNextPrice_stakedActionIndex->add(oneBn); + let newLatestRewardIndex = + latestRewardIndex->add(Helpers.randomInteger()); + + let amountOfStakeShifted = Helpers.randomTokenAmount(); + let amountStakedBothSidesInitially = + amountToShift->add(amountOfStakeShifted); + let smockedLongShort = ref(LongShortSmocked.uninitializedValue); + + let setup = (~isShiftFromLong) => { + let {staker} = contracts.contents; + + let%AwaitThen _ = staker->StakerSmocked.InternalMock.setup; + + let%AwaitThen _ = + staker->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="_calculateAccumulatedFloat", + ); + + let%AwaitThen _ = + staker->Staker.Exposed.setFloatRewardCalcParams( + ~marketIndex, + ~longToken, + ~shortToken, + ~newLatestRewardIndex, + ~user, + ~usersLatestClaimedReward, + ~accumulativeFloatPerTokenLatestLong, + ~accumulativeFloatPerTokenLatestShort, + ~accumulativeFloatPerTokenUserLong, + ~accumulativeFloatPerTokenUserShort, + ~newUserAmountStakedLong=amountStakedBothSidesInitially, + ~newUserAmountStakedShort=amountStakedBothSidesInitially, + ); + let%AwaitThen _ = + staker->Staker.Exposed.setShiftParams( + ~marketIndex, + ~user, + ~shiftAmountLong=isShiftFromLong ? amountToShift : zeroBn, + ~shiftAmountShort=isShiftFromLong ? zeroBn : amountToShift, + ~userNextPrice_stakedActionIndex, + ~latestRewardIndex, + ); + let%AwaitThen longShortSmocked = LongShortSmocked.make(); + let%AwaitThen _ = + staker->Staker.Exposed.setLongShort( + ~longShort=longShortSmocked.address, + ); + longShortSmocked->LongShortSmocked.mockGetAmountSyntheticTokenToMintOnTargetSideToReturn( + amountOfStakeShifted, + ); + smockedLongShort := longShortSmocked; + + let _ = + StakerSmocked.InternalMock.internalRef.contents + ->Option.getUnsafe + ->smockedCalculateAccumulatedFloatInRangeMultiBinding([| + rewardBeforeShiftInterval, + rewardAfterShiftInterval, + |]); + + staker->Staker.Exposed._calculateAccumulatedFloatAndExecuteOutstandingShiftsExposedCall( + ~marketIndex, + ~user, + ); + }; + + let runTestsForSide = (~isShiftFromLong) => { + it("Should sum up the correct amount of float", () => { + let%Await floatDue = setup(~isShiftFromLong); + + Chai.bnEqual( + floatDue, + rewardBeforeShiftInterval->add(rewardAfterShiftInterval), + ~message="calculated float due should be zero", + ); + }); + + it( + "it should call _calculateAccumulatedFloatInRange with the correct parameters", + () => { + let%Await _ = setup(~isShiftFromLong); + + let stakeIncreasedSide = + amountStakedBothSidesInitially->add(amountOfStakeShifted); + let stakeDecreasedSide = + amountStakedBothSidesInitially->sub(amountToShift); + + let _ = + StakerSmocked.InternalMock._calculateAccumulatedFloatInRangeCallCheck({ + marketIndex, + amountStakedLong: amountStakedBothSidesInitially, + amountStakedShort: amountStakedBothSidesInitially, + rewardIndexFrom: usersLatestClaimedReward, + rewardIndexTo: userNextPrice_stakedActionIndex, + }); + StakerSmocked.InternalMock._calculateAccumulatedFloatInRangeCallCheck({ + marketIndex, + amountStakedLong: + isShiftFromLong ? stakeDecreasedSide : stakeIncreasedSide, + amountStakedShort: + isShiftFromLong ? stakeIncreasedSide : stakeDecreasedSide, + rewardIndexFrom: userNextPrice_stakedActionIndex, + rewardIndexTo: latestRewardIndex, + }); + }); + it( + "it should call LongShort.getAmountSyntheticTokenToMintOnTargetSideCallCheck with the correct parameters", + () => { + let%Await _ = setup(~isShiftFromLong); + + smockedLongShort.contents + ->LongShortSmocked.getAmountSyntheticTokenToMintOnTargetSideCallCheck({ + marketIndex, + amountSyntheticToken_redeemOnOriginSide: amountToShift, + isShiftFromLong, + priceSnapshotIndex: userNextPrice_stakedActionIndex, + }); + }, + ); + it( + "it should reset " + ++ ( + isShiftFromLong + ? "userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_long" + : "userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_short" + ) + ++ " to zero.", + () => { + let%Await _ = setup(~isShiftFromLong); + + // the setup function only simulates the call, it doesn't execute it, execute it here. + let%Await _ = + contracts.contents.staker + ->Staker.Exposed._calculateAccumulatedFloatAndExecuteOutstandingShiftsExposed( + ~marketIndex, + ~user, + ); + + let%Await amountToShiftForSideAfter = + contracts.contents.staker + ->Staker.userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom( + marketIndex, + isShiftFromLong, + user, + ); + + Chai.bnEqual(amountToShiftForSideAfter, zeroBn); + }, + ); + }; + describe("Shift from Long", () => + runTestsForSide(~isShiftFromLong=true) + ); + describe("Shift from Short", () => + runTestsForSide(~isShiftFromLong=false) + ); + + it( + "it should reset the users userNextPrice_stakedActionIndex to zero", () => { + let%Await _ = setup(~isShiftFromLong=true); + + // the setup function only simulates the call, it doesn't execute it, execute it here. + let%Await _ = + contracts.contents.staker + ->Staker.Exposed._calculateAccumulatedFloatAndExecuteOutstandingShiftsExposed( + ~marketIndex, + ~user, + ); + + let%Await usersShiftIndex = + contracts.contents.staker + ->Staker.userNextPrice_stakedActionIndex(marketIndex, user); + + Chai.bnEqual(usersShiftIndex, zeroBn); + }); + // TODO: add test to test case where there are both shifts from long and from short + }); + }); diff --git a/test/tests/stake/CalculateAccumulatedFloatInRange.re b/test/tests/stake/CalculateAccumulatedFloatInRange.re new file mode 100644 index 0000000..aabcab5 --- /dev/null +++ b/test/tests/stake/CalculateAccumulatedFloatInRange.re @@ -0,0 +1,82 @@ +open Globals; +open LetOps; +open Mocha; + +let testUnit = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describe("_calculateAccumulatedFloatInRange", () => { + let marketIndex = Helpers.randomJsInteger(); + let rewardIndexTo = Helpers.randomTokenAmount(); + let rewardIndexFrom = Helpers.randomTokenAmount(); + let syntheticRewardFromLongToken = Helpers.randomTokenAmount(); + let syntheticRewardToLongToken = + syntheticRewardFromLongToken->add(Helpers.randomTokenAmount()); + let syntheticRewardFromShortToken = Helpers.randomTokenAmount(); + let syntheticRewardToShortToken = + syntheticRewardFromShortToken->add(Helpers.randomTokenAmount()); + + let amountStakedLong = Helpers.randomTokenAmount(); + let amountStakedShort = Helpers.randomTokenAmount(); + + before_once'(() => { + let {staker, longShortSmocked} = contracts.contents; + let%Await _ = + staker->Staker.Exposed.setLongShort( + ~longShort=longShortSmocked.address, + ); + contracts.contents.staker + ->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="_calculateAccumulatedFloatInRange", + ); + }); + + let setup = () => { + let {staker} = contracts.contents; + + let%AwaitThen _ = + staker->Staker.Exposed.setCalculateAccumulatedFloatInRangeGlobals( + ~marketIndex, + ~rewardIndexTo, + ~rewardIndexFrom, + ~syntheticRewardToLongToken, + ~syntheticRewardFromLongToken, + ~syntheticRewardToShortToken, + ~syntheticRewardFromShortToken, + ); + + staker->Staker.Exposed._calculateAccumulatedFloatInRangeExposed( + ~marketIndex, + ~amountStakedLong, + ~amountStakedShort, + ~rewardIndexFrom, + ~rewardIndexTo, + ); + }; + + // TODO: add tests to test case when amountStakedShort == 0 or amountStakedLong == 0 + it("[Happy Path] it calculates all the values correctly", () => { + let%Await floatDue = setup(); + + let expectedFloatDueLong = + syntheticRewardToLongToken + ->sub(syntheticRewardFromLongToken) + ->mul(amountStakedLong) + ->div(CONSTANTS.floatIssuanceFixedDecimal); + + let expectedFloatDueShort = + syntheticRewardToShortToken + ->sub(syntheticRewardFromShortToken) + ->mul(amountStakedShort) + ->div(CONSTANTS.floatIssuanceFixedDecimal); + + Chai.bnEqual( + floatDue, + expectedFloatDueLong->add(expectedFloatDueShort), + ~message="calculated float due is incorrect", + ); + }); + }); +}; diff --git a/test/tests/stake/CalculateFloatPerSecond.re b/test/tests/stake/CalculateFloatPerSecond.re new file mode 100644 index 0000000..0207633 --- /dev/null +++ b/test/tests/stake/CalculateFloatPerSecond.re @@ -0,0 +1,455 @@ +open LetOps; +open Mocha; +open Globals; + +let test = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + let marketIndex = 1; + let tenToThe14 = tenToThe18->div(bnFromInt(10000)); // 0.01 % + let tenToThe16 = tenToThe18->div(bnFromInt(100)); // 1 % + + let (kVal, longPrice, shortPrice) = + Helpers.Tuple.make3(Helpers.randomTokenAmount); + let (randomValueLocked1, randomValueLocked2) = + Helpers.Tuple.make2(() => Helpers.randomJsInteger() / 10 + 1); + + describe("calculateFloatPerSecond", () => { + let calculateFloatPerSecondPerPaymentTokenLocked = + ( + ~underBalancedSideValue, + ~exponent, + ~equilibriumOffsetMarketScaled, + ~totalLocked, + ~requiredBitShifting, + ~equilibriumMultiplier, + ) => { + let overflowProtectionDivision = twoBn->pow(requiredBitShifting); + + let numerator = + underBalancedSideValue + ->add(equilibriumOffsetMarketScaled->mul(equilibriumMultiplier)) + ->div(overflowProtectionDivision->div(twoBn)) + ->pow(exponent); + + let denominator = + totalLocked->div(overflowProtectionDivision)->pow(exponent); + + let overBalancedSideRate = + numerator->mul(tenToThe18)->div(denominator)->div(twoBn); + + let underBalancedSideRate = tenToThe18->sub(overBalancedSideRate); + + Chai.expectTrue(underBalancedSideRate->bnGte(overBalancedSideRate)); + (overBalancedSideRate, underBalancedSideRate); + }; + + let balanceIncentiveCurve_exponent = bnFromInt(5); + let safeExponentBitShifting = bnFromInt(50); + + before(() => { + let {staker, longShortSmocked} = contracts.contents; + + let%AwaitThen _ = + staker->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="_calculateFloatPerSecond", + ); + + longShortSmocked->LongShortSmocked.mockMarketSideValueInPaymentTokenToReturn( + CONSTANTS.tenToThe18, + ); + + let%Await _ = + staker->Staker.Exposed._changeBalanceIncentiveParametersExposed( + ~marketIndex, + ~balanceIncentiveCurve_exponent, + ~balanceIncentiveCurve_equilibriumOffset=CONSTANTS.zeroBn, + ~safeExponentBitShifting, + ); + + StakerSmocked.InternalMock.mock_getKValueToReturn(kVal); + }); + + let runTestsAndReturnUnscaledFpsValuesE18 = + (~longValueUnscaled, ~shortValueUnscaled) => { + let longValue = bnFromInt(longValueUnscaled)->mul(tenToThe18); + let shortValue = bnFromInt(shortValueUnscaled)->mul(tenToThe18); + + let totalLocked = longValue->add(shortValue); + + let%AwaitThen balanceIncentiveCurve_equilibriumOffset = + contracts.contents.staker + ->Staker.balanceIncentiveCurve_equilibriumOffset(marketIndex); + + let equilibriumOffsetMarketScaled = + balanceIncentiveCurve_equilibriumOffset + ->mul(totalLocked) + ->div(twoBn) + ->div(tenToThe18); + + let%Await result = + contracts.contents.staker + ->Staker.Exposed._calculateFloatPerSecondExposed( + ~marketIndex, + ~longPrice, + ~shortPrice, + ~longValue, + ~shortValue, + ); + + let longFloatPerSecond: Ethers.BigNumber.t = result.longFloatPerSecond; + let shortFloatPerSecond: Ethers.BigNumber.t = result.shortFloatPerSecond; + + let longRateScaled = ref(None->Obj.magic); + let shortRateScaled = ref(None->Obj.magic); + + if (longValue->bnGte( + shortValue->sub(equilibriumOffsetMarketScaled->mul(twoBn)), + )) { + if (equilibriumOffsetMarketScaled->bnGte(shortValue)) { + shortRateScaled := kVal->mul(shortPrice); + longRateScaled := zeroBn; + } else { + let (longRate, shortRate) = + calculateFloatPerSecondPerPaymentTokenLocked( + ~underBalancedSideValue=shortValue, + ~exponent=balanceIncentiveCurve_exponent, + ~equilibriumOffsetMarketScaled, + ~totalLocked, + ~requiredBitShifting=safeExponentBitShifting, + ~equilibriumMultiplier=bnFromInt(-1), + ); + + longRateScaled := + longRate->mul(kVal)->mul(longPrice)->div(tenToThe18); + shortRateScaled := + shortRate->mul(kVal)->mul(shortPrice)->div(tenToThe18); + }; + } else if (equilibriumOffsetMarketScaled + ->mul(bnFromInt(-1)) + ->bnGte(longValue)) { + shortRateScaled := zeroBn; + longRateScaled := kVal->mul(longPrice); + } else { + let (shortRate, longRate) = + calculateFloatPerSecondPerPaymentTokenLocked( + ~underBalancedSideValue=longValue, + ~exponent=balanceIncentiveCurve_exponent, + ~equilibriumOffsetMarketScaled, + ~totalLocked, + ~requiredBitShifting=safeExponentBitShifting, + ~equilibriumMultiplier=oneBn, + ); + + longRateScaled := + longRate->mul(kVal)->mul(longPrice)->div(tenToThe18); + shortRateScaled := + shortRate->mul(kVal)->mul(shortPrice)->div(tenToThe18); + }; + + Chai.bnEqual( + ~message= + "[runTestsAndReturnUnscaledFpsValuesE18] unexpected longFloatPerSecond result", + longFloatPerSecond, + longRateScaled^, + ); + Chai.bnEqual( + ~message= + "[runTestsAndReturnUnscaledFpsValuesE18] unexpected shortFloatPerSecond result", + shortFloatPerSecond, + shortRateScaled^, + ); + + let longFloatPerSecondUnscaledE18 = + longFloatPerSecond->mul(tenToThe18)->div(kVal)->div(longPrice); + let shortFloatPerSecondUnscaledE18 = + shortFloatPerSecond->mul(tenToThe18)->div(kVal)->div(shortPrice); + + (longFloatPerSecondUnscaledE18, shortFloatPerSecondUnscaledE18); + }; + + describe( + "returns correct longFloatPerSecond and shortFloatPerSecond for each market side", + () => { + describe("without offset", () => { + before(() => { + contracts.contents.staker + ->Staker.Exposed.setEquilibriumOffset( + ~marketIndex, + ~balanceIncentiveCurve_equilibriumOffset=zeroBn, + ) + }); + it("longValue > shortValue", () => { + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=randomValueLocked1 + randomValueLocked2, + ~shortValueUnscaled=randomValueLocked2, + ) + }); + it("longValue < shortValue", () => { + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=randomValueLocked1, + ~shortValueUnscaled=randomValueLocked1 + randomValueLocked2, + ) + }); + it("has a continuous curve through intersection point", () => { + // note that the middle is at L=500 & S=500 when we have a 50% offset + let%Await (longFps1UnscaledE18, shortFps1UnscaledE18) = + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=499, + ~shortValueUnscaled=501, + ); + + // long side should be >50% and short side <50% + Chai.expectTrue( + longFps1UnscaledE18->bnGt(tenToThe18->div(twoBn)), + ); + Chai.expectTrue( + shortFps1UnscaledE18->bnLt(tenToThe18->div(twoBn)), + ); + + let%Await (longFps2UnscaledE18, shortFps2UnscaledE18) = + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=501, + ~shortValueUnscaled=499, + ); + + // short side should be <50% and long side >50% + Chai.expectTrue( + longFps2UnscaledE18->bnLt(tenToThe18->div(twoBn)), + ); + Chai.expectTrue( + shortFps2UnscaledE18->bnGt(tenToThe18->div(twoBn)), + ); + + Chai.expectTrue( + longFps1UnscaledE18 + ->sub(longFps2UnscaledE18) + ->bnLt(tenToThe16) // deviation of 1% + ); + Chai.expectTrue( + shortFps2UnscaledE18 + ->sub(shortFps1UnscaledE18) + ->bnLt(tenToThe16) // deviation of 1% + ); + }); + }); + describe("with negative offset", () => { + before_once'(() => { + contracts.contents.staker + ->Staker.Exposed.setEquilibriumOffset( + ~marketIndex, + ~balanceIncentiveCurve_equilibriumOffset= + bnFromInt(-1)->mul(tenToThe18)->div(twoBn), + ) + }); + it("longValue > shortValue", () => { + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=randomValueLocked1 + randomValueLocked2, + ~shortValueUnscaled=randomValueLocked2, + ) + }); + it("longValue < shortValue", () => { + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=randomValueLocked1, + ~shortValueUnscaled=randomValueLocked1 + randomValueLocked2, + ) + }); + it("has a continuous curve through intersection point", () => { + // note that the middle is at L=750 & S=250 when we have a -50% offset + let%Await (longFps1UnscaledE18, shortFps1UnscaledE18) = + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=749, + ~shortValueUnscaled=251, + ); + + // long side should be >50% and short side <50% + Chai.expectTrue( + longFps1UnscaledE18->bnGt(tenToThe18->div(twoBn)), + ); + Chai.expectTrue( + shortFps1UnscaledE18->bnLt(tenToThe18->div(twoBn)), + ); + + let%Await (longFps2UnscaledE18, shortFps2UnscaledE18) = + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=751, + ~shortValueUnscaled=249, + ); + + // short side should be <50% and long side >50% + Chai.expectTrue( + longFps2UnscaledE18->bnLt(tenToThe18->div(twoBn)), + ); + Chai.expectTrue( + shortFps2UnscaledE18->bnGt(tenToThe18->div(twoBn)), + ); + + Chai.expectTrue( + longFps1UnscaledE18 + ->sub(longFps2UnscaledE18) + ->bnLt(tenToThe16) // deviation of 1% + ); + Chai.expectTrue( + shortFps2UnscaledE18 + ->sub(shortFps1UnscaledE18) + ->bnLt(tenToThe16) // deviation of 1% + ); + }); + it("has a continuous curve at the edge case boundary", () => { + // note that the boundary is at L=25 & S=75 when we have a -50% offset + let%Await (longFps1UnscaledE18, shortFps1UnscaledE18) = + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=24, + ~shortValueUnscaled=76, + ); + + Chai.bnEqual( + ~message="long out-of-bounds result should be 1", + longFps1UnscaledE18, + tenToThe18, + ); + Chai.bnEqual( + ~message="short out-of-bounds result should be 0", + shortFps1UnscaledE18, + zeroBn, + ); + + let%Await (longFps2UnscaledE18, shortFps2UnscaledE18) = + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=26, + ~shortValueUnscaled=74, + ); + + Chai.expectTrue( + longFps1UnscaledE18 + ->sub(longFps2UnscaledE18) + ->bnLt(tenToThe14) // deviation of 0.01% + ); + Chai.expectTrue( + shortFps2UnscaledE18 + ->sub(shortFps1UnscaledE18) + ->bnLt(tenToThe14) // deviation of 0.01% + ); + }); + }); + describe("with positive offset", () => { + before_once'(() => { + contracts.contents.staker + ->Staker.Exposed.setEquilibriumOffset( + ~marketIndex, + ~balanceIncentiveCurve_equilibriumOffset= + tenToThe18->div(twoBn), + ) + }); + it("longValue > shortValue", () => { + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=randomValueLocked1 + randomValueLocked2, + ~shortValueUnscaled=randomValueLocked2, + ) + }); + it("longValue < shortValue", () => { + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=randomValueLocked1, + ~shortValueUnscaled=randomValueLocked1 + randomValueLocked2, + ) + }); + it("has a continuous curve through intersection point", () => { + // note that the middle is at L=250 & S=750 when we have a 50% offset + let%Await (longFps1UnscaledE18, shortFps1UnscaledE18) = + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=249, + ~shortValueUnscaled=751, + ); + + // long side should be >50% and short side <50% + Chai.expectTrue( + longFps1UnscaledE18->bnGt(tenToThe18->div(twoBn)), + ); + Chai.expectTrue( + shortFps1UnscaledE18->bnLt(tenToThe18->div(twoBn)), + ); + + let%Await (longFps2UnscaledE18, shortFps2UnscaledE18) = + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=251, + ~shortValueUnscaled=749, + ); + + // short side should be <50% and long side >50% + Chai.expectTrue( + longFps2UnscaledE18->bnLt(tenToThe18->div(twoBn)), + ); + Chai.expectTrue( + shortFps2UnscaledE18->bnGt(tenToThe18->div(twoBn)), + ); + + Chai.expectTrue( + longFps1UnscaledE18 + ->sub(longFps2UnscaledE18) + ->bnLt(tenToThe16) // deviation of 1% + ); + Chai.expectTrue( + shortFps2UnscaledE18 + ->sub(shortFps1UnscaledE18) + ->bnLt(tenToThe16) // deviation of 1% + ); + }); + it("has a continuous curve at the edge case boundary", () => { + // note that the boundary is at L=75 & S=25 when we have a 50% offset + let%Await (longFps1UnscaledE18, shortFps1UnscaledE18) = + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=76, + ~shortValueUnscaled=24, + ); + + Chai.bnEqual( + ~message="long out-of-bounds result should be 0", + longFps1UnscaledE18, + zeroBn, + ); + Chai.bnEqual( + ~message="short out-of-bounds result should be 1", + shortFps1UnscaledE18, + tenToThe18, + ); + + let%Await (longFps2UnscaledE18, shortFps2UnscaledE18) = + runTestsAndReturnUnscaledFpsValuesE18( + ~longValueUnscaled=74, + ~shortValueUnscaled=26, + ); + + Chai.expectTrue( + longFps2UnscaledE18 + ->sub(longFps1UnscaledE18) + ->bnLt(tenToThe14) // deviation of 0.01% + ); + Chai.expectTrue( + shortFps1UnscaledE18 + ->sub(shortFps2UnscaledE18) + ->bnLt(tenToThe14) // deviation of 0.01% + ); + }); + }); + }, + ); + it("calls getKValue correctly", () => { + StakerSmocked.InternalMock.mock_getKValueToReturn(kVal); + let%Await _result = + contracts^.staker + ->Staker.Exposed._calculateFloatPerSecondExposed( + ~marketIndex, + ~longPrice, + ~shortPrice, + ~longValue=randomValueLocked1->bnFromInt->mul(tenToThe18), + ~shortValue=randomValueLocked2->bnFromInt->mul(tenToThe18), + ); + + StakerSmocked.InternalMock._getKValueCallCheck( + {marketIndex: marketIndex}: StakerSmocked.InternalMock._getKValueCall, + ); + }); + }); +}; diff --git a/test/tests/stake/CalculateNewCumulativeValue.re b/test/tests/stake/CalculateNewCumulativeValue.re new file mode 100644 index 0000000..a938112 --- /dev/null +++ b/test/tests/stake/CalculateNewCumulativeValue.re @@ -0,0 +1,119 @@ +open LetOps; +open Mocha; + +open Globals; + +let test = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + let marketIndex = Helpers.randomJsInteger(); + + let ( + longFloatPerSecond, + shortFloatPerSecond, + latestRewardIndexForMarket, + accumFloatLong, + accumFloatShort, + timeDelta, + ) = + Helpers.Tuple.make6(Helpers.randomInteger); + let (longValue, shortValue, longPrice, shortPrice) = + Helpers.Tuple.make4(Helpers.randomInteger); + + describe("calculateNewCumulativeValue", () => { + let promiseRef: + ref( + JsPromise.t( + Staker.Exposed._calculateNewCumulativeIssuancePerStakedSynthExposedReturn, + ), + ) = + ref(None->Obj.magic); + before_once'(() => { + let {staker} = contracts.contents; + + let%AwaitThen _ = + staker->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="calculateNewCumulativeValue", + ); + + StakerSmocked.InternalMock.mock_calculateFloatPerSecondToReturn( + longFloatPerSecond, + shortFloatPerSecond, + ); + + StakerSmocked.InternalMock.mock_calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshotToReturn( + timeDelta, + ); + + let%Await _ = + staker->Staker.Exposed.setCalculateNewCumulativeRateParams( + ~marketIndex, + ~latestRewardIndexForMarket, + ~accumFloatLong, + ~accumFloatShort, + ); + + promiseRef := + staker->Staker.Exposed._calculateNewCumulativeIssuancePerStakedSynthExposed( + ~marketIndex, + ~previousMarketUpdateIndex=latestRewardIndexForMarket, + ~longPrice, + ~shortPrice, + ~longValue, + ~shortValue, + ); + let%Await _ = promiseRef^; + (); + }); + + it( + "returns the old cumulative float + (timeDelta * floatPerSecond) for each market side", + () => { + let mockFn = (~oldCumulative, ~timeDelta, ~fps) => + oldCumulative->Ethers.BigNumber.add( + timeDelta->Ethers.BigNumber.mul(fps), + ); + let%Await result = promiseRef^; + let longCumulative: Ethers.BigNumber.t = + result->Obj.magic->Array.getUnsafe(0); + + let shortCumulative: Ethers.BigNumber.t = + result->Obj.magic->Array.getUnsafe(1); + + longCumulative->Chai.bnEqual( + mockFn( + ~oldCumulative=accumFloatLong, + ~timeDelta, + ~fps=longFloatPerSecond, + ), + ); + shortCumulative->Chai.bnEqual( + mockFn( + ~oldCumulative=accumFloatShort, + ~timeDelta, + ~fps=shortFloatPerSecond, + ), + ); + }, + ); + + it("calls calculateFloatPerSecond with correct arguments", () => { + StakerSmocked.InternalMock._calculateFloatPerSecondCallCheck({ + marketIndex, + longPrice, + shortPrice, + longValue, + shortValue, + }) + }); + + it("calls calculateTimeDelta with correct arguments", () => { + StakerSmocked.InternalMock._calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshotCallCheck({ + marketIndex, + previousMarketUpdateIndex: latestRewardIndexForMarket, + }) + }); + }); +}; diff --git a/test/tests/stake/CalculateTimeDelta.re b/test/tests/stake/CalculateTimeDelta.re new file mode 100644 index 0000000..984eb29 --- /dev/null +++ b/test/tests/stake/CalculateTimeDelta.re @@ -0,0 +1,39 @@ +open LetOps; +open Mocha; + +let test = (~contracts: ref(Helpers.coreContracts)) => { + let marketIndex = Helpers.randomJsInteger(); + let latestMarketIndex = Helpers.randomInteger(); + + describe("calculateTimeDelta", () => { + it( + "returns the time difference since the last reward state for a market", + () => { + let%Await pastTimestamp = Helpers.getRandomTimestampInPast(); + + let%AwaitThen _ = + contracts^.staker + ->Staker.Exposed.setCalculateTimeDeltaParams( + ~marketIndex, + ~latestRewardIndexForMarket=latestMarketIndex, + ~timestamp=pastTimestamp, + ); + + let%AwaitThen {timestamp: nowTimestampInt} = Helpers.getBlock(); + + let expectedDelta = + nowTimestampInt + ->Ethers.BigNumber.fromInt + ->Ethers.BigNumber.sub(pastTimestamp); + + let%Await delta = + contracts^.staker + ->Staker.Exposed._calculateTimeDeltaFromLastAccumulativeIssuancePerStakedSynthSnapshotExposed( + ~marketIndex, + ~previousMarketUpdateIndex=latestMarketIndex, + ); + + delta->Chai.bnEqual(expectedDelta); + }) + }); +}; diff --git a/test/tests/stake/ClaimFloat.re b/test/tests/stake/ClaimFloat.re new file mode 100644 index 0000000..698b577 --- /dev/null +++ b/test/tests/stake/ClaimFloat.re @@ -0,0 +1,184 @@ +open Globals; +open LetOps; +open Mocha; +open SmockGeneral; + +let makeIterator = anyArray => { + let indexRef = ref(0); + () => { + let index = indexRef^; + indexRef := (index + 1) mod anyArray->Array.length; + anyArray->Array.getExn(index); + }; +}; + +let smockedCalcAccumIterativeBinding = [%raw + {|(_r, arr) => _r._calculateAccumulatedFloatAndExecuteOutstandingShiftsMock.returns(makeIterator(arr))|} +]; + +// smocked allows functions to be passed as return vals, +// this is a simple binding to allow for repeated calls. +let iterativeMockCalculateAccumulatedFloatToReturn: + array(Ethers.BigNumber.t) => unit = + arr => { + let _ = + StakerSmocked.InternalMock.internalRef.contents + ->Option.map(_r => smockedCalcAccumIterativeBinding(_r, arr)); + (); + }; + +let test = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describe("_mintAccumulatedFloatAndExecuteOutstandingShiftsMulti", () => { + let marketIndices = [| + Helpers.randomJsInteger(), + Helpers.randomJsInteger(), + |]; + + let latestRewardIndices = [| + Helpers.randomInteger(), + Helpers.randomInteger(), + |]; + + let floatRewardsForMarkets = [|Helpers.randomTokenAmount(), zeroBn|]; + + let sumFloatRewards = floatRewards => + floatRewards->Array.reduce(CONSTANTS.zeroBn, (prev, curr) => { + prev->Ethers.BigNumber.add(curr) + }); + + let userWalletRef: ref(Ethers.Wallet.t) = ref(None->Obj.magic); + let promiseRef: ref(JsPromise.t(ContractHelpers.transaction)) = + ref(None->Obj.magic); + + let setup = + (~marketIndices, ~latestRewardIndices, ~floatRewardsForMarkets) => { + let {staker} = contracts.contents; + + let%Await _ = + staker->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName= + "_mintAccumulatedFloatAndExecuteOutstandingShiftsMulti", + ); + + userWalletRef := accounts.contents->Array.getUnsafe(5); + + iterativeMockCalculateAccumulatedFloatToReturn(floatRewardsForMarkets); + + let%Await _ = + marketIndices->Array.reduceWithIndex( + ()->JsPromise.resolve, + (lastPromise, marketIndex, arrayIndex) => { + let%AwaitThen _ = lastPromise; + contracts^.staker + ->Staker.Exposed.setMintAccumulatedFloatAndClaimFloatParams( + ~marketIndex, + ~latestRewardIndexForMarket= + latestRewardIndices->Array.getUnsafe(arrayIndex), + ); + }, + ); + promiseRef := + contracts^.staker + ->ContractHelpers.connect(~address=userWalletRef^) + ->Staker.Exposed._mintAccumulatedFloatAndExecuteOutstandingShiftsMultiExposed( + ~marketIndexes=marketIndices, + ~user=userWalletRef.contents.address, + ); + + promiseRef^; + }; + + describe("case at least one market has float to be minted", () => { + before_once'(() => + setup(~marketIndices, ~floatRewardsForMarkets, ~latestRewardIndices) + ); + + it("calls mint float for user with correct arguments", () => { + StakerSmocked.InternalMock._mintFloatCallCheck({ + user: userWalletRef^.address, + floatToMint: sumFloatRewards(floatRewardsForMarkets), + }) + }); + + describe("case market has float to mint", () => { + it("calls calculateAccumulatedFloat with correct arguments", () => + StakerSmocked.InternalMock._calculateAccumulatedFloatAndExecuteOutstandingShiftsCallCheck({ + marketIndex: marketIndices->Array.getUnsafe(0), + user: userWalletRef^.address, + }) + ); + it("emits FloatMinted event", () => { + Chai.callEmitEvents( + ~call=promiseRef^, + ~contract=contracts^.staker->Obj.magic, + ~eventName="FloatMinted", + ) + ->Chai.withArgs3( + userWalletRef^.address, + marketIndices->Array.getExn(0), + floatRewardsForMarkets->Array.getUnsafe(0), + ) + }); + + it("mutates userIndexOfLastClaimedReward", () => { + let%Await lastClaimed = + contracts^.staker + ->Staker.userIndexOfLastClaimedReward( + marketIndices->Array.getUnsafe(0), + userWalletRef^.address, + ); + lastClaimed->Chai.bnEqual(latestRewardIndices->Array.getUnsafe(0)); + }); + }); + + describe("case market has no float to mint", () => { + // still calls calculateAccumulatedFloat but unwieldy to test + it("doesn't mutate userIndexOfLastClaimed", () => { + let%Await lastClaimed = + contracts^.staker + ->Staker.userIndexOfLastClaimedReward( + marketIndices->Array.getUnsafe(1), + userWalletRef^.address, + ); + lastClaimed->Chai.bnEqual(CONSTANTS.zeroBn); // bit hacky but won't have been set yet + }); + + it("doesn't emit FloatMinted event", () => + Chai.callEmitEvents( + ~call=promiseRef^, + ~contract=contracts^.staker->Obj.magic, + ~eventName="FloatMinted", + ) + ->Chai.withArgs5Return( + userWalletRef^.address, + marketIndices->Array.getExn(1), + CONSTANTS.zeroBn, + CONSTANTS.zeroBn, + latestRewardIndices->Array.getExn(1), + ) + ->Chai.expectToNotEmit + ); + }); + }); + + describe("case no market has float to be minted", () => { + before_once'(() => { + setup( + ~marketIndices, + ~floatRewardsForMarkets=[|zeroBn, zeroBn|], + ~latestRewardIndices, + ) + }); + + // doesn't do a lot of other stuff as well but unwieldy to test + it("doesn't mint float", () => + expect(StakerSmocked.InternalMock._mintFloatFunction()) + ->toHaveCallCount(0) + ); + }); + }); +}; diff --git a/test/tests/stake/ClaimFloatCustom.re b/test/tests/stake/ClaimFloatCustom.re new file mode 100644 index 0000000..1cecbcc --- /dev/null +++ b/test/tests/stake/ClaimFloatCustom.re @@ -0,0 +1,79 @@ +open Globals; +open LetOps; +open Mocha; + +let randomLengthIntegerArr = (~minLength, ~maxLength) => + Array.makeBy(Js.Math.random_int(minLength, maxLength + 1), _ => + Helpers.randomJsInteger() + ); + +let testUnit = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + let marketIndices = randomLengthIntegerArr(~minLength=0, ~maxLength=100); + before_once'(() => { + let {longShortSmocked, staker} = contracts.contents; + + let%Await _ = + staker->Staker.Exposed.setLongShort( + ~longShort=longShortSmocked.address, + ); + (); + }); + + let commonTestsBetween_claimFloatCustomANDclaimFloatCustomFor = (~getUser) => { + it("calls LongShort.updateSystemStateMulti for the markets", () => { + contracts.contents.longShortSmocked + ->LongShortSmocked.updateSystemStateMultiCallCheck({ + marketIndexes: marketIndices, + }) + }); + + it( + "calls _mintAccumulatedFloatAndExecuteOutstandingShiftsMulti with the correct arguments", + () => { + StakerSmocked.InternalMock._mintAccumulatedFloatAndExecuteOutstandingShiftsMultiCallCheck({ + marketIndexes: marketIndices, + user: getUser(), + }) + }); + }; + + describe("claimFloatCustom", () => { + let getUser = () => accounts.contents->Array.getUnsafe(0).address; + + before_once'(() => { + let {staker} = contracts.contents; + + let%Await _ = + staker->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="claimFloatCustom", + ); + + staker->Staker.claimFloatCustom(~marketIndexes=marketIndices); + }); + + commonTestsBetween_claimFloatCustomANDclaimFloatCustomFor(~getUser); + }); + + describe("claimFloatCustomFor", () => { + let user = Helpers.randomAddress(); + + before_once'(() => { + let {staker} = contracts.contents; + + let%Await _ = + staker->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="claimFloatCustomFor", + ); + + staker->Staker.claimFloatCustomFor(~marketIndexes=marketIndices, ~user); + }); + + commonTestsBetween_claimFloatCustomANDclaimFloatCustomFor(~getUser=() => + user + ); + }); +}; diff --git a/test/tests/stake/GetKValue.re b/test/tests/stake/GetKValue.re new file mode 100644 index 0000000..01c01e1 --- /dev/null +++ b/test/tests/stake/GetKValue.re @@ -0,0 +1,106 @@ +open Globals; +open LetOps; +open Mocha; + +let test = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + let marketIndex = 2; + + let prom: ref(JsPromise.t(Staker.Exposed._getKValueExposedReturn)) = + ref(None->Obj.magic); + + let multiplier = + Helpers.randomInteger()->Ethers.BigNumber.add(CONSTANTS.tenToThe18); + describe("getKValue", () => { + let diffRef = ref(CONSTANTS.zeroBn); + let periodRef = ref(CONSTANTS.zeroBn); + let setup = (~multiplier, ~periodShouldBeOver) => { + let%AwaitThen _ = + contracts.contents.staker + ->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="getKValue", + ); + + let%AwaitThen pastTimestamp = Helpers.getRandomTimestampInPast(); + let%AwaitThen {timestamp: nowTimestamp} = Helpers.getBlock(); + + diffRef := + (nowTimestamp + 1) // will be called one sec in future + ->Ethers.BigNumber.fromInt + ->Ethers.BigNumber.sub(pastTimestamp); + + let period = + (diffRef^) + ->( + diff => + if (periodShouldBeOver) { + diff->Ethers.BigNumber.sub(20->Ethers.BigNumber.fromInt); + } else { + diff->Ethers.BigNumber.add(20->Ethers.BigNumber.fromInt); + } + ); + + periodRef := period; + + let%Await _ = + contracts^.staker + ->Staker.Exposed.setGetKValueParams( + ~marketIndex, + ~timestamp=pastTimestamp, + ); + StakerSmocked.InternalMock.mock_getMarketLaunchIncentiveParametersToReturn( + period, + multiplier, + ); + + prom := + contracts^.staker->Staker.Exposed._getKValueExposed(~marketIndex); + }; + + it( + "returns kInitialMultiplier - + (((kInitialMultiplier - 1e18) * + (block.timestamp - initialTimestamp)) / kPeriod) if kPeriod isn't over", + () => { + let%AwaitThen _ = setup(~multiplier, ~periodShouldBeOver=false); + let%Await returnVal = prom^; + returnVal->Chai.bnEqual( + multiplier->Ethers.BigNumber.sub( + (diffRef^) + ->Ethers.BigNumber.mul( + multiplier->Ethers.BigNumber.sub(CONSTANTS.tenToThe18), + ) + ->Ethers.BigNumber.div(periodRef^), + ), + ); + }, + ); + + it("reverts if kInitialMultiplier less than 1e18", () => { + let%Await _ = + setup(~multiplier=CONSTANTS.oneBn, ~periodShouldBeOver=true); + Chai.expectRevertNoReason(~transaction=(prom^)->Obj.magic); + }); + describe("", () => { + // TESTING TWO THINGS + before_once'(() => {setup(~multiplier, ~periodShouldBeOver=true)}); + + it( + "returns 1e18 if more seconds have passed than the kPeriod since the staking fund for the market was added", + () => { + let%Await returnVal = prom^; + returnVal->Chai.bnEqual(CONSTANTS.tenToThe18); + }, + ); + + it("calls getMarketLaunchIncentiveParameters with correct arguments", () => { + StakerSmocked.InternalMock._getMarketLaunchIncentiveParametersCallCheck({ + marketIndex: marketIndex, + }) + }); + }); + }); +}; diff --git a/test/tests/stake/GetMarketLaunchIncentiveParameters.re b/test/tests/stake/GetMarketLaunchIncentiveParameters.re new file mode 100644 index 0000000..0b4fee4 --- /dev/null +++ b/test/tests/stake/GetMarketLaunchIncentiveParameters.re @@ -0,0 +1,59 @@ +open LetOps; +open Mocha; + +let test = (~contracts: ref(Helpers.coreContracts)) => { + describe("getMarketLaunchParameters", () => { + let marketIndex = 5; + + let initialMultiplier = + CONSTANTS.tenToThe18->Ethers.BigNumber.add(Helpers.randomInteger()); + let initialPeriod = Helpers.randomInteger(); + + let test = + ( + ~initialMultiplier, + ~initialPeriod, + ~expectedMultiplier, + ~expectedPeriod, + (), + ) => { + let%AwaitThen _ = + contracts^.staker + ->Staker.Exposed.setGetMarketLaunchIncentiveParametersParams( + ~marketIndex, + ~multiplier=initialMultiplier, + ~period=initialPeriod, + ); + let%Await result = + contracts^.staker + ->Staker.Exposed._getMarketLaunchIncentiveParametersExposed( + ~marketIndex, + ); + + let period = result->Obj.magic->Array.getExn(0); + let multiplier = result->Obj.magic->Array.getExn(1); + period->Chai.bnEqual(expectedPeriod); + multiplier->Chai.bnEqual(expectedMultiplier); + }; + + it( + "returns kPeriod and kInitialMultiplier correctly for a market once set", + test( + ~initialMultiplier, + ~initialPeriod, + ~expectedMultiplier=initialMultiplier, + ~expectedPeriod=initialPeriod, + ), + ); + + it( + "if kInitialMultiplier is zero then returns 1e18 as multiplier", + test( + ~initialMultiplier=CONSTANTS.zeroBn, + ~initialPeriod, + ~expectedMultiplier=CONSTANTS.tenToThe18, + ~expectedPeriod=initialPeriod, + ), + ); + }); +}; diff --git a/test/tests/stake/MintAccumulatedFloat.re b/test/tests/stake/MintAccumulatedFloat.re new file mode 100644 index 0000000..36bdcdf --- /dev/null +++ b/test/tests/stake/MintAccumulatedFloat.re @@ -0,0 +1,135 @@ +open Globals; +open LetOps; +open Mocha; +open SmockGeneral; + +let test = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describe("mintAccumulatedFloat", () => { + let marketIndex = Helpers.randomJsInteger(); + + let (floatToMintLong, floatToMintShort, latestRewardIndexForMarket) = + Helpers.Tuple.make3(Helpers.randomTokenAmount); + + let user = Helpers.randomAddress(); + + let promiseRef: ref(JsPromise.t(ContractHelpers.transaction)) = + ref(None->Obj.magic); + + let setup = (~floatToMintLong, ~floatToMintShort) => { + let {staker} = contracts.contents; + + let%AwaitThen _ = + staker->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="mintAccumulatedFloat", + ); + + StakerSmocked.InternalMock.mock_calculateAccumulatedFloatAndExecuteOutstandingShiftsToReturn( + floatToMintLong->add(floatToMintShort), + ); + + let%AwaitThen _ = + staker->Staker.Exposed.setMintAccumulatedFloatAndClaimFloatParams( + ~marketIndex, + ~latestRewardIndexForMarket, + ); + + promiseRef := + contracts^.staker + ->Staker.Exposed._mintAccumulatedFloatAndExecuteOutstandingShiftsExposed( + ~marketIndex, + ~user, + ); + + let%Await _ = promiseRef^; + promiseRef^; + }; + + describe("case floatToMint > 0", () => { + before_once'(() => setup(~floatToMintLong, ~floatToMintShort)); + + it("calls calculateAccumulatedFloat with correct arguments", () => + StakerSmocked.InternalMock._calculateAccumulatedFloatAndExecuteOutstandingShiftsCallCheck({ + marketIndex, + user, + }) + ); + + it("calls mintFloat with correct arguments", () => + StakerSmocked.InternalMock._mintFloatCallCheck({ + user, + floatToMint: + floatToMintLong->Ethers.BigNumber.add(floatToMintShort), + }) + ); + + it("emits FloatMinted event", () => { + Chai.callEmitEvents( + ~call=promiseRef^, + ~contract=contracts^.staker->Obj.magic, + ~eventName="FloatMinted", + ) + ->Chai.withArgs3( + user, + marketIndex, + floatToMintLong->add(floatToMintShort), + ) + }); + + it("mutates userIndexOfLastClaimedReward", () => { + let%Await lastClaimed = + contracts^.staker + ->Staker.userIndexOfLastClaimedReward(marketIndex, user); + lastClaimed->Chai.bnEqual(latestRewardIndexForMarket); + }); + }); + + describe("case floatToMint == 0", () => { + before_once'(() => { + let {staker} = contracts.contents; + let%Await _ = + staker->StakerStakeSetters.setUserIndexOfLastClaimedReward( + ~marketIndex, + ~user, + ~rewardIndex=zeroBn, + ); + + setup( + ~floatToMintLong=CONSTANTS.zeroBn, + ~floatToMintShort=CONSTANTS.zeroBn, + ); + }); + + it("calls calculateAccumulatedFloat with correct arguments", () => + StakerSmocked.InternalMock._calculateAccumulatedFloatAndExecuteOutstandingShiftsCallCheck({ + marketIndex, + user, + }) + ); + + it("doesn't call mintFloat", () => + expect(StakerSmocked.InternalMock._mintFloatFunction()) + ->toHaveCallCount(0) + ); + + it("doesn't mutate userIndexOfLastClaimed", () => { + let%Await lastClaimed = + contracts^.staker + ->Staker.userIndexOfLastClaimedReward(marketIndex, user); + lastClaimed->Chai.bnEqual(zeroBn); + }); + + it("doesn't emit FloatMinted event", () => { + Chai.callEmitEvents( + ~call=promiseRef^, + ~contract=contracts^.staker->Obj.magic, + ~eventName="FloatMinted", + ) + ->Chai.expectToNotEmit + }); + }); + }); +}; diff --git a/test/tests/stake/MintFloat.re b/test/tests/stake/MintFloat.re new file mode 100644 index 0000000..0e06211 --- /dev/null +++ b/test/tests/stake/MintFloat.re @@ -0,0 +1,60 @@ +open Globals; +open LetOps; +open Mocha; + +let test = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts as _: ref(array(Ethers.Wallet.t)), + ) => { + describe("_mintFloat", () => { + let user = Helpers.randomAddress(); + let floatToMint = Helpers.randomTokenAmount(); + + let floatPercentage = Helpers.randomJsInteger() / 65536; // divide by 2^16 to keep in range of uint16 I think? + + before_once'(() => { + let {staker, floatCapitalSmocked, floatTokenSmocked} = + contracts.contents; + + let%Await _ = + staker->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="_mintFloat", + ); + + let%Await _ = + staker->Staker.setVariable( + ~name="floatCapital", + ~value=floatCapitalSmocked.address, + ); + + let%AwaitThen _ = + staker->Staker.Exposed.set_mintFloatParams( + ~floatToken=floatTokenSmocked.address, + ~floatPercentage, + ); + + staker->Staker.Exposed._mintFloatExposed(~user, ~floatToMint); + }); + + it("calls mint on floatToken for user for amount floatToMint", () => + contracts.contents.floatTokenSmocked + ->FloatTokenSmocked.mintCallCheck({_to: user, amount: floatToMint}) + ); + + it( + "calls mint on floatTokens for floatCapital for amount (floatToMint * floatPercentage) / 1e18", + () => { + let {floatCapitalSmocked, floatTokenSmocked} = contracts.contents; + + floatTokenSmocked->FloatTokenSmocked.mintCallCheck({ + _to: floatCapitalSmocked.address, + amount: + floatToMint + ->mul(floatPercentage->bnFromInt) + ->div(CONSTANTS.tenToThe18), + }); + }, + ); + }); +}; diff --git a/test/tests/stake/ShiftTokens.re b/test/tests/stake/ShiftTokens.re new file mode 100644 index 0000000..836413f --- /dev/null +++ b/test/tests/stake/ShiftTokens.re @@ -0,0 +1,286 @@ +open Globals; +open LetOps; +open Mocha; +open SmockGeneral; + +let testUnit = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describe("shiftTokens", () => { + let marketIndex = Helpers.randomJsInteger(); + let amountSyntheticTokensToShift = Helpers.randomTokenAmount(); + let amountSyntheticTokensToShiftBeforeValue = Helpers.randomTokenAmount(); + + before_once'(() => { + let {staker, longShortSmocked} = contracts.contents; + let%Await _ = + staker->Staker.Exposed.setLongShort( + ~longShort=longShortSmocked.address, + ); + contracts.contents.staker + ->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="shiftTokens", + ); + }); + + let setup = + ( + ~isShiftFromLong, + ~amountSyntheticTokensToShiftBeforeValue, + ~amountSyntheticTokensToShift, + ~userNextPrice_stakedActionIndex, + ~latestRewardIndex, + ~userAmountStaked, + ) => { + let user = accounts.contents->Array.getUnsafe(0).address; + let {staker, syntheticTokenSmocked} = contracts.contents; + + let%Await _ = + staker->Staker.Exposed.setShiftTokensParams( + ~marketIndex, + ~isShiftFromLong, + ~user, + ~amountSyntheticTokensToShift=amountSyntheticTokensToShiftBeforeValue, + ~userNextPrice_stakedActionIndex, + ~latestRewardIndex, + ~userAmountStaked, + ~syntheticToken=syntheticTokenSmocked.address, + ); + staker->Staker.shiftTokens( + ~amountSyntheticTokensToShift, + ~marketIndex, + ~isShiftFromLong, + ); + }; + + let isShiftFromLong = true; + + it( + "reverts if market doesn't exist or user doesn't have any staked tokens", + () => { + Chai.expectRevert( + ~transaction= + contracts.contents.staker + ->Staker.shiftTokens( + ~amountSyntheticTokensToShift, + ~marketIndex, + ~isShiftFromLong, + ), + ~reason="Not enough tokens to shift", + ) + }); + + it( + "calls _mintAccumulatedFloatAndExecuteOutstandingShifts (via modifier) with the correct arguments if the user has a 'confirmed' shift that needs to be settled", + () => { + let user = accounts.contents->Array.getUnsafe(0).address; + let userNextPrice_stakedActionIndex = Helpers.randomInteger(); + let latestRewardIndex = + userNextPrice_stakedActionIndex->add(Helpers.randomInteger()); + + let%Await _ = + setup( + ~isShiftFromLong, + ~amountSyntheticTokensToShiftBeforeValue, + ~userNextPrice_stakedActionIndex, + ~latestRewardIndex, + ~amountSyntheticTokensToShift, + ~userAmountStaked= + amountSyntheticTokensToShift->add( + amountSyntheticTokensToShiftBeforeValue, + ), + ); + + StakerSmocked.InternalMock._updateUsersStakedPosition_mintAccumulatedFloatAndExecuteOutstandingShiftsCallCheck({ + marketIndex, + user, + }); + }, + ); + + it( + "doesn't call _mintAccumulatedFloatAndExecuteOutstandingShifts if userNextPrice_stakedActionIndex == 0", + () => { + let latestRewardIndex = Helpers.randomInteger(); + + let%Await _ = + setup( + ~isShiftFromLong, + ~amountSyntheticTokensToShiftBeforeValue, + ~userNextPrice_stakedActionIndex=zeroBn, + ~latestRewardIndex, + ~amountSyntheticTokensToShift, + ~userAmountStaked= + amountSyntheticTokensToShift->add( + amountSyntheticTokensToShiftBeforeValue, + ), + ); + (); + expect( + StakerSmocked.InternalMock._mintAccumulatedFloatAndExecuteOutstandingShiftsFunction(), + ) + ->toHaveCallCount(0); + }, + ); + it( + "doesn't call _mintAccumulatedFloatAndExecuteOutstandingShifts if userNextPrice_stakedActionIndex == latestRewardIndex", + () => { + let userNextPrice_stakedActionIndex = Helpers.randomInteger(); + let latestRewardIndex = userNextPrice_stakedActionIndex; + + let%Await _ = + setup( + ~isShiftFromLong, + ~amountSyntheticTokensToShiftBeforeValue, + ~userNextPrice_stakedActionIndex, + ~latestRewardIndex, + ~amountSyntheticTokensToShift, + ~userAmountStaked= + amountSyntheticTokensToShift->add( + amountSyntheticTokensToShiftBeforeValue, + ), + ); + (); + + expect( + StakerSmocked.InternalMock._mintAccumulatedFloatAndExecuteOutstandingShiftsFunction(), + ) + ->toHaveCallCount(0); + }, + ); + + it( + "doesn't call _mintAccumulatedFloatAndExecuteOutstandingShifts if userNextPrice_stakedActionIndex > latestRewardIndex", + () => { + let latestRewardIndex = Helpers.randomInteger(); + let userNextPrice_stakedActionIndex = + latestRewardIndex->add(Helpers.randomInteger()); + + let%Await _ = + setup( + ~isShiftFromLong, + ~amountSyntheticTokensToShiftBeforeValue, + ~userNextPrice_stakedActionIndex, + ~latestRewardIndex, + ~amountSyntheticTokensToShift, + ~userAmountStaked= + amountSyntheticTokensToShift->add( + amountSyntheticTokensToShiftBeforeValue, + ), + ); + + expect( + StakerSmocked.InternalMock._mintAccumulatedFloatAndExecuteOutstandingShiftsFunction(), + ) + ->toHaveCallCount(0); + }, + ); + + it( + "sets the userNextPrice_stakedActionIndex for the user to latestRewardIndex + 1", + () => { + let latestRewardIndex = Helpers.randomInteger(); + let user = accounts.contents->Array.getUnsafe(0).address; + + let%Await _ = + setup( + ~isShiftFromLong, + ~amountSyntheticTokensToShiftBeforeValue, + ~userNextPrice_stakedActionIndex=zeroBn, + ~latestRewardIndex, + ~amountSyntheticTokensToShift, + ~userAmountStaked= + amountSyntheticTokensToShift->add( + amountSyntheticTokensToShiftBeforeValue, + ), + ); + + let%Await userNextPrice_stakedActionIndexAfter = + contracts.contents.staker + ->Staker.userNextPrice_stakedActionIndex(marketIndex, user); + + Chai.bnEqual( + userNextPrice_stakedActionIndexAfter, + latestRewardIndex->add(oneBn), + ); + }); + + let sideSpecificTests = (~isShiftFromLong) => { + it( + "calls the shiftPositionFrom" + ++ (isShiftFromLong ? "Long" : "Short") + ++ "NextPrice function on long short with the correct parameters", + () => { + let {longShortSmocked} = contracts.contents; + let latestRewardIndex = Helpers.randomInteger(); + + let%Await _ = + setup( + ~isShiftFromLong, + ~amountSyntheticTokensToShiftBeforeValue, + ~userNextPrice_stakedActionIndex=zeroBn, + ~latestRewardIndex, + ~amountSyntheticTokensToShift, + ~userAmountStaked= + amountSyntheticTokensToShift->add( + amountSyntheticTokensToShiftBeforeValue, + ), + ); + + longShortSmocked->LongShortSmocked.shiftPositionNextPriceCallCheck({ + marketIndex, + amountSyntheticTokensToShift, + isShiftFromLong, + }); + }, + ); + it( + "updates the amountToShiftFrom" + ++ (isShiftFromLong ? "Long" : "Short") + ++ "User value with the amount to shift", + () => { + let latestRewardIndex = Helpers.randomInteger(); + let user = accounts.contents->Array.getUnsafe(0).address; + + let%Await _ = + setup( + ~isShiftFromLong, + ~amountSyntheticTokensToShiftBeforeValue, + ~userNextPrice_stakedActionIndex=zeroBn, + ~latestRewardIndex, + ~amountSyntheticTokensToShift, + ~userAmountStaked= + amountSyntheticTokensToShift->add( + amountSyntheticTokensToShiftBeforeValue, + ), + ); + + let%Await totalAmountToShiftFromSide = + contracts.contents.staker + ->Staker.userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom( + marketIndex, + isShiftFromLong, + user, + ); + + Chai.bnEqual( + totalAmountToShiftFromSide, + amountSyntheticTokensToShiftBeforeValue->add( + amountSyntheticTokensToShift, + ), + ); + }, + ); + }; + + describe("Shift from Long", () => + sideSpecificTests(~isShiftFromLong=true) + ); + + describe("Shift from Short", () => + sideSpecificTests(~isShiftFromLong=false) + ); + }); +}; diff --git a/test/tests/stake/StakeFromUser.re b/test/tests/stake/StakeFromUser.re new file mode 100644 index 0000000..0f5eb9c --- /dev/null +++ b/test/tests/stake/StakeFromUser.re @@ -0,0 +1,161 @@ +open Globals; +open LetOps; +open Mocha; +open SmockGeneral; + +let test = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describe("stakeFromUser", () => { + let marketIndexForToken = Helpers.randomJsInteger(); + + let latestRewardIndex = + Js.Math.random_int(2, Js.Int.max)->Ethers.BigNumber.fromInt; + let randomRewardIndexBelow = num => + Js.Math.random_int(1, num->Ethers.BigNumber.toNumber) + ->Ethers.BigNumber.fromInt; + + let from = Helpers.randomAddress(); + let mockTokenWalletRef: ref(Ethers.Wallet.t) = ref(None->Obj.magic); + + let (userAmountStaked, userAmountToStake) = + Helpers.Tuple.make2(Helpers.randomTokenAmount); // will be at least two + + let promiseRef: ref(JsPromise.t(ContractHelpers.transaction)) = + ref(None->Obj.magic); + + let setup = (~userLastRewardIndex, ~latestRewardIndex) => { + let {staker, longShortSmocked} = contracts.contents; + + let%Await _ = + staker->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="stakeFromUser", + ); + + mockTokenWalletRef := accounts.contents->Array.getExn(6); + + let%Await _ = + contracts.contents.staker + ->Staker.Exposed.setStakeFromUserParams( + ~longshort=longShortSmocked.address, + ~token=mockTokenWalletRef.contents.address, + ~marketIndexForToken, + ~user=from, + ~latestRewardIndex, + ~userAmountStaked, + ~userLastRewardIndex, + ); + + let promise = + contracts.contents.staker + ->ContractHelpers.connect(~address=mockTokenWalletRef.contents) + ->Staker.stakeFromUser(~from, ~amount=userAmountToStake); + promiseRef := promise; + promise; + }; + + it_skip("calls onlyValidSynthetic with correct args", () => { + // StakerSmocked.InternalMock.onlyValidSyntheticCallCheck() + // ->Array.getExn(0) + // ->Chai.recordEqualFlat({synth: mockTokenWalletRef.contents.address}) + () + }); + + it("calls updateSystemState on longshort with correct args", () => { + let {longShortSmocked} = contracts.contents; + + let%Await _ = + setup( + ~userLastRewardIndex=randomRewardIndexBelow(latestRewardIndex), + ~latestRewardIndex, + ); + + longShortSmocked->LongShortSmocked.updateSystemStateCallCheck({ + marketIndex: marketIndexForToken, + }); + }); + + describe("case user has outstanding float to be minted", () => { + before_once'(() => + setup( + ~userLastRewardIndex=randomRewardIndexBelow(latestRewardIndex), + ~latestRewardIndex, + ) + ); + + it("calls mintAccumulatedFloat with correct args", () => { + StakerSmocked.InternalMock._mintAccumulatedFloatAndExecuteOutstandingShiftsCallCheck({ + marketIndex: marketIndexForToken, + user: from, + }) + }); + it("mutates userAmountStaked", () => { + let%Await amountStaked = + contracts.contents.staker + ->Staker.userAmountStaked( + mockTokenWalletRef.contents.address, + from, + ); + amountStaked->Chai.bnEqual( + userAmountStaked->Ethers.BigNumber.add(userAmountToStake), + ); + }); + + it("mutates userIndexOfLastClaimedReward", () => { + let%Await lastClaimedReward = + contracts.contents.staker + ->Staker.userIndexOfLastClaimedReward(marketIndexForToken, from); + + lastClaimedReward->Chai.bnEqual(latestRewardIndex); + }); + + it("emits StakeAdded", () => + Chai.callEmitEvents( + ~call=promiseRef.contents, + ~contract=contracts.contents.staker->Obj.magic, + ~eventName="StakeAdded", + ) + ->Chai.withArgs4( + from, + mockTokenWalletRef.contents.address, + userAmountToStake, + latestRewardIndex, + ) + ); + }); + + // next two cases still do everything except call mintFloat but unwieldy to test + describe("case user has last claimed index of 0", () => { + before_once'(() => + setup( + ~userLastRewardIndex=CONSTANTS.zeroBn, + ~latestRewardIndex=Helpers.randomInteger(), + ) + ); + + it("doesn't call mintAccumulatedFloat", () => { + expect( + StakerSmocked.InternalMock._mintAccumulatedFloatAndExecuteOutstandingShiftsFunction(), + ) + ->toHaveCallCount(0) + }); + }); + + describe( + "case users last claimed index == latestRewardIndex for market", () => { + let index = Helpers.randomInteger(); + before_once'(() => + setup(~userLastRewardIndex=index, ~latestRewardIndex=index) + ); + + it("doesn't call mintAccumulatedFloat", () => { + expect( + StakerSmocked.InternalMock._mintAccumulatedFloatAndExecuteOutstandingShiftsFunction(), + ) + ->toHaveCallCount(0) + }); + }); + }); +}; diff --git a/test/tests/stake/StakerAdminFunctions.re b/test/tests/stake/StakerAdminFunctions.re new file mode 100644 index 0000000..023372e --- /dev/null +++ b/test/tests/stake/StakerAdminFunctions.re @@ -0,0 +1,339 @@ +open Globals; +open LetOps; +open Mocha; + +let testUnit = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describe("Staker Admin Functions", () => { + let marketIndex = Helpers.randomJsInteger(); + + describe("changeFloatPercentage", () => { + let newFloatPerc = bnFromString("42000000000000000"); + + let txPromiseRef: ref(JsPromise.t(ContractHelpers.transaction)) = + ref(()->JsPromise.resolve->Obj.magic); + + before_once'(() => { + let%Await _ = + contracts.contents.staker + ->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="changeFloatPercentage", + ); + + txPromiseRef := + contracts.contents.staker + ->Staker.Exposed.changeFloatPercentage( + ~newFloatPercentage=newFloatPerc, + ); + + txPromiseRef.contents; + }); + + it("should call the onlyAdmin modifier", () => { + StakerSmocked.InternalMock.onlyAdminModifierLogicCallCheck() + }); + + it("should call _changeFloatPercentage with correct argument", () => { + StakerSmocked.InternalMock._changeFloatPercentageCallCheck({ + newFloatPercentage: newFloatPerc, + }) + }); + + it("emits FloatPercentageUpdated with correct argument", () => { + Chai.callEmitEvents( + ~call=txPromiseRef.contents, + ~contract=contracts.contents.staker->Obj.magic, + ~eventName="FloatPercentageUpdated", + ) + ->Chai.withArgs2(newFloatPerc) + }); + + it("should revert if !(0 < newFloatPercentage <= 100 percent)", () => { + let testValueWithinBounds = bnFromString("420000000000000000"); + let testValueOutOfBoundsLowSide = bnFromInt(0); + let testValueOutOfBoundsHighSide = + bnFromString("1010000000000000000"); + + let%Await _ = + contracts.contents.staker + ->Staker.Exposed._changeFloatPercentageExposed( + ~newFloatPercentage=testValueWithinBounds, + ); + + let%Await _ = + Chai.expectRevert( + ~transaction= + contracts.contents.staker + ->Staker.Exposed._changeFloatPercentageExposed( + ~newFloatPercentage=testValueOutOfBoundsLowSide, + ), + ~reason="", + ); + + Chai.expectRevert( + ~transaction= + contracts.contents.staker + ->Staker.Exposed._changeFloatPercentageExposed( + ~newFloatPercentage=testValueOutOfBoundsHighSide, + ), + ~reason="", + ); + }); + + it("should update floatPercentage correctly", () => { + let randomNewFloatPerc = + Helpers.randomInteger()->mul(bnFromString("10000000")); + + let%Await _ = + contracts.contents.staker + ->Staker.Exposed._changeFloatPercentageExposed( + ~newFloatPercentage=randomNewFloatPerc, + ); + + let%Await floatPercAfterCall = + contracts.contents.staker->Staker.Exposed.floatPercentage; + + Chai.bnEqual(randomNewFloatPerc, floatPercAfterCall); + }); + }); + + describe("changeUnstakeFee", () => { + let unstakeFeeBasisPoints = Helpers.randomInteger(); + + let txPromiseRef: ref(JsPromise.t(ContractHelpers.transaction)) = + ref(()->JsPromise.resolve->Obj.magic); + + before_once'(() => { + let%Await _ = + contracts.contents.staker + ->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="changeUnstakeFee", + ); + + txPromiseRef := + contracts.contents.staker + ->Staker.Exposed.changeUnstakeFee( + ~marketIndex, + ~newMarketUnstakeFee_e18=unstakeFeeBasisPoints, + ); + txPromiseRef.contents; + }); + + it("should call _changeUnstakeFee with correct arguments", () => { + StakerSmocked.InternalMock._changeUnstakeFeeCallCheck({ + marketIndex, + newMarketUnstakeFee_e18: unstakeFeeBasisPoints, + }) + }); + + it("should emit StakeWithdrawalFeeUpdated with correct arguments", () => { + Chai.callEmitEvents( + ~call=txPromiseRef.contents, + ~contract=contracts.contents.staker->Obj.magic, + ~eventName="StakeWithdrawalFeeUpdated", + ) + ->Chai.withArgs2(marketIndex, unstakeFeeBasisPoints) + }); + + it("should not allow new unstake fee greater than 5 percent", () => { + let adminWallet = accounts.contents->Array.getUnsafe(0); + let sixPercent = bnFromString("60000000000000000"); + + let%Await _ = + Chai.expectRevert( + ~transaction= + contracts.contents.staker + ->ContractHelpers.connect(~address=adminWallet) + ->Staker.Exposed._changeUnstakeFeeExposed( + ~marketIndex, + ~newMarketUnstakeFee_e18=sixPercent, + ), + ~reason="", + ); + (); + }); + + it("should update unstake fee correctly", () => { + let adminWallet = accounts.contents->Array.getUnsafe(0); + let newFeePercentageRandom = + Helpers.randomInteger()->mul(bnFromString("10000000")); + + let%Await _ = + contracts.contents.staker + ->ContractHelpers.connect(~address=adminWallet) + ->Staker.Exposed._changeUnstakeFeeExposed( + ~marketIndex=1, + ~newMarketUnstakeFee_e18=newFeePercentageRandom, + ); + + let%Await feeAfterCall = + contracts.contents.staker->Staker.Exposed.marketUnstakeFee_e18(1); + + Chai.bnEqual(feeAfterCall, newFeePercentageRandom); + }); + }); + + describe("changeBalanceIncentiveParameters", () => { + let marketIndex = 23; + let startingTestExponent = bnFromInt(1); + let updatedExponent = bnFromInt(2); + let safeExponentBitShifting = bnFromInt(50); + + let txPromiseRef: ref(JsPromise.t(ContractHelpers.transaction)) = + ref(()->JsPromise.resolve->Obj.magic); + + before_once'(() => { + let%Await _ = + contracts.contents.staker + ->StakerSmocked.InternalMock.setupFunctionForUnitTesting( + ~functionName="changeBalanceIncentiveParameters", + ); + + let stakerAddress = accounts.contents->Array.getUnsafe(5); + + txPromiseRef := + contracts.contents.staker + ->ContractHelpers.connect(~address=stakerAddress) + ->Staker.changeBalanceIncentiveParameters( + ~marketIndex, + ~balanceIncentiveCurve_exponent=startingTestExponent, + ~balanceIncentiveCurve_equilibriumOffset=zeroBn, + ~safeExponentBitShifting, + ); + txPromiseRef.contents; + }); + + it("should call the onlyAdmin Modifier", () => { + let%Await _ = + contracts.contents.staker + ->Staker.changeBalanceIncentiveParameters( + ~marketIndex, + ~balanceIncentiveCurve_exponent=updatedExponent, + ~balanceIncentiveCurve_equilibriumOffset=zeroBn, + ~safeExponentBitShifting, + ); + StakerSmocked.InternalMock.onlyAdminModifierLogicCallCheck(); + }); + + it( + "should call _changeBalanceIncentiveExponent with correct arguments", + () => + StakerSmocked.InternalMock._changeBalanceIncentiveParametersCallCheck({ + marketIndex, + balanceIncentiveCurve_exponent: updatedExponent, + balanceIncentiveCurve_equilibriumOffset: zeroBn, + safeExponentBitShifting, + }) + ); + + it( + "should emit BalanceIncentiveParamsUpdated with correct arguments", () => { + Chai.callEmitEvents( + ~call=txPromiseRef^, + ~contract=contracts.contents.staker->Obj.magic, + ~eventName="BalanceIncentiveParamsUpdated", + ) + ->Chai.withArgs4( + marketIndex, + startingTestExponent, + zeroBn, + safeExponentBitShifting, + ) + }); + + it("should only allow (0 < new exponent)", () => { + let adminWallet = accounts.contents->Array.getUnsafe(0); + let newExponentOutOfBoundsLowSide = bnFromInt(0); + + Chai.expectRevert( + ~transaction= + contracts.contents.staker + ->ContractHelpers.connect(~address=adminWallet) + ->Staker.Exposed._changeBalanceIncentiveParametersExposed( + ~marketIndex, + ~balanceIncentiveCurve_exponent=newExponentOutOfBoundsLowSide, + ~balanceIncentiveCurve_equilibriumOffset=zeroBn, + ~safeExponentBitShifting, + ), + ~reason="", + ); + }); + + it("should ensure (-9e17 < new equilibrium offset < 9e17)", () => { + let adminWallet = accounts.contents->Array.getUnsafe(0); + let balanceIncentiveCurve_exponent = bnFromInt(3); + let newOffsetOutOfBoundsHighSide = + bnFromString("900000000000000000") + ->add(Helpers.randomTokenAmount()); + let newOffsetOutOfBoundsLowSide = + bnFromString("-900000000000000000") + ->sub(Helpers.randomTokenAmount()); + + let%Await _ = + Chai.expectRevert( + ~transaction= + contracts.contents.staker + ->ContractHelpers.connect(~address=adminWallet) + ->Staker.Exposed._changeBalanceIncentiveParametersExposed( + ~marketIndex, + ~balanceIncentiveCurve_exponent, + ~balanceIncentiveCurve_equilibriumOffset=newOffsetOutOfBoundsHighSide, + ~safeExponentBitShifting, + ), + ~reason="", + ); + + let%Await _ = + Chai.expectRevert( + ~transaction= + contracts.contents.staker + ->ContractHelpers.connect(~address=adminWallet) + ->Staker.Exposed._changeBalanceIncentiveParametersExposed( + ~marketIndex, + ~balanceIncentiveCurve_exponent, + ~balanceIncentiveCurve_equilibriumOffset=newOffsetOutOfBoundsLowSide, + ~safeExponentBitShifting, + ), + ~reason="", + ); + (); + }); + + it("should update incentive exponent correctly", () => { + let adminWallet = accounts.contents->Array.getUnsafe(0); + let newExponent = bnFromInt(4); + + let {staker, longShortSmocked} = contracts.contents; + + let _ = + longShortSmocked->LongShortSmocked.mockMarketSideValueInPaymentTokenToReturn( + CONSTANTS.tenToThe18, + ); + + let%Await _ = + staker->Staker.setVariable( + ~name="longShort", + ~value=longShortSmocked.address, + ); + + let%Await _ = + staker + ->ContractHelpers.connect(~address=adminWallet) + ->Staker.Exposed._changeBalanceIncentiveParametersExposed( + ~marketIndex, + ~balanceIncentiveCurve_exponent=newExponent, + ~balanceIncentiveCurve_equilibriumOffset=zeroBn, + ~safeExponentBitShifting, + ); + + let%Await exponentAfterCall = + staker->Staker.Exposed.balanceIncentiveCurve_exponent(marketIndex); + + Chai.bnEqual(exponentAfterCall, newExponent); + }); + }); + }); +}; diff --git a/test/tests/stake/StakerModifiers.re b/test/tests/stake/StakerModifiers.re new file mode 100644 index 0000000..43a8972 --- /dev/null +++ b/test/tests/stake/StakerModifiers.re @@ -0,0 +1,54 @@ +open Mocha; + +let testUnit = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describe("Staker Modifiers", () => { + describe("onlyAdminModifierLogic", () => { + it("reverts if caller is non-admin", () => { + let nonAdminWallet = accounts.contents->Array.getUnsafe(1); + + Chai.expectRevert( + ~transaction= + contracts.contents.staker + ->ContractHelpers.connect(~address=nonAdminWallet) + ->Staker.Exposed.onlyAdminModifierLogicExposed, + ~reason=Helpers.adminErrorMessage(~address=nonAdminWallet.address), + ); + }) + }); + + describe("onlyValidSyntheticModifierLogic", () => { + it("reverts if synth invalid (i.e. has yet to be assigned an index)", () => { + let randomWallet = accounts.contents->Array.getUnsafe(2); + let synthAddress = Helpers.randomAddress(); + + Chai.expectRevert( + ~transaction= + contracts.contents.staker + ->ContractHelpers.connect(~address=randomWallet) + ->Staker.Exposed.onlyValidSyntheticModifierLogicExposed( + ~synth=synthAddress, + ), + ~reason="not valid synth", + ); + }) + }); + + describe("onlyLongShortModifierLogic", () => { + it("reverts if caller is not LongShort", () => { + let randomWallet = accounts.contents->Array.getUnsafe(3); + + Chai.expectRevert( + ~transaction= + contracts.contents.staker + ->ContractHelpers.connect(~address=randomWallet) + ->Staker.Exposed.onlyLongShortModifierLogicExposed, + ~reason="not LongShort", + ); + }) + }); + }); +}; diff --git a/test/tests/stake/Withdraw.re b/test/tests/stake/Withdraw.re new file mode 100644 index 0000000..1e0f82a --- /dev/null +++ b/test/tests/stake/Withdraw.re @@ -0,0 +1,227 @@ +open Globals; +open LetOps; +open Mocha; + +let testUnit = + ( + ~contracts: ref(Helpers.stakerUnitTestContracts), + ~accounts: ref(array(Ethers.Wallet.t)), + ) => { + describeUnit("Withdraw functions", () => { + let marketIndex = Helpers.randomJsInteger(); + let amountStaked = Helpers.randomTokenAmount(); + + describe_skip("_withdraw", () => { + let userWallet: ref(Ethers.Wallet.t) = ref(None->Obj.magic); + let treasury = Helpers.randomAddress(); + let amountWithdrawn = + amountStaked->div(Js.Math.random_int(1, 20)->bnFromInt); + let fees = Helpers.randomRatio1e18(); + let call: ref(JsPromise.t(ContractHelpers.transaction)) = + ref(None->Obj.magic); + let connectedStaker: ref(Staker.t) = ref(None->Obj.magic); + + let setup = amountStaked => { + userWallet := accounts.contents->Array.getUnsafe(5); + let {staker, syntheticTokenSmocked} = contracts.contents; + let%Await _ = + staker->Staker.Exposed.set_withdrawGlobals( + ~marketIndex, + ~syntheticToken=syntheticTokenSmocked.address, + ~user=userWallet.contents.address, + ~amountStaked, + ~fees, + ~treasury, + ); + syntheticTokenSmocked->SyntheticTokenSmocked.mockTransferToReturn( + true, + ); + + connectedStaker := + staker->ContractHelpers.connect(~address=userWallet.contents); + call := + connectedStaker.contents + ->Staker.Exposed._withdrawExposed( + ~token=syntheticTokenSmocked.address, + ~marketIndex, + ~amount=amountWithdrawn, + ); + }; + + describe("happy case", () => { + before_once'(() => { + let%AwaitThen _ = setup(amountStaked); + call.contents; + }); + it("calls transfer on the synthetic token with correct args", () => { + let fees = amountWithdrawn->mul(fees)->div(tenToThe18); + contracts.contents.syntheticTokenSmocked + ->SyntheticTokenSmocked.transferCallCheck({ + recipient: treasury, + amount: fees, + }); + contracts.contents.syntheticTokenSmocked + ->SyntheticTokenSmocked.transferCallCheck({ + recipient: userWallet.contents.address, + amount: amountWithdrawn->sub(fees), + }); + }); + + it( + "calls _mintAccumulatedFloatAndExecuteOutstandingShifts with correct args", + () => { + StakerSmocked.InternalMock._mintAccumulatedFloatAndExecuteOutstandingShiftsCallCheck({ + user: userWallet.contents.address, + marketIndex, + }) + }); + + it("mutates userAmountStaked", () => { + let%Await amountStakedAfter = + contracts.contents.staker + ->Staker.userAmountStaked( + contracts.contents.syntheticTokenSmocked.address, + userWallet.contents.address, + ); + + amountStakedAfter->Chai.bnEqual( + amountStaked->sub(amountWithdrawn), + ); + }); + + it("emits a StakeWithdrawn event with correct args", () => + Chai.callEmitEvents( + ~call=call.contents, + ~contract=connectedStaker.contents->Obj.magic, + ~eventName="StakeWithdrawn", + ) + ->Chai.withArgs3( + userWallet.contents.address, + contracts.contents.syntheticTokenSmocked.address, + amountWithdrawn, + ) + ); + }); + + describe("sad case", () => { + before_once'(() => setup(amountWithdrawn->sub(oneBn))); + it("reverts if nothing to withdraw", () => { + Chai.expectRevert( + ~transaction=call.contents, + ~reason="not enough to withdraw", + ) + }); + }); + }); + + describe_skip("withdraw", () => { + let token = Helpers.randomAddress(); + let amountWithdrawn = Helpers.randomTokenAmount(); + + before_once'(() => { + let%AwaitThen _ = + contracts.contents.staker + ->Staker.Exposed.setWithdrawGlobals( + ~longShort=contracts.contents.longShortSmocked.address, + ~marketIndex, + ~token, + ); + + contracts.contents.staker + ->Staker.withdraw( + ~marketIndex, + ~isWithdrawFromLong=true, + ~amount=amountWithdrawn, + ); + }); + + it("calls updateSystemState on longShort with correct args", () => { + contracts.contents.longShortSmocked + ->LongShortSmocked.updateSystemStateCallCheck({ + marketIndex: marketIndex, + }) + }); + it("calls _withdraw with correct args", () => + StakerSmocked.InternalMock._withdrawCallCheck({ + marketIndex, + token, + amount: amountWithdrawn, + }) + ); + + it("should not allow shifts > userAmountStaked", () => { + let adminWallet = accounts.contents->Array.getUnsafe(0); + + let%Await _ = + contracts.contents.staker + ->ContractHelpers.connect(~address=adminWallet) + ->Staker.Exposed.setWithdrawAllGlobals( + ~marketIndex, + ~longShort=contracts.contents.longShortSmocked.address, + ~user=adminWallet.address, + ~amountStaked=bnFromInt(0), + ~token, + ~userNextPrice_stakedActionIndex=bnFromInt(777), + ~syntheticTokens=token, + ~userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_long= + Helpers.randomTokenAmount(), + ~userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_short= + Helpers.randomTokenAmount(), + ); + + Chai.expectRevert( + ~transaction= + contracts.contents.staker + ->ContractHelpers.connect(~address=adminWallet) + ->Staker.withdraw( + ~marketIndex, + ~isWithdrawFromLong=true, + ~amount=amountWithdrawn, + ), + ~reason="Outstanding next price stake shifts too great", + ); + }); + }); + + describe_skip("withdrawAll", () => { + let token = Helpers.randomAddress(); + let userWallet: ref(Ethers.Wallet.t) = ref(None->Obj.magic); + before_once'(() => { + userWallet := accounts.contents->Array.getUnsafe(5); + let%AwaitThen _ = + contracts.contents.staker + ->Staker.Exposed.setWithdrawAllGlobals( + ~longShort=contracts.contents.longShortSmocked.address, + ~marketIndex, + ~token, + ~user=userWallet.contents.address, + ~amountStaked, + ~userNextPrice_stakedActionIndex=bnFromInt(1), + ~syntheticTokens=Helpers.randomAddress(), + ~userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_long= + bnFromInt(0), + ~userNextPrice_amountStakedSyntheticToken_toShiftAwayFrom_short= + bnFromInt(0), + ); + + contracts.contents.staker + ->ContractHelpers.connect(~address=userWallet.contents) + ->Staker.withdrawAll(~marketIndex, ~isWithdrawFromLong=true); + }); + + it("calls updateSystemState on longShort with correct args", () => { + contracts.contents.longShortSmocked + ->LongShortSmocked.updateSystemStateCallCheck({ + marketIndex: marketIndex, + }) + }); + it("calls _withdraw with correct args", () => + StakerSmocked.InternalMock._withdrawCallCheck({ + marketIndex, + token, + amount: amountStaked, + }) + ); + }); + }); +}; diff --git a/test/tests/yieldManager/ClaimAaveRewards.re b/test/tests/yieldManager/ClaimAaveRewards.re new file mode 100644 index 0000000..bdf53f1 --- /dev/null +++ b/test/tests/yieldManager/ClaimAaveRewards.re @@ -0,0 +1,65 @@ +open Globals; +open Mocha; + +let testUnit = + (~contracts: ref(Contract.YieldManagerAaveHelpers.contractsType)) => { + describe("Claiming Aave reward tokens", () => { + describe("claimAaveRewardsToTreasuryTxPromise", () => { + let claimAaveRewardsToTreasuryTxPromise = ref("NotSetYet"->Obj.magic); + let randomRewardAmount = Helpers.randomTokenAmount(); + + before_once'(() => { + let aaveIncentivesControllerSmockedContract = + (contracts.contents)#aaveIncentivesController; + + aaveIncentivesControllerSmockedContract->AaveIncentivesControllerMockSmocked.mockGetUserUnclaimedRewardsToReturn( + randomRewardAmount, + ); + + aaveIncentivesControllerSmockedContract->AaveIncentivesControllerMockSmocked.mockClaimRewardsToReturn( + randomRewardAmount, + ); + + claimAaveRewardsToTreasuryTxPromise := + (contracts.contents)#yieldManagerAave + ->YieldManagerAave.claimAaveRewardsToTreasury; + + claimAaveRewardsToTreasuryTxPromise.contents; + }); + it("CallCheck the ClaimAaveRewardTokenToTreasury event", () => { + Chai.callEmitEvents( + ~call=claimAaveRewardsToTreasuryTxPromise.contents, + ~contract=(contracts.contents)#yieldManagerAave->Obj.magic, + ~eventName="ClaimAaveRewardTokenToTreasury", + ) + ->Chai.withArgs1(randomRewardAmount) + }); + it( + "it calls getUserUnclaimedRewardsCallCheck with the correct parameters on the AaveIncentiveController", + () => { + let aaveIncentivesControllerSmockedContract = + (contracts.contents)#aaveIncentivesController; + + aaveIncentivesControllerSmockedContract->AaveIncentivesControllerMockSmocked.getUserUnclaimedRewardsCallCheck({ + user: (contracts.contents)#yieldManagerAave.address, + }); + }, + ); + it( + "it calls claimRewards with the correct parameters on the AaveIncentiveController", + () => { + let aaveIncentivesControllerSmockedContract = + (contracts.contents)#aaveIncentivesController; + + let treasury = (contracts.contents)#treasury; + + aaveIncentivesControllerSmockedContract->AaveIncentivesControllerMockSmocked.claimRewardsCallCheck({ + assets: [|(contracts.contents)#aToken.address|], + amount: randomRewardAmount, + _to: treasury.address, + }); + }, + ); + }) + }); +}; diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..9cd86b7 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,13501 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" + integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== + dependencies: + "@babel/highlight" "^7.14.5" + +"@babel/helper-validator-identifier@^7.14.5": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" + integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== + +"@babel/highlight@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" + integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== + dependencies: + "@babel/helper-validator-identifier" "^7.14.5" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/runtime@^7.4.4": + version "7.15.3" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.3.tgz#2e1c2880ca118e5b2f9988322bd8a7656a32502b" + integrity sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA== + dependencies: + regenerator-runtime "^0.13.4" + +"@chainlink/contracts@^0.1.7": + version "0.1.9" + resolved "https://registry.yarnpkg.com/@chainlink/contracts/-/contracts-0.1.9.tgz#b2e77b87d7eea737cd668c4c727660e7b55cd236" + integrity sha512-7UIqkdzarbK876YZAiGKeYj/ujG3FPVVxWLACxbdyacM+ryIAgcZMkaaavt5+NwVXJvVjwWmucWTDCTy0JP8ag== + optionalDependencies: + "@truffle/contract" "^4.3.8" + ethers "^4.0.45" + +"@defi-wonderland/smock@^2.0.1": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@defi-wonderland/smock/-/smock-2.0.2.tgz#0be863a61420fb162190c9be8798befada179f30" + integrity sha512-nZtnUftPkMmFedqDzBqQrZWX+6Q3fK5MNMK3R6mLTg8Ig087A7ifs1KH9vGGpZ3p9RdgC+scUy9KfDASp2SKxg== + dependencies: + diff "^5.0.0" + lodash.isequal "^4.5.0" + lodash.isequalwith "^4.4.0" + rxjs "^7.2.0" + semver "^7.3.5" + +"@ensdomains/address-encoder@^0.1.7": + version "0.1.9" + resolved "https://registry.yarnpkg.com/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz#f948c485443d9ef7ed2c0c4790e931c33334d02d" + integrity sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg== + dependencies: + bech32 "^1.1.3" + blakejs "^1.1.0" + bn.js "^4.11.8" + bs58 "^4.0.1" + crypto-addr-codec "^0.1.7" + nano-base32 "^1.0.1" + ripemd160 "^2.0.2" + +"@ensdomains/ens@0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@ensdomains/ens/-/ens-0.4.3.tgz#f4a6b55146fe526c9a50e13f373bf90d36ca94dc" + integrity sha512-btC+fGze//ml8SMNCx5DgwM8+kG2t+qDCZrqlL/2+PV4CNxnRIpR3egZ49D9FqS52PFoYLmz6MaQfl7AO3pUMA== + dependencies: + bluebird "^3.5.2" + eth-ens-namehash "^2.0.8" + ethereumjs-testrpc "^6.0.3" + ganache-cli "^6.1.0" + solc "^0.4.20" + testrpc "0.0.1" + web3-utils "^1.0.0-beta.31" + +"@ensdomains/ens@^0.4.4": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@ensdomains/ens/-/ens-0.4.5.tgz#e0aebc005afdc066447c6e22feb4eda89a5edbfc" + integrity sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw== + dependencies: + bluebird "^3.5.2" + eth-ens-namehash "^2.0.8" + solc "^0.4.20" + testrpc "0.0.1" + web3-utils "^1.0.0-beta.31" + +"@ensdomains/ensjs@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@ensdomains/ensjs/-/ensjs-2.0.1.tgz#c27438f9ca074825ddb08430988c7decf2062a91" + integrity sha512-gZLntzE1xqPNkPvaHdJlV5DXHms8JbHBwrXc2xNrL1AylERK01Lj/txCCZyVQqFd3TvUO1laDbfUv8VII0qrjg== + dependencies: + "@babel/runtime" "^7.4.4" + "@ensdomains/address-encoder" "^0.1.7" + "@ensdomains/ens" "0.4.3" + "@ensdomains/resolver" "0.2.4" + content-hash "^2.5.2" + eth-ens-namehash "^2.0.8" + ethers "^5.0.13" + js-sha3 "^0.8.0" + +"@ensdomains/resolver@0.2.4", "@ensdomains/resolver@^0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@ensdomains/resolver/-/resolver-0.2.4.tgz#c10fe28bf5efbf49bff4666d909aed0265efbc89" + integrity sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA== + +"@ethereum-waffle/chai@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/chai/-/chai-3.4.0.tgz#2477877410a96bf370edd64df905b04fb9aba9d5" + integrity sha512-GVaFKuFbFUclMkhHtQTDnWBnBQMJc/pAbfbFj/nnIK237WPLsO3KDDslA7m+MNEyTAOFrcc0CyfruAGGXAQw3g== + dependencies: + "@ethereum-waffle/provider" "^3.4.0" + ethers "^5.0.0" + +"@ethereum-waffle/compiler@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/compiler/-/compiler-3.4.0.tgz#68917321212563544913de33e408327745cb1284" + integrity sha512-a2wxGOoB9F1QFRE+Om7Cz2wn+pxM/o7a0a6cbwhaS2lECJgFzeN9xEkVrKahRkF4gEfXGcuORg4msP0Asxezlw== + dependencies: + "@resolver-engine/imports" "^0.3.3" + "@resolver-engine/imports-fs" "^0.3.3" + "@typechain/ethers-v5" "^2.0.0" + "@types/mkdirp" "^0.5.2" + "@types/node-fetch" "^2.5.5" + ethers "^5.0.1" + mkdirp "^0.5.1" + node-fetch "^2.6.1" + solc "^0.6.3" + ts-generator "^0.1.1" + typechain "^3.0.0" + +"@ethereum-waffle/ens@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/ens/-/ens-3.3.0.tgz#d54f4c8e6b7bcafdc13ab294433f45416b2b2791" + integrity sha512-zVIH/5cQnIEgJPg1aV8+ehYicpcfuAisfrtzYh1pN3UbfeqPylFBeBaIZ7xj/xYzlJjkrek/h9VfULl6EX9Aqw== + dependencies: + "@ensdomains/ens" "^0.4.4" + "@ensdomains/resolver" "^0.2.4" + ethers "^5.0.1" + +"@ethereum-waffle/mock-contract@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/mock-contract/-/mock-contract-3.3.0.tgz#7b331f1c95c5d46ee9478f7a6be2869f707d307a" + integrity sha512-apwq0d+2nQxaNwsyLkE+BNMBhZ1MKGV28BtI9WjD3QD2Ztdt1q9II4sKA4VrLTUneYSmkYbJZJxw89f+OpJGyw== + dependencies: + "@ethersproject/abi" "^5.0.1" + ethers "^5.0.1" + +"@ethereum-waffle/provider@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/provider/-/provider-3.4.0.tgz#a36a0890d4fbc230e807870c8d3b683594efef00" + integrity sha512-QgseGzpwlzmaHXhqfdzthCGu5a6P1SBF955jQHf/rBkK1Y7gGo2ukt3rXgxgfg/O5eHqRU+r8xw5MzVyVaBscQ== + dependencies: + "@ethereum-waffle/ens" "^3.3.0" + ethers "^5.0.1" + ganache-core "^2.13.2" + patch-package "^6.2.2" + postinstall-postinstall "^2.1.0" + +"@ethereumjs/block@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/block/-/block-3.4.0.tgz#4747b0c06220ee10cbdfe1cbde8cbb0677b1b074" + integrity sha512-umKAoTX32yXzErpIksPHodFc/5y8bmZMnOl6hWy5Vd8xId4+HKFUOyEiN16Y97zMwFRysRpcrR6wBejfqc6Bmg== + dependencies: + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/tx" "^3.3.0" + ethereumjs-util "^7.1.0" + merkle-patricia-tree "^4.2.0" + +"@ethereumjs/blockchain@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/blockchain/-/blockchain-5.4.0.tgz#28d712627d3442b2bb1f50dd5acba7cde1021993" + integrity sha512-wAuKLaew6PL52kH8YPXO7PbjjKV12jivRSyHQehkESw4slSLLfYA6Jv7n5YxyT2ajD7KNMPVh7oyF/MU6HcOvg== + dependencies: + "@ethereumjs/block" "^3.4.0" + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/ethash" "^1.0.0" + debug "^2.2.0" + ethereumjs-util "^7.1.0" + level-mem "^5.0.1" + lru-cache "^5.1.1" + rlp "^2.2.4" + semaphore-async-await "^1.5.1" + +"@ethereumjs/common@^2.3.0", "@ethereumjs/common@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.4.0.tgz#2d67f6e6ba22246c5c89104e6b9a119fb3039766" + integrity sha512-UdkhFWzWcJCZVsj1O/H8/oqj/0RVYjLc1OhPjBrQdALAkQHpCp8xXI4WLnuGTADqTdJZww0NtgwG+TRPkXt27w== + dependencies: + crc-32 "^1.2.0" + ethereumjs-util "^7.1.0" + +"@ethereumjs/ethash@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/ethash/-/ethash-1.0.0.tgz#4e77f85b37be1ade5393e8719bdabac3e796ddaa" + integrity sha512-iIqnGG6NMKesyOxv2YctB2guOVX18qMAWlj3QlZyrc+GqfzLqoihti+cVNQnyNxr7eYuPdqwLQOFuPe6g/uKjw== + dependencies: + "@types/levelup" "^4.3.0" + buffer-xor "^2.0.1" + ethereumjs-util "^7.0.7" + miller-rabin "^4.0.0" + +"@ethereumjs/tx@^3.2.1", "@ethereumjs/tx@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.3.0.tgz#14ed1b7fa0f28e1cd61e3ecbdab824205f6a4378" + integrity sha512-yTwEj2lVzSMgE6Hjw9Oa1DZks/nKTWM8Wn4ykDNapBPua2f4nXO3qKnni86O6lgDj5fVNRqbDsD0yy7/XNGDEA== + dependencies: + "@ethereumjs/common" "^2.4.0" + ethereumjs-util "^7.1.0" + +"@ethereumjs/vm@^5.5.2": + version "5.5.2" + resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.5.2.tgz#918a2c1000aaa9fdbe6007a4fdc2c62833122adf" + integrity sha512-AydZ4wfvZAsBuFzs3xVSA2iU0hxhL8anXco3UW3oh9maVC34kTEytOfjHf06LTEfN0MF9LDQ4ciLa7If6ZN/sg== + dependencies: + "@ethereumjs/block" "^3.4.0" + "@ethereumjs/blockchain" "^5.4.0" + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/tx" "^3.3.0" + async-eventemitter "^0.2.4" + core-js-pure "^3.0.1" + debug "^2.2.0" + ethereumjs-util "^7.1.0" + functional-red-black-tree "^1.0.1" + mcl-wasm "^0.7.1" + merkle-patricia-tree "^4.2.0" + rustbn.js "~0.2.0" + util.promisify "^1.0.1" + +"@ethersproject/abi@5.0.0-beta.153": + version "5.0.0-beta.153" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz#43a37172b33794e4562999f6e2d555b7599a8eee" + integrity sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg== + dependencies: + "@ethersproject/address" ">=5.0.0-beta.128" + "@ethersproject/bignumber" ">=5.0.0-beta.130" + "@ethersproject/bytes" ">=5.0.0-beta.129" + "@ethersproject/constants" ">=5.0.0-beta.128" + "@ethersproject/hash" ">=5.0.0-beta.128" + "@ethersproject/keccak256" ">=5.0.0-beta.127" + "@ethersproject/logger" ">=5.0.0-beta.129" + "@ethersproject/properties" ">=5.0.0-beta.131" + "@ethersproject/strings" ">=5.0.0-beta.130" + +"@ethersproject/abi@5.0.7": + version "5.0.7" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.7.tgz#79e52452bd3ca2956d0e1c964207a58ad1a0ee7b" + integrity sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw== + dependencies: + "@ethersproject/address" "^5.0.4" + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/constants" "^5.0.4" + "@ethersproject/hash" "^5.0.4" + "@ethersproject/keccak256" "^5.0.3" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/strings" "^5.0.4" + +"@ethersproject/abi@5.4.1", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.0.1", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.4.1.tgz#6ac28fafc9ef6f5a7a37e30356a2eb31fa05d39b" + integrity sha512-9mhbjUk76BiSluiiW4BaYyI58KSbDMMQpCLdsAR+RsT2GyATiNYxVv+pGWRrekmsIdY3I+hOqsYQSTkc8L/mcg== + dependencies: + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/hash" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/abstract-provider@5.4.1", "@ethersproject/abstract-provider@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.1.tgz#e404309a29f771bd4d28dbafadcaa184668c2a6e" + integrity sha512-3EedfKI3LVpjSKgAxoUaI+gB27frKsxzm+r21w9G60Ugk+3wVLQwhi1LsEJAKNV7WoZc8CIpNrATlL1QFABjtQ== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/networks" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/web" "^5.4.0" + +"@ethersproject/abstract-signer@5.4.1", "@ethersproject/abstract-signer@^5.4.0", "@ethersproject/abstract-signer@^5.4.1": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.4.1.tgz#e4e9abcf4dd4f1ba0db7dff9746a5f78f355ea81" + integrity sha512-SkkFL5HVq1k4/25dM+NWP9MILgohJCgGv5xT5AcRruGz4ILpfHeBtO/y6j+Z3UN/PAjDeb4P7E51Yh8wcGNLGA== + dependencies: + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + +"@ethersproject/address@5.4.0", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.4.0.tgz#ba2d00a0f8c4c0854933b963b9a3a9f6eb4a37a3" + integrity sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/rlp" "^5.4.0" + +"@ethersproject/base64@5.4.0", "@ethersproject/base64@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.4.0.tgz#7252bf65295954c9048c7ca5f43e5c86441b2a9a" + integrity sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ== + dependencies: + "@ethersproject/bytes" "^5.4.0" + +"@ethersproject/basex@5.4.0", "@ethersproject/basex@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.4.0.tgz#0a2da0f4e76c504a94f2b21d3161ed9438c7f8a6" + integrity sha512-J07+QCVJ7np2bcpxydFVf/CuYo9mZ7T73Pe7KQY4c1lRlrixMeblauMxHXD0MPwFmUHZIILDNViVkykFBZylbg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + +"@ethersproject/bignumber@5.4.1", "@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.4.0", "@ethersproject/bignumber@^5.4.1": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.4.1.tgz#64399d3b9ae80aa83d483e550ba57ea062c1042d" + integrity sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + bn.js "^4.11.9" + +"@ethersproject/bytes@5.4.0", "@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.4.0.tgz#56fa32ce3bf67153756dbaefda921d1d4774404e" + integrity sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA== + dependencies: + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/constants@5.4.0", "@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.4.0.tgz#ee0bdcb30bf1b532d2353c977bf2ef1ee117958a" + integrity sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + +"@ethersproject/contracts@5.4.1", "@ethersproject/contracts@^5.4.1": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.1.tgz#3eb4f35b7fe60a962a75804ada2746494df3e470" + integrity sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w== + dependencies: + "@ethersproject/abi" "^5.4.0" + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + +"@ethersproject/hash@5.4.0", "@ethersproject/hash@>=5.0.0-beta.128", "@ethersproject/hash@^5.0.4", "@ethersproject/hash@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.4.0.tgz#d18a8e927e828e22860a011f39e429d388344ae0" + integrity sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA== + dependencies: + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/hdnode@5.4.0", "@ethersproject/hdnode@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.4.0.tgz#4bc9999b9a12eb5ce80c5faa83114a57e4107cac" + integrity sha512-pKxdS0KAaeVGfZPp1KOiDLB0jba11tG6OP1u11QnYfb7pXn6IZx0xceqWRr6ygke8+Kw74IpOoSi7/DwANhy8Q== + dependencies: + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/basex" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/pbkdf2" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/sha2" "^5.4.0" + "@ethersproject/signing-key" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/wordlists" "^5.4.0" + +"@ethersproject/json-wallets@5.4.0", "@ethersproject/json-wallets@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.4.0.tgz#2583341cfe313fc9856642e8ace3080154145e95" + integrity sha512-igWcu3fx4aiczrzEHwG1xJZo9l1cFfQOWzTqwRw/xcvxTk58q4f9M7cjh51EKphMHvrJtcezJ1gf1q1AUOfEQQ== + dependencies: + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/hdnode" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/pbkdf2" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/random" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + aes-js "3.0.0" + scrypt-js "3.0.1" + +"@ethersproject/keccak256@5.4.0", "@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.0.3", "@ethersproject/keccak256@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.4.0.tgz#7143b8eea4976080241d2bd92e3b1f1bf7025318" + integrity sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A== + dependencies: + "@ethersproject/bytes" "^5.4.0" + js-sha3 "0.5.7" + +"@ethersproject/logger@5.4.1", "@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.0.5", "@ethersproject/logger@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.1.tgz#503bd33683538b923c578c07d1c2c0dd18672054" + integrity sha512-DZ+bRinnYLPw1yAC64oRl0QyVZj43QeHIhVKfD/+YwSz4wsv1pfwb5SOFjz+r710YEWzU6LrhuSjpSO+6PeE4A== + +"@ethersproject/networks@5.4.2", "@ethersproject/networks@^5.4.0": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.4.2.tgz#2247d977626e97e2c3b8ee73cd2457babde0ce35" + integrity sha512-eekOhvJyBnuibfJnhtK46b8HimBc5+4gqpvd1/H9LEl7Q7/qhsIhM81dI9Fcnjpk3jB1aTy6bj0hz3cifhNeYw== + dependencies: + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/pbkdf2@5.4.0", "@ethersproject/pbkdf2@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.4.0.tgz#ed88782a67fda1594c22d60d0ca911a9d669641c" + integrity sha512-x94aIv6tiA04g6BnazZSLoRXqyusawRyZWlUhKip2jvoLpzJuLb//KtMM6PEovE47pMbW+Qe1uw+68ameJjB7g== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/sha2" "^5.4.0" + +"@ethersproject/properties@5.4.1", "@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.0.3", "@ethersproject/properties@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.4.1.tgz#9f051f976ce790142c6261ccb7b826eaae1f2f36" + integrity sha512-cyCGlF8wWlIZyizsj2PpbJ9I7rIlUAfnHYwy/T90pdkSn/NFTa5YWZx2wTJBe9V7dD65dcrrEMisCRUJiq6n3w== + dependencies: + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/providers@5.4.5", "@ethersproject/providers@^5.4.4": + version "5.4.5" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.4.5.tgz#eb2ea2a743a8115f79604a8157233a3a2c832928" + integrity sha512-1GkrvkiAw3Fj28cwi1Sqm8ED1RtERtpdXmRfwIBGmqBSN5MoeRUHuwHPppMtbPayPgpFcvD7/Gdc9doO5fGYgw== + dependencies: + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/basex" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/hash" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/networks" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/random" "^5.4.0" + "@ethersproject/rlp" "^5.4.0" + "@ethersproject/sha2" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/web" "^5.4.0" + bech32 "1.1.4" + ws "7.4.6" + +"@ethersproject/random@5.4.0", "@ethersproject/random@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.4.0.tgz#9cdde60e160d024be39cc16f8de3b9ce39191e16" + integrity sha512-pnpWNQlf0VAZDEOVp1rsYQosmv2o0ITS/PecNw+mS2/btF8eYdspkN0vIXrCMtkX09EAh9bdk8GoXmFXM1eAKw== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/rlp@5.4.0", "@ethersproject/rlp@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.4.0.tgz#de61afda5ff979454e76d3b3310a6c32ad060931" + integrity sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/sha2@5.4.0", "@ethersproject/sha2@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.4.0.tgz#c9a8db1037014cbc4e9482bd662f86c090440371" + integrity sha512-siheo36r1WD7Cy+bDdE1BJ8y0bDtqXCOxRMzPa4bV1TGt/eTUUt03BHoJNB6reWJD8A30E/pdJ8WFkq+/uz4Gg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + hash.js "1.1.7" + +"@ethersproject/signing-key@5.4.0", "@ethersproject/signing-key@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.4.0.tgz#2f05120984e81cf89a3d5f6dec5c68ee0894fbec" + integrity sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + bn.js "^4.11.9" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/solidity@5.4.0", "@ethersproject/solidity@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.4.0.tgz#1305e058ea02dc4891df18b33232b11a14ece9ec" + integrity sha512-XFQTZ7wFSHOhHcV1DpcWj7VXECEiSrBuv7JErJvB9Uo+KfCdc3QtUZV+Vjh/AAaYgezUEKbCtE6Khjm44seevQ== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/sha2" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/strings@5.4.0", "@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.0.4", "@ethersproject/strings@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.4.0.tgz#fb12270132dd84b02906a8d895ae7e7fa3d07d9a" + integrity sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/transactions@5.4.0", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.4.0.tgz#a159d035179334bd92f340ce0f77e83e9e1522e0" + integrity sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ== + dependencies: + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/rlp" "^5.4.0" + "@ethersproject/signing-key" "^5.4.0" + +"@ethersproject/units@5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.4.0.tgz#d57477a4498b14b88b10396062c8cbbaf20c79fe" + integrity sha512-Z88krX40KCp+JqPCP5oPv5p750g+uU6gopDYRTBGcDvOASh6qhiEYCRatuM/suC4S2XW9Zz90QI35MfSrTIaFg== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/wallet@5.4.0", "@ethersproject/wallet@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.4.0.tgz#fa5b59830b42e9be56eadd45a16a2e0933ad9353" + integrity sha512-wU29majLjM6AjCjpat21mPPviG+EpK7wY1+jzKD0fg3ui5fgedf2zEu1RDgpfIMsfn8fJHJuzM4zXZ2+hSHaSQ== + dependencies: + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/hash" "^5.4.0" + "@ethersproject/hdnode" "^5.4.0" + "@ethersproject/json-wallets" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/random" "^5.4.0" + "@ethersproject/signing-key" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/wordlists" "^5.4.0" + +"@ethersproject/web@5.4.0", "@ethersproject/web@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.4.0.tgz#49fac173b96992334ed36a175538ba07a7413d1f" + integrity sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og== + dependencies: + "@ethersproject/base64" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/wordlists@5.4.0", "@ethersproject/wordlists@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.4.0.tgz#f34205ec3bbc9e2c49cadaee774cf0b07e7573d7" + integrity sha512-FemEkf6a+EBKEPxlzeVgUaVSodU7G0Na89jqKjmWMlDB0tomoU8RlEMgUvXyqtrg8N4cwpLh8nyRnm1Nay1isA== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/hash" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@firebase/analytics-types@0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@firebase/analytics-types/-/analytics-types-0.4.0.tgz#d6716f9fa36a6e340bc0ecfe68af325aa6f60508" + integrity sha512-Jj2xW+8+8XPfWGkv9HPv/uR+Qrmq37NPYT352wf7MvE9LrstpLVmFg3LqG6MCRr5miLAom5sen2gZ+iOhVDeRA== + +"@firebase/analytics@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@firebase/analytics/-/analytics-0.6.0.tgz#49f508d3f9f419f08c503f1171ef5fa1c3ba52eb" + integrity sha512-6qYEOPUVYrMhqvJ46Z5Uf1S4uULd6d7vGpMP5Qz+u8kIWuOQGcPdJKQap+Hla6Rq164or9gC2HRXuYXKlgWfpw== + dependencies: + "@firebase/analytics-types" "0.4.0" + "@firebase/component" "0.1.19" + "@firebase/installations" "0.4.17" + "@firebase/logger" "0.2.6" + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/app-types@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.6.1.tgz#dcbd23030a71c0c74fc95d4a3f75ba81653850e9" + integrity sha512-L/ZnJRAq7F++utfuoTKX4CLBG5YR7tFO3PLzG1/oXXKEezJ0kRL3CMRoueBEmTCzVb/6SIs2Qlaw++uDgi5Xyg== + +"@firebase/app@0.6.11": + version "0.6.11" + resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.6.11.tgz#f73f9e4571ba62f4029d8f9c9880a97e5a94eb1d" + integrity sha512-FH++PaoyTzfTAVuJ0gITNYEIcjT5G+D0671La27MU8Vvr6MTko+5YUZ4xS9QItyotSeRF4rMJ1KR7G8LSyySiA== + dependencies: + "@firebase/app-types" "0.6.1" + "@firebase/component" "0.1.19" + "@firebase/logger" "0.2.6" + "@firebase/util" "0.3.2" + dom-storage "2.1.0" + tslib "^1.11.1" + xmlhttprequest "1.8.0" + +"@firebase/auth-interop-types@0.1.5": + version "0.1.5" + resolved "https://registry.yarnpkg.com/@firebase/auth-interop-types/-/auth-interop-types-0.1.5.tgz#9fc9bd7c879f16b8d1bb08373a0f48c3a8b74557" + integrity sha512-88h74TMQ6wXChPA6h9Q3E1Jg6TkTHep2+k63OWg3s0ozyGVMeY+TTOti7PFPzq5RhszQPQOoCi59es4MaRvgCw== + +"@firebase/auth-types@0.10.1": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@firebase/auth-types/-/auth-types-0.10.1.tgz#7815e71c9c6f072034415524b29ca8f1d1770660" + integrity sha512-/+gBHb1O9x/YlG7inXfxff/6X3BPZt4zgBv4kql6HEmdzNQCodIRlEYnI+/da+lN+dha7PjaFH7C7ewMmfV7rw== + +"@firebase/auth@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@firebase/auth/-/auth-0.15.0.tgz#45d6def6d6d9444432c005710df442991828275f" + integrity sha512-IFuzhxS+HtOQl7+SZ/Mhaghy/zTU7CENsJFWbC16tv2wfLZbayKF5jYGdAU3VFLehgC8KjlcIWd10akc3XivfQ== + dependencies: + "@firebase/auth-types" "0.10.1" + +"@firebase/component@0.1.19": + version "0.1.19" + resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.1.19.tgz#bd2ac601652c22576b574c08c40da245933dbac7" + integrity sha512-L0S3g8eqaerg8y0zox3oOHSTwn/FE8RbcRHiurnbESvDViZtP5S5WnhuAPd7FnFxa8ElWK0z1Tr3ikzWDv1xdQ== + dependencies: + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/database-types@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-0.5.2.tgz#23bec8477f84f519727f165c687761e29958b63c" + integrity sha512-ap2WQOS3LKmGuVFKUghFft7RxXTyZTDr0Xd8y2aqmWsbJVjgozi0huL/EUMgTjGFrATAjcf2A7aNs8AKKZ2a8g== + dependencies: + "@firebase/app-types" "0.6.1" + +"@firebase/database@0.6.13": + version "0.6.13" + resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.6.13.tgz#b96fe0c53757dd6404ee085fdcb45c0f9f525c17" + integrity sha512-NommVkAPzU7CKd1gyehmi3lz0K78q0KOfiex7Nfy7MBMwknLm7oNqKovXSgQV1PCLvKXvvAplDSFhDhzIf9obA== + dependencies: + "@firebase/auth-interop-types" "0.1.5" + "@firebase/component" "0.1.19" + "@firebase/database-types" "0.5.2" + "@firebase/logger" "0.2.6" + "@firebase/util" "0.3.2" + faye-websocket "0.11.3" + tslib "^1.11.1" + +"@firebase/firestore-types@1.14.0": + version "1.14.0" + resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-1.14.0.tgz#4516249d3c181849fd3c856831944dbd5c8c55fc" + integrity sha512-WF8IBwHzZDhwyOgQnmB0pheVrLNP78A8PGxk1nxb/Nrgh1amo4/zYvFMGgSsTeaQK37xMYS/g7eS948te/dJxw== + +"@firebase/firestore@1.18.0": + version "1.18.0" + resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-1.18.0.tgz#3430e8c60d3e6be1d174b3a258838b1944c93a4d" + integrity sha512-maMq4ltkrwjDRusR2nt0qS4wldHQMp+0IDSfXIjC+SNmjnWY/t/+Skn9U3Po+dB38xpz3i7nsKbs+8utpDnPSw== + dependencies: + "@firebase/component" "0.1.19" + "@firebase/firestore-types" "1.14.0" + "@firebase/logger" "0.2.6" + "@firebase/util" "0.3.2" + "@firebase/webchannel-wrapper" "0.4.0" + "@grpc/grpc-js" "^1.0.0" + "@grpc/proto-loader" "^0.5.0" + node-fetch "2.6.1" + tslib "^1.11.1" + +"@firebase/functions-types@0.3.17": + version "0.3.17" + resolved "https://registry.yarnpkg.com/@firebase/functions-types/-/functions-types-0.3.17.tgz#348bf5528b238eeeeeae1d52e8ca547b21d33a94" + integrity sha512-DGR4i3VI55KnYk4IxrIw7+VG7Q3gA65azHnZxo98Il8IvYLr2UTBlSh72dTLlDf25NW51HqvJgYJDKvSaAeyHQ== + +"@firebase/functions@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@firebase/functions/-/functions-0.5.1.tgz#fa0568bdcdf7dfa7e5f4f66c1e06e376dc7e25b6" + integrity sha512-yyjPZXXvzFPjkGRSqFVS5Hc2Y7Y48GyyMH+M3i7hLGe69r/59w6wzgXKqTiSYmyE1pxfjxU4a1YqBDHNkQkrYQ== + dependencies: + "@firebase/component" "0.1.19" + "@firebase/functions-types" "0.3.17" + "@firebase/messaging-types" "0.5.0" + node-fetch "2.6.1" + tslib "^1.11.1" + +"@firebase/installations-types@0.3.4": + version "0.3.4" + resolved "https://registry.yarnpkg.com/@firebase/installations-types/-/installations-types-0.3.4.tgz#589a941d713f4f64bf9f4feb7f463505bab1afa2" + integrity sha512-RfePJFovmdIXb6rYwtngyxuEcWnOrzdZd9m7xAW0gRxDIjBT20n3BOhjpmgRWXo/DAxRmS7bRjWAyTHY9cqN7Q== + +"@firebase/installations@0.4.17": + version "0.4.17" + resolved "https://registry.yarnpkg.com/@firebase/installations/-/installations-0.4.17.tgz#1367b721e2c6c4880646bbc4f257e8616986a004" + integrity sha512-AE/TyzIpwkC4UayRJD419xTqZkKzxwk0FLht3Dci8WI2OEKHSwoZG9xv4hOBZebe+fDzoV2EzfatQY8c/6Avig== + dependencies: + "@firebase/component" "0.1.19" + "@firebase/installations-types" "0.3.4" + "@firebase/util" "0.3.2" + idb "3.0.2" + tslib "^1.11.1" + +"@firebase/logger@0.2.6": + version "0.2.6" + resolved "https://registry.yarnpkg.com/@firebase/logger/-/logger-0.2.6.tgz#3aa2ca4fe10327cabf7808bd3994e88db26d7989" + integrity sha512-KIxcUvW/cRGWlzK9Vd2KB864HlUnCfdTH0taHE0sXW5Xl7+W68suaeau1oKNEqmc3l45azkd4NzXTCWZRZdXrw== + +"@firebase/messaging-types@0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@firebase/messaging-types/-/messaging-types-0.5.0.tgz#c5d0ef309ced1758fda93ef3ac70a786de2e73c4" + integrity sha512-QaaBswrU6umJYb/ZYvjR5JDSslCGOH6D9P136PhabFAHLTR4TWjsaACvbBXuvwrfCXu10DtcjMxqfhdNIB1Xfg== + +"@firebase/messaging@0.7.1": + version "0.7.1" + resolved "https://registry.yarnpkg.com/@firebase/messaging/-/messaging-0.7.1.tgz#debbe7eb17c5b789231da6c166c506e19ecf1ed4" + integrity sha512-iev/ST9v0xd/8YpGYrZtDcqdD9J6ZWzSuceRn8EKy5vIgQvW/rk2eTQc8axzvDpQ36ZfphMYuhW6XuNrR3Pd2Q== + dependencies: + "@firebase/component" "0.1.19" + "@firebase/installations" "0.4.17" + "@firebase/messaging-types" "0.5.0" + "@firebase/util" "0.3.2" + idb "3.0.2" + tslib "^1.11.1" + +"@firebase/performance-types@0.0.13": + version "0.0.13" + resolved "https://registry.yarnpkg.com/@firebase/performance-types/-/performance-types-0.0.13.tgz#58ce5453f57e34b18186f74ef11550dfc558ede6" + integrity sha512-6fZfIGjQpwo9S5OzMpPyqgYAUZcFzZxHFqOyNtorDIgNXq33nlldTL/vtaUZA8iT9TT5cJlCrF/jthKU7X21EA== + +"@firebase/performance@0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@firebase/performance/-/performance-0.4.2.tgz#d5f134674b429d095ce0edfb50fcb4ab279c3cbe" + integrity sha512-irHTCVWJ/sxJo0QHg+yQifBeVu8ZJPihiTqYzBUz/0AGc51YSt49FZwqSfknvCN2+OfHaazz/ARVBn87g7Ex8g== + dependencies: + "@firebase/component" "0.1.19" + "@firebase/installations" "0.4.17" + "@firebase/logger" "0.2.6" + "@firebase/performance-types" "0.0.13" + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/polyfill@0.3.36": + version "0.3.36" + resolved "https://registry.yarnpkg.com/@firebase/polyfill/-/polyfill-0.3.36.tgz#c057cce6748170f36966b555749472b25efdb145" + integrity sha512-zMM9oSJgY6cT2jx3Ce9LYqb0eIpDE52meIzd/oe/y70F+v9u1LDqk5kUF5mf16zovGBWMNFmgzlsh6Wj0OsFtg== + dependencies: + core-js "3.6.5" + promise-polyfill "8.1.3" + whatwg-fetch "2.0.4" + +"@firebase/remote-config-types@0.1.9": + version "0.1.9" + resolved "https://registry.yarnpkg.com/@firebase/remote-config-types/-/remote-config-types-0.1.9.tgz#fe6bbe4d08f3b6e92fce30e4b7a9f4d6a96d6965" + integrity sha512-G96qnF3RYGbZsTRut7NBX0sxyczxt1uyCgXQuH/eAfUCngxjEGcZQnBdy6mvSdqdJh5mC31rWPO4v9/s7HwtzA== + +"@firebase/remote-config@0.1.28": + version "0.1.28" + resolved "https://registry.yarnpkg.com/@firebase/remote-config/-/remote-config-0.1.28.tgz#1c39916446f1ed82b4c07e556455bd232fcfd8e1" + integrity sha512-4zSdyxpt94jAnFhO8toNjG8oMKBD+xTuBIcK+Nw8BdQWeJhEamgXlupdBARUk1uf3AvYICngHH32+Si/dMVTbw== + dependencies: + "@firebase/component" "0.1.19" + "@firebase/installations" "0.4.17" + "@firebase/logger" "0.2.6" + "@firebase/remote-config-types" "0.1.9" + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/storage-types@0.3.13": + version "0.3.13" + resolved "https://registry.yarnpkg.com/@firebase/storage-types/-/storage-types-0.3.13.tgz#cd43e939a2ab5742e109eb639a313673a48b5458" + integrity sha512-pL7b8d5kMNCCL0w9hF7pr16POyKkb3imOW7w0qYrhBnbyJTdVxMWZhb0HxCFyQWC0w3EiIFFmxoz8NTFZDEFog== + +"@firebase/storage@0.3.43": + version "0.3.43" + resolved "https://registry.yarnpkg.com/@firebase/storage/-/storage-0.3.43.tgz#107fb5db2eff2561b5c4e35ee4cbff48f28c7e77" + integrity sha512-Jp54jcuyimLxPhZHFVAhNbQmgTu3Sda7vXjXrNpPEhlvvMSq4yuZBR6RrZxe/OrNVprLHh/6lTCjwjOVSo3bWA== + dependencies: + "@firebase/component" "0.1.19" + "@firebase/storage-types" "0.3.13" + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/util@0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@firebase/util/-/util-0.3.2.tgz#87de27f9cffc2324651cabf6ec133d0a9eb21b52" + integrity sha512-Dqs00++c8rwKky6KCKLLY2T1qYO4Q+X5t+lF7DInXDNF4ae1Oau35bkD+OpJ9u7l1pEv7KHowP6CUKuySCOc8g== + dependencies: + tslib "^1.11.1" + +"@firebase/webchannel-wrapper@0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.4.0.tgz#becce788818d3f47f0ac1a74c3c061ac1dcf4f6d" + integrity sha512-8cUA/mg0S+BxIZ72TdZRsXKBP5n5uRcE3k29TZhZw6oIiHBt9JA7CTb/4pE1uKtE/q5NeTY2tBDcagoZ+1zjXQ== + +"@grpc/grpc-js@^1.0.0": + version "1.3.7" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.3.7.tgz#58b687aff93b743aafde237fd2ee9a3259d7f2d8" + integrity sha512-CKQVuwuSPh40tgOkR7c0ZisxYRiN05PcKPW72mQL5y++qd7CwBRoaJZvU5xfXnCJDFBmS3qZGQ71Frx6Ofo2XA== + dependencies: + "@types/node" ">=12.12.47" + +"@grpc/proto-loader@^0.5.0": + version "0.5.6" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.5.6.tgz#1dea4b8a6412b05e2d58514d507137b63a52a98d" + integrity sha512-DT14xgw3PSzPxwS13auTEwxhMMOoz33DPUKNtmYK/QYbBSpLXJy78FGGs5yVoxVobEqPm4iW9MOIoz0A3bLTRQ== + dependencies: + lodash.camelcase "^4.3.0" + protobufjs "^6.8.6" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@nomiclabs/ethereumjs-vm@^4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@nomiclabs/ethereumjs-vm/-/ethereumjs-vm-4.2.2.tgz#2f8817113ca0fb6c44c1b870d0a809f0e026a6cc" + integrity sha512-8WmX94mMcJaZ7/m7yBbyuS6B+wuOul+eF+RY9fBpGhNaUpyMR/vFIcDojqcWQ4Yafe1tMKY5LDu2yfT4NZgV4Q== + dependencies: + async "^2.1.2" + async-eventemitter "^0.2.2" + core-js-pure "^3.0.1" + ethereumjs-account "^3.0.0" + ethereumjs-block "^2.2.2" + ethereumjs-blockchain "^4.0.3" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.2" + ethereumjs-util "^6.2.0" + fake-merkle-patricia-tree "^1.0.1" + functional-red-black-tree "^1.0.1" + merkle-patricia-tree "3.0.0" + rustbn.js "~0.2.0" + safe-buffer "^5.1.1" + util.promisify "^1.0.0" + +"@nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers": + version "0.3.0-beta.10" + resolved "https://registry.yarnpkg.com/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.3.0-beta.10.tgz#bccfcf635d380bbab3638960f6739fe4d396fc5f" + integrity sha512-TeyriUshRZ7XVHOjMsDtTozIrdwLf3Bw+oZRYNhXdG/eut5HeDhjUFPfRlG7TI1lSLvkcB5dt7OxOtPYKDOxTg== + +"@nomiclabs/hardhat-waffle@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.1.tgz#5d43654fba780720c5033dea240fe14f70ef4bd2" + integrity sha512-2YR2V5zTiztSH9n8BYWgtv3Q+EL0N5Ltm1PAr5z20uAY4SkkfylJ98CIqt18XFvxTD5x4K2wKBzddjV9ViDAZQ== + dependencies: + "@types/sinon-chai" "^3.2.3" + "@types/web3" "1.0.19" + +"@nomiclabs/hardhat-web3@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-web3/-/hardhat-web3-2.0.0.tgz#2d9850cb285a2cebe1bd718ef26a9523542e52a9" + integrity sha512-zt4xN+D+fKl3wW2YlTX3k9APR3XZgPkxJYf36AcliJn3oujnKEVRZaHu0PhgLjO+gR+F/kiYayo9fgd2L8970Q== + dependencies: + "@types/bignumber.js" "^5.0.0" + +"@openzeppelin/cli@^2.8.2": + version "2.8.2" + resolved "https://registry.yarnpkg.com/@openzeppelin/cli/-/cli-2.8.2.tgz#b569c55f8c291ac4c7a16ca1b584ee2b4063a7f2" + integrity sha512-K0m1UAywnweAwzbwwmqI+JSezDRnqDRWkKQMI2VV6T03LOXcG/L9oqO9KRORI8md+KbxBW9v5rmNV63wGQIRlA== + dependencies: + "@openzeppelin/fuzzy-solidity-import-parser" "^0.1.2" + "@openzeppelin/upgrades" "2.8.0" + "@types/fs-extra" "^7.0.0" + "@types/npm" "^2.0.29" + "@types/semver" "^5.5.0" + ajv "^6.10.0" + axios "^0.18.0" + bignumber.js "^8.0.2" + chalk "^2.4.1" + cheerio "^1.0.0-rc.2" + commander "^2.15.1" + env-paths "^2.2.0" + ethereumjs-util "^6.1.0" + find-up "^3.0.0" + firebase "^7.8.0" + fs-extra "^7.0.1" + glob "^7.1.6" + inquirer "^6.4.1" + is-url "^1.2.4" + lockfile "^1.0.4" + npm-programmatic "0.0.12" + rlp "^2.2.3" + semver "^5.5.0" + simple-git "^1.110.0" + solc-wrapper "^0.6.3" + spinnies "^0.3.0" + toposort "^2.0.2" + truffle-config "1.1.16" + ts-generator "^0.0.8" + typechain "^1.0.3" + typechain-target-truffle "^1.0.1" + typechain-target-web3-v1 "^1.0.1" + underscore "^1.9.1" + uuid "^3.3.3" + web3 "1.2.2" + web3-eth "1.2.2" + web3-eth-contract "1.2.2" + web3-utils "1.2.2" + +"@openzeppelin/contract-loader@^0.6.2": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contract-loader/-/contract-loader-0.6.3.tgz#61a7b44de327e40b7d53f39e0fb59bbf847335c3" + integrity sha512-cOFIjBjwbGgZhDZsitNgJl0Ye1rd5yu/Yx5LMgeq3u0ZYzldm4uObzHDFq4gjDdoypvyORjjJa3BlFA7eAnVIg== + dependencies: + find-up "^4.1.0" + fs-extra "^8.1.0" + +"@openzeppelin/contracts-upgradeable@^4.2.0": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.3.1.tgz#d2fdbacd010f9bc2228d58f9d3d3db4e49818ea6" + integrity sha512-vqS3gb1J5xlKc+7a931a5Qmg3HDR168E6aCfPY6lPrdFZV4TymN2+HVJNCqCo+KP2UMYDtqRsXu+KB/0L0E34g== + +"@openzeppelin/contracts@^4.2.0": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.3.1.tgz#c01f791ce6c9d3989ac1a643267501dbe336b9e3" + integrity sha512-QjgbPPlmDK2clK1hzjw2ROfY8KA5q+PfhDUUxZFEBCZP9fi6d5FuNoh/Uq0oCTMEKPmue69vhX2jcl0N/tFKGw== + +"@openzeppelin/fuzzy-solidity-import-parser@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@openzeppelin/fuzzy-solidity-import-parser/-/fuzzy-solidity-import-parser-0.1.2.tgz#3b9f524d6028ca73df60474a313e0295e5610c51" + integrity sha512-leqEwfs8GlrPDrVcVc8Hv6LJ62ZzR0RgjwQNCkpT6H5jW9RB8YdR0a3inHoricSvw+sKI1b1hOqsCtPPZNnhng== + +"@openzeppelin/hardhat-upgrades@^1.9.0": + version "1.10.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.10.0.tgz#e7751e3b9a005ccc9cef4e0de190628b181b59b6" + integrity sha512-iGe058iV7Ba/g11RxlbqBG47nbqbZn1FRdg1FCQq7xPmvjRhXmFsoI/5gGw5el0aZlLDRtpFOBZbzMZvI/S7iw== + dependencies: + "@openzeppelin/upgrades-core" "^1.9.0" + +"@openzeppelin/test-helpers@^0.5.6": + version "0.5.13" + resolved "https://registry.yarnpkg.com/@openzeppelin/test-helpers/-/test-helpers-0.5.13.tgz#d208bdbf0f7ad3cbe579d0b8434074c5f60d8e73" + integrity sha512-H9LUHM0nqZVObWyzJrXJ9FLDgtcBZZK0L+LhA0wdcvK3M4Um2LpLX4KbP/mUYcgvHK03pK7Ub4T6RYp3Vjy/mg== + dependencies: + "@openzeppelin/contract-loader" "^0.6.2" + "@truffle/contract" "^4.0.35" + ansi-colors "^3.2.3" + chai "^4.2.0" + chai-bn "^0.2.1" + ethjs-abi "^0.2.1" + lodash.flatten "^4.4.0" + semver "^5.6.0" + web3 "^1.2.5" + web3-utils "^1.2.5" + +"@openzeppelin/upgrades-core@^1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.9.0.tgz#cc5c4fd71d6510559f02e94032ddd788eb651c10" + integrity sha512-dd2VhRItfMSUOJwhXh1OUR/74LqbVhmkCSShfqf9OjFJAJbMuWdbEi2Fy2SxLvMGwdzrpbjtlB74KI5y+YT2RA== + dependencies: + bn.js "^5.1.2" + cbor "^8.0.0" + chalk "^4.1.0" + compare-versions "^3.6.0" + debug "^4.1.1" + ethereumjs-util "^7.0.3" + proper-lockfile "^4.1.1" + solidity-ast "^0.4.15" + +"@openzeppelin/upgrades@2.8.0": + version "2.8.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades/-/upgrades-2.8.0.tgz#8086ab9c99d9f8dac7205030b0f9e7e4a280c4a3" + integrity sha512-LzjTQPeljPsgHDPdZyH9cMCbIHZILgd2cpNcYEkdsC2IylBYRHShlbEDXJV9snnqg9JWfzPiKIqyj3XVliwtqQ== + dependencies: + "@types/cbor" "^2.0.0" + axios "^0.18.0" + bignumber.js "^7.2.0" + cbor "^4.1.5" + chalk "^2.4.1" + ethers "^4.0.20" + glob "^7.1.3" + lodash "^4.17.15" + semver "^5.5.1" + spinnies "^0.4.2" + truffle-flattener "^1.4.0" + web3 "1.2.2" + web3-eth "1.2.2" + web3-eth-contract "1.2.2" + web3-utils "1.2.2" + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha1-m4sMxmPWaafY9vXQiToU00jzD78= + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha1-NVy8mLr61ZePntCV85diHx0Ga3A= + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU= + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E= + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik= + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha1-bMKyDFya1q0NzP0hynZz2Nf79o0= + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q= + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= + +"@resolver-engine/core@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@resolver-engine/core/-/core-0.2.1.tgz#0d71803f6d3b8cb2e9ed481a1bf0ca5f5256d0c0" + integrity sha512-nsLQHmPJ77QuifqsIvqjaF5B9aHnDzJjp73Q1z6apY3e9nqYrx4Dtowhpsf7Jwftg/XzVDEMQC+OzUBNTS+S1A== + dependencies: + debug "^3.1.0" + request "^2.85.0" + +"@resolver-engine/core@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@resolver-engine/core/-/core-0.3.3.tgz#590f77d85d45bc7ecc4e06c654f41345db6ca967" + integrity sha512-eB8nEbKDJJBi5p5SrvrvILn4a0h42bKtbCTri3ZxCGt6UvoQyp7HnGOfki944bUjBSHKK3RvgfViHn+kqdXtnQ== + dependencies: + debug "^3.1.0" + is-url "^1.2.4" + request "^2.85.0" + +"@resolver-engine/fs@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@resolver-engine/fs/-/fs-0.2.1.tgz#f98a308d77568cc02651d03636f46536b941b241" + integrity sha512-7kJInM1Qo2LJcKyDhuYzh9ZWd+mal/fynfL9BNjWOiTcOpX+jNfqb/UmGUqros5pceBITlWGqS4lU709yHFUbg== + dependencies: + "@resolver-engine/core" "^0.2.1" + debug "^3.1.0" + +"@resolver-engine/fs@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@resolver-engine/fs/-/fs-0.3.3.tgz#fbf83fa0c4f60154a82c817d2fe3f3b0c049a973" + integrity sha512-wQ9RhPUcny02Wm0IuJwYMyAG8fXVeKdmhm8xizNByD4ryZlx6PP6kRen+t/haF43cMfmaV7T3Cx6ChOdHEhFUQ== + dependencies: + "@resolver-engine/core" "^0.3.3" + debug "^3.1.0" + +"@resolver-engine/imports-fs@^0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@resolver-engine/imports-fs/-/imports-fs-0.2.2.tgz#5a81ef3285dbf0411ab3b15205080a1ad7622d9e" + integrity sha512-gFCgMvCwyppjwq0UzIjde/WI+yDs3oatJhozG9xdjJdewwtd7LiF0T5i9lrHAUtqrQbqoFE4E+ZMRVHWpWHpKQ== + dependencies: + "@resolver-engine/fs" "^0.2.1" + "@resolver-engine/imports" "^0.2.2" + debug "^3.1.0" + +"@resolver-engine/imports-fs@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@resolver-engine/imports-fs/-/imports-fs-0.3.3.tgz#4085db4b8d3c03feb7a425fbfcf5325c0d1e6c1b" + integrity sha512-7Pjg/ZAZtxpeyCFlZR5zqYkz+Wdo84ugB5LApwriT8XFeQoLwGUj4tZFFvvCuxaNCcqZzCYbonJgmGObYBzyCA== + dependencies: + "@resolver-engine/fs" "^0.3.3" + "@resolver-engine/imports" "^0.3.3" + debug "^3.1.0" + +"@resolver-engine/imports@^0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@resolver-engine/imports/-/imports-0.2.2.tgz#d3de55a1bb5f3beb7703fdde743298f321175843" + integrity sha512-u5/HUkvo8q34AA+hnxxqqXGfby5swnH0Myw91o3Sm2TETJlNKXibFGSKBavAH+wvWdBi4Z5gS2Odu0PowgVOUg== + dependencies: + "@resolver-engine/core" "^0.2.1" + debug "^3.1.0" + hosted-git-info "^2.6.0" + +"@resolver-engine/imports@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@resolver-engine/imports/-/imports-0.3.3.tgz#badfb513bb3ff3c1ee9fd56073e3144245588bcc" + integrity sha512-anHpS4wN4sRMwsAbMXhMfOD/y4a4Oo0Cw/5+rue7hSwGWsDOQaAU1ClK1OxjUC35/peazxEl8JaSRRS+Xb8t3Q== + dependencies: + "@resolver-engine/core" "^0.3.3" + debug "^3.1.0" + hosted-git-info "^2.6.0" + path-browserify "^1.0.0" + url "^0.11.0" + +"@sentry/core@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" + integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/hub@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" + integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== + dependencies: + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/minimal@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" + integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sentry/node@^5.18.1": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" + integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== + dependencies: + "@sentry/core" "5.30.0" + "@sentry/hub" "5.30.0" + "@sentry/tracing" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + cookie "^0.4.1" + https-proxy-agent "^5.0.0" + lru_map "^0.3.3" + tslib "^1.9.3" + +"@sentry/tracing@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" + integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/types@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" + integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== + +"@sentry/utils@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" + integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== + dependencies: + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + +"@sinonjs/commons@^1.7.0": + version "1.8.3" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" + integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^7.1.0": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz#2524eae70c4910edccf99b2f4e6efc5894aff7b5" + integrity sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg== + dependencies: + "@sinonjs/commons" "^1.7.0" + +"@solidity-parser/parser@^0.11.0": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.11.1.tgz#fa840af64840c930f24a9c82c08d4a092a068add" + integrity sha512-H8BSBoKE8EubJa0ONqecA2TviT3TnHeC4NpgnAHSUiuhZoQBfPB4L2P9bs8R6AoTW10Endvh3vc+fomVMIDIYQ== + +"@solidity-parser/parser@^0.12.0": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.12.2.tgz#1afad367cb29a2ed8cdd4a3a62701c2821fb578f" + integrity sha512-d7VS7PxgMosm5NyaiyDJRNID5pK4AWj1l64Dbz0147hJgy5k2C0/ZiKK/9u5c5K+HRUVHmp+RMvGEjGh84oA5Q== + +"@solidity-parser/parser@^0.13.2": + version "0.13.2" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.13.2.tgz#b6c71d8ca0b382d90a7bbed241f9bc110af65cbe" + integrity sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw== + dependencies: + antlr4ts "^0.5.0-alpha.4" + +"@solidity-parser/parser@^0.8.0": + version "0.8.2" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.8.2.tgz#a6a5e93ac8dca6884a99a532f133beba59b87b69" + integrity sha512-8LySx3qrNXPgB5JiULfG10O3V7QTxI/TLzSw5hFQhXWSkVxZBAv4rZQ0sYgLEbc8g3L2lmnujj1hKul38Eu5NQ== + +"@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" + +"@tenderly/hardhat-tenderly@^1.0.12": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@tenderly/hardhat-tenderly/-/hardhat-tenderly-1.0.12.tgz#fa64da2bf2f6d35a1c131ac9ccaf2f7e8b189a50" + integrity sha512-zx2zVpbBxGWVp+aLgf59sZR5lxdqfq/PjqUhga6+iazukQNu/Y6pLfVnCcF1ggvLsf7gnMjwLe3YEx/GxCAykQ== + dependencies: + axios "^0.21.1" + fs-extra "^9.0.1" + js-yaml "^3.14.0" + +"@truffle/abi-utils@^0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-0.2.4.tgz#9fc8bfc95bbe29a33cca3ab9028865b078e2f051" + integrity sha512-ICr5Sger6r5uj2G5GN9Zp9OQDCaCqe2ZyAEyvavDoFB+jX0zZFUCfDnv5jllGRhgzdYJ3mec2390mjUyz9jSZA== + dependencies: + change-case "3.0.2" + faker "^5.3.1" + fast-check "^2.12.1" + +"@truffle/blockchain-utils@^0.0.31": + version "0.0.31" + resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.0.31.tgz#0503d9fb2ce3e05c167c27294927f2f88d70a24d" + integrity sha512-BFo/nyxwhoHqPrqBQA1EAmSxeNnspGLiOCMa9pAL7WYSjyNBlrHaqCMO/F2O87G+NUK/u06E70DiSP2BFP0ZZw== + +"@truffle/codec@^0.11.11": + version "0.11.11" + resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.11.11.tgz#4f159d6df96fdec99364da58c2007a3d45be3beb" + integrity sha512-KH4n16SFJlML0wnVFeNv6SxUHhGPQEJI8AIAaM5a5RCtb4+evQAwqOz3vxdoeh8aOTHLeRmZI/PnUyigfbOXxA== + dependencies: + "@truffle/abi-utils" "^0.2.4" + "@truffle/compile-common" "^0.7.17" + big.js "^5.2.2" + bn.js "^5.1.3" + cbor "^5.1.0" + debug "^4.3.1" + lodash.clonedeep "^4.5.0" + lodash.escaperegexp "^4.1.2" + lodash.partition "^4.6.0" + lodash.sum "^4.0.2" + semver "^7.3.4" + utf8 "^3.0.0" + web3-utils "1.5.2" + +"@truffle/compile-common@^0.7.17": + version "0.7.17" + resolved "https://registry.yarnpkg.com/@truffle/compile-common/-/compile-common-0.7.17.tgz#5f37ba6a6f625d2b0a8545bce43cd34a555c5abb" + integrity sha512-N+6iFJQ7C7rT3hKVYBZDK1wqRfUs69FbSHZdevnaaXrL3he0I3oDjLoNCpsZXwnWZjFLKtoAazai5VdHO4useg== + dependencies: + "@truffle/contract-sources" "^0.1.12" + "@truffle/error" "^0.0.14" + "@truffle/expect" "^0.0.18" + colors "^1.4.0" + debug "^4.3.1" + +"@truffle/contract-schema@^3.4.3": + version "3.4.3" + resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.4.3.tgz#c1bcde343f70b9438314202e103a7d77d684603c" + integrity sha512-pgaTgF4CKIpkqVYZVr2qGTxZZQOkNCWOXW9VQpKvLd4G0SNF2Y1gyhrFbBhoOUtYlbbSty+IEFFHsoAqpqlvpQ== + dependencies: + ajv "^6.10.0" + debug "^4.3.1" + +"@truffle/contract-sources@^0.1.12": + version "0.1.12" + resolved "https://registry.yarnpkg.com/@truffle/contract-sources/-/contract-sources-0.1.12.tgz#7a3dfec1bcf6f3632c0f54e522fb6f12b0bdf34b" + integrity sha512-7OH8P+N4n2LewbNiVpuleshPqj8G7n9Qkd5ot79sZ/R6xIRyXF05iBtg3/IbjIzOeQCrCE9aYUHNe2go9RuM0g== + dependencies: + debug "^4.3.1" + glob "^7.1.6" + +"@truffle/contract@^4.0.35", "@truffle/contract@^4.3.8": + version "4.3.32" + resolved "https://registry.yarnpkg.com/@truffle/contract/-/contract-4.3.32.tgz#515d8836f80de1b35ee79077a45888e7cd55fc5e" + integrity sha512-PDeYNccQvtl/Q0LYwmR+y4UhxjecwcZ1Is46ysgs0/HkxvqAMXjzwAhhHb0Af1IJvKyabI0Z6aCp7a4qVtT+Ew== + dependencies: + "@ensdomains/ensjs" "^2.0.1" + "@truffle/blockchain-utils" "^0.0.31" + "@truffle/contract-schema" "^3.4.3" + "@truffle/debug-utils" "^5.1.12" + "@truffle/error" "^0.0.14" + "@truffle/interface-adapter" "^0.5.5" + bignumber.js "^7.2.1" + ethers "^4.0.32" + web3 "1.5.2" + web3-core-helpers "1.5.2" + web3-core-promievent "1.5.2" + web3-eth-abi "1.5.2" + web3-utils "1.5.2" + +"@truffle/debug-utils@^5.1.12": + version "5.1.12" + resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-5.1.12.tgz#a3bcea3f7e4b60b172d25759289d8196c264715d" + integrity sha512-yQwt2fTGFFCDILZucJu+NQWSfsv7qPd9NpaGafOrQDvJJI+VCWWXAmN0wQOvS7bWMHYD+O1t0WtAaz9C0c5VfQ== + dependencies: + "@truffle/codec" "^0.11.11" + "@trufflesuite/chromafi" "^2.2.2" + bn.js "^5.1.3" + chalk "^2.4.2" + debug "^4.3.1" + highlightjs-solidity "^2.0.0" + +"@truffle/error@^0.0.14": + version "0.0.14" + resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.14.tgz#59683b5407bede7bddf16d80dc5592f9c5e5fa05" + integrity sha512-utJx+SZYoMqk8wldQG4gCVKhV8GwMJbWY7sLXFT/D8wWZTnE2peX7URFJh/cxkjTRCO328z1s2qewkhyVsu2HA== + +"@truffle/error@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.6.tgz#75d499845b4b3a40537889e7d04c663afcaee85d" + integrity sha512-QUM9ZWiwlXGixFGpV18g5I6vua6/r+ZV9W/5DQA5go9A3eZUNPHPaTKMIQPJLYn6+ZV5jg5H28zCHq56LHF3yA== + +"@truffle/expect@^0.0.18": + version "0.0.18" + resolved "https://registry.yarnpkg.com/@truffle/expect/-/expect-0.0.18.tgz#022353a212942437e1a57ac1191d692347367bb5" + integrity sha512-ZcYladRCgwn3bbhK3jIORVHcUOBk/MXsUxjfzcw+uD+0H1Kodsvcw1AAIaqd5tlyFhdOb7YkOcH0kUES7F8d1A== + +"@truffle/interface-adapter@^0.5.5": + version "0.5.5" + resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.5.tgz#b82911476406b99e4fa9927f77363dc42dfc585c" + integrity sha512-vEutNkWDJWRMVFsyrMD1yZAHY7ZcQhzep7UHiqf6VE4K2Jgl07gK6CG3xco6C2YYBy+7R5Wt0vCTmbVFlPRi7A== + dependencies: + bn.js "^5.1.3" + ethers "^4.0.32" + web3 "1.5.2" + +"@truffle/provider@^0.2.24": + version "0.2.38" + resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.2.38.tgz#7a55a9083cdc6b896d40ac0c547ef3acdfcb0d92" + integrity sha512-YKdTUST+G741jFtwgwSpXA0sni5ClLPfhLVUirLxKAiLXI3HnYDl1TAtf/THTPWGMmfd3ygfkXVlxceYuSNuRQ== + dependencies: + "@truffle/error" "^0.0.14" + "@truffle/interface-adapter" "^0.5.5" + web3 "1.5.2" + +"@trufflesuite/chromafi@^2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@trufflesuite/chromafi/-/chromafi-2.2.2.tgz#d3fc507aa8504faffc50fb892cedcfe98ff57f77" + integrity sha512-mItQwVBsb8qP/vaYHQ1kDt2vJLhjoEXJptT6y6fJGvFophMFhOI/NsTVUa0nJL1nyMeFiS6hSYuNVdpQZzB1gA== + dependencies: + ansi-mark "^1.0.0" + ansi-regex "^3.0.0" + array-uniq "^1.0.3" + camelcase "^4.1.0" + chalk "^2.3.2" + cheerio "^1.0.0-rc.2" + detect-indent "^5.0.0" + he "^1.1.1" + highlight.js "^10.4.1" + lodash.merge "^4.6.2" + min-indent "^1.0.0" + strip-ansi "^4.0.0" + strip-indent "^2.0.0" + super-split "^1.1.0" + +"@typechain/ethers-v5@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-2.0.0.tgz#cd3ca1590240d587ca301f4c029b67bfccd08810" + integrity sha512-0xdCkyGOzdqh4h5JSf+zoWx85IusEjDcPIwNEHP8mrWSnCae4rvrqB+/gtpdNfX7zjlFlZiMeePn2r63EI3Lrw== + dependencies: + ethers "^5.0.2" + +"@types/abstract-leveldown@*": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@types/abstract-leveldown/-/abstract-leveldown-5.0.2.tgz#ee81917fe38f770e29eec8139b6f16ee4a8b0a5f" + integrity sha512-+jA1XXF3jsz+Z7FcuiNqgK53hTa/luglT2TyTpKPqoYbxVY+mCPF22Rm+q3KPBrMHJwNXFrTViHszBOfU4vftQ== + +"@types/bignumber.js@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@types/bignumber.js/-/bignumber.js-5.0.0.tgz#d9f1a378509f3010a3255e9cc822ad0eeb4ab969" + integrity sha512-0DH7aPGCClywOFaxxjE6UwpN2kQYe9LwuDQMv+zYA97j5GkOMo8e66LYT+a8JYU7jfmUFRZLa9KycxHDsKXJCA== + dependencies: + bignumber.js "*" + +"@types/bn.js@*", "@types/bn.js@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" + integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA== + dependencies: + "@types/node" "*" + +"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.4", "@types/bn.js@^4.11.5": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/cbor@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/cbor/-/cbor-2.0.0.tgz#c627afc2ee22f23f2337fecb34628a4f97c6afbb" + integrity sha1-xievwu4i8j8jN/7LNGKKT5fGr7s= + dependencies: + "@types/node" "*" + +"@types/chai@*": + version "4.2.21" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.21.tgz#9f35a5643129df132cf3b5c1ec64046ea1af0650" + integrity sha512-yd+9qKmJxm496BOV9CMNaey8TWsikaZOwMRwPHQIjcOJM9oV+fi9ZMNw3JsVnbEEbo2gRTDnGEBv8pjyn67hNg== + +"@types/concat-stream@^1.6.0": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" + integrity sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA== + dependencies: + "@types/node" "*" + +"@types/form-data@0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" + integrity sha1-yayFsqX9GENbjIXZ7LUObWyJP/g= + dependencies: + "@types/node" "*" + +"@types/fs-extra@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-7.0.0.tgz#9c4ad9e1339e7448a76698829def1f159c1b636c" + integrity sha512-ndoMMbGyuToTy4qB6Lex/inR98nPiNHacsgMPvy+zqMLgSxbt8VtWpDArpGp69h1fEDQHn1KB+9DWD++wgbwYA== + dependencies: + "@types/node" "*" + +"@types/glob@^7.1.1": + version "7.1.4" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.4.tgz#ea59e21d2ee5c517914cb4bc8e4153b99e566672" + integrity sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA== + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + +"@types/level-errors@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/level-errors/-/level-errors-3.0.0.tgz#15c1f4915a5ef763b51651b15e90f6dc081b96a8" + integrity sha512-/lMtoq/Cf/2DVOm6zE6ORyOM+3ZVm/BvzEZVxUhf6bgh8ZHglXlBqxbxSlJeVp8FCbD3IVvk/VbsaNmDjrQvqQ== + +"@types/levelup@^4.3.0": + version "4.3.3" + resolved "https://registry.yarnpkg.com/@types/levelup/-/levelup-4.3.3.tgz#4dc2b77db079b1cf855562ad52321aa4241b8ef4" + integrity sha512-K+OTIjJcZHVlZQN1HmU64VtrC0jC3dXWQozuEIR9zVvltIk90zaGPM2AgT+fIkChpzHhFE3YnvFLCbLtzAmexA== + dependencies: + "@types/abstract-leveldown" "*" + "@types/level-errors" "*" + "@types/node" "*" + +"@types/long@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" + integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== + +"@types/lru-cache@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" + integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== + +"@types/minimatch@*": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" + integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== + +"@types/mkdirp@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" + integrity sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg== + dependencies: + "@types/node" "*" + +"@types/node-fetch@^2.5.5": + version "2.5.12" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66" + integrity sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + +"@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.7.0": + version "16.7.10" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.7.10.tgz#7aa732cc47341c12a16b7d562f519c2383b6d4fc" + integrity sha512-S63Dlv4zIPb8x6MMTgDq5WWRJQe56iBEY0O3SOFA9JrRienkOVDXSXBjjJw6HTNQYSE2JI6GMCR6LVbIMHJVvA== + +"@types/node@^10.0.3", "@types/node@^10.12.18", "@types/node@^10.3.2": + version "10.17.60" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" + integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== + +"@types/node@^12.12.6", "@types/node@^12.6.1": + version "12.20.23" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.23.tgz#d0d5885bb885ee9b1ed114a04ea586540a1b2e2a" + integrity sha512-FW0q7NI8UnjbKrJK8NGr6QXY69ATw9IFe6ItIo5yozPwA9DU/xkhiPddctUVyrmFXvyFYerYgQak/qu200UBDw== + +"@types/node@^8.0.0": + version "8.10.66" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" + integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== + +"@types/npm@^2.0.29": + version "2.0.32" + resolved "https://registry.yarnpkg.com/@types/npm/-/npm-2.0.32.tgz#036682075b9c2116b510fe24b52a5b932e3a99d5" + integrity sha512-9Lg4woNVzJCtac0lET91H65lbO+8YXfk0nmlmoPGhHXMdaVEDloH6zOPIYMy2n39z/aCXXQR0nax66EDekAyIQ== + dependencies: + "@types/node" "*" + +"@types/pbkdf2@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" + integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + dependencies: + "@types/node" "*" + +"@types/prettier@^1.13.2": + version "1.19.1" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" + integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ== + +"@types/prettier@^2.1.1": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.2.tgz#fc8c2825e4ed2142473b4a81064e6e081463d1b3" + integrity sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog== + +"@types/qs@^6.2.31", "@types/qs@^6.9.7": + version "6.9.7" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" + integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== + +"@types/resolve@^0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" + integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== + dependencies: + "@types/node" "*" + +"@types/secp256k1@^4.0.1": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" + integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== + dependencies: + "@types/node" "*" + +"@types/semver@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" + integrity sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ== + +"@types/sinon-chai@^3.2.3": + version "3.2.5" + resolved "https://registry.yarnpkg.com/@types/sinon-chai/-/sinon-chai-3.2.5.tgz#df21ae57b10757da0b26f512145c065f2ad45c48" + integrity sha512-bKQqIpew7mmIGNRlxW6Zli/QVyc3zikpGzCa797B/tRnD9OtHvZ/ts8sYXV+Ilj9u3QRaUEM8xrjgd1gwm1BpQ== + dependencies: + "@types/chai" "*" + "@types/sinon" "*" + +"@types/sinon@*": + version "10.0.2" + resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.2.tgz#f360d2f189c0fd433d14aeb97b9d705d7e4cc0e4" + integrity sha512-BHn8Bpkapj8Wdfxvh2jWIUoaYB/9/XhsL0oOvBfRagJtKlSl9NWPcFOz2lRukI9szwGxFtYZCTejJSqsGDbdmw== + dependencies: + "@sinonjs/fake-timers" "^7.1.0" + +"@types/underscore@*": + version "1.11.3" + resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.11.3.tgz#d6734f3741ce41b2630018c6b61c6745f6188c07" + integrity sha512-Fl1TX1dapfXyDqFg2ic9M+vlXRktcPJrc4PR7sRc7sdVrjavg/JHlbUXBt8qWWqhJrmSqg3RNAkAPRiOYw6Ahw== + +"@types/web3@1.0.19": + version "1.0.19" + resolved "https://registry.yarnpkg.com/@types/web3/-/web3-1.0.19.tgz#46b85d91d398ded9ab7c85a5dd57cb33ac558924" + integrity sha512-fhZ9DyvDYDwHZUp5/STa9XW2re0E8GxoioYJ4pEUZ13YHpApSagixj7IAdoYH5uAK+UalGq6Ml8LYzmgRA/q+A== + dependencies: + "@types/bn.js" "*" + "@types/underscore" "*" + +"@vue/component-compiler-utils@^3.1.0": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@vue/component-compiler-utils/-/component-compiler-utils-3.2.2.tgz#2f7ed5feed82ff7f0284acc11d525ee7eff22460" + integrity sha512-rAYMLmgMuqJFWAOb3Awjqqv5X3Q3hVr4jH/kgrFJpiU0j3a90tnNBplqbj+snzrgZhC9W128z+dtgMifOiMfJg== + dependencies: + consolidate "^0.15.1" + hash-sum "^1.0.2" + lru-cache "^4.1.2" + merge-source-map "^1.1.0" + postcss "^7.0.36" + postcss-selector-parser "^6.0.2" + source-map "~0.6.1" + vue-template-es2015-compiler "^1.9.0" + optionalDependencies: + prettier "^1.18.2" + +"@webassemblyjs/ast@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" + integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== + dependencies: + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + +"@webassemblyjs/floating-point-hex-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" + integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== + +"@webassemblyjs/helper-api-error@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" + integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== + +"@webassemblyjs/helper-buffer@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" + integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== + +"@webassemblyjs/helper-code-frame@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" + integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== + dependencies: + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/helper-fsm@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" + integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== + +"@webassemblyjs/helper-module-context@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" + integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== + dependencies: + "@webassemblyjs/ast" "1.9.0" + +"@webassemblyjs/helper-wasm-bytecode@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" + integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== + +"@webassemblyjs/helper-wasm-section@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" + integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + +"@webassemblyjs/ieee754@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" + integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" + integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" + integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== + +"@webassemblyjs/wasm-edit@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" + integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/helper-wasm-section" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-opt" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/wasm-gen@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" + integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wasm-opt@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" + integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + +"@webassemblyjs/wasm-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" + integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wast-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" + integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/floating-point-hex-parser" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-code-frame" "1.9.0" + "@webassemblyjs/helper-fsm" "1.9.0" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/wast-printer@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" + integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + "@xtuc/long" "4.2.2" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +abbrev@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + integrity sha1-kbR5JYinc4wl813W9jdSovh3YTU= + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +abstract-leveldown@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-3.0.0.tgz#5cb89f958a44f526779d740d1440e743e0c30a57" + integrity sha512-KUWx9UWGQD12zsmLNj64/pndaz4iJh/Pj7nopgkfDG6RlCcbMZvT6+9l7dchK4idog2Is8VdC/PvNbFuFmalIQ== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@^2.4.1, abstract-leveldown@~2.7.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93" + integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@^5.0.0, abstract-leveldown@~5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz#f7128e1f86ccabf7d2893077ce5d06d798e386c6" + integrity sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@^6.2.1: + version "6.3.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz#d25221d1e6612f820c35963ba4bd739928f6026a" + integrity sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +abstract-leveldown@~2.6.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8" + integrity sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@~6.2.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz#036543d87e3710f2528e47040bc3261b77a9a8eb" + integrity sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +acorn-dynamic-import@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" + integrity sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ= + dependencies: + acorn "^4.0.3" + +acorn-jsx@^5.0.0: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^4.0.3: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + integrity sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c= + +acorn@^5.0.0: + version "5.7.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" + integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== + +acorn@^6.0.7, acorn@^6.4.1: + version "6.4.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" + integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== + +address@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" + integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== + +adm-zip@^0.4.16: + version "0.4.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= + +aes-js@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" + integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +ajv-errors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" + integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== + +ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.6.1, ajv@^6.9.1: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= + +ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== + +ansi-colors@^3.2.3: + version "3.2.4" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" + integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== + +ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-mark@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/ansi-mark/-/ansi-mark-1.0.4.tgz#1cd4ba8d57f15f109d6aaf6ec9ca9786c8a4ee6c" + integrity sha1-HNS6jVfxXxCdaq9uycqXhsik7mw= + dependencies: + ansi-regex "^3.0.0" + array-uniq "^1.0.3" + chalk "^2.3.2" + strip-ansi "^4.0.0" + super-split "^1.1.0" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +antlr4@4.7.1: + version "4.7.1" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773" + integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ== + +antlr4ts@^0.5.0-alpha.4: + version "0.5.0-alpha.4" + resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" + integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== + +any-promise@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@~3.1.1, anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +aproba@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-back@^1.0.3, array-back@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" + integrity sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs= + dependencies: + typical "^2.6.0" + +array-back@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-2.0.0.tgz#6877471d51ecc9c9bfa6136fb6c7d5fe69748022" + integrity sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw== + dependencies: + typical "^2.6.1" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array-uniq@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +asap@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= + +asn1.js@^5.2.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" + integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + safer-buffer "^2.1.0" + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assert@^1.1.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" + integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== + dependencies: + object-assign "^4.1.1" + util "0.10.3" + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +ast-parents@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" + integrity sha1-UI/Q8F0MSHddnszaLhdEIyYejdM= + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + +async-eventemitter@^0.2.2, async-eventemitter@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" + integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== + dependencies: + async "^2.4.0" + +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + +async@1.x, async@^1.4.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= + +async@2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" + integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg== + dependencies: + lodash "^4.17.11" + +async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.1: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + +axios@^0.18.0: + version "0.18.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3" + integrity sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g== + dependencies: + follow-redirects "1.5.10" + is-buffer "^2.0.2" + +axios@^0.21.1: + version "0.21.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" + integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== + dependencies: + follow-redirects "^1.10.0" + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.0.14, babel-core@^6.26.0: + version "6.26.3" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" + integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.1" + debug "^2.6.9" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.8" + slash "^1.0.0" + source-map "^0.5.7" + +babel-generator@^6.26.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + integrity sha1-zORReto1b0IgvK6KAsKzRvmlZmQ= + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + integrity sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340= + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" + integrity sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8= + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + integrity sha1-8luCz33BBDPFX3BZLVdGQArCLKo= + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + integrity sha1-HssnaJydJVE+rbyZFKc/VAi+enY= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + integrity sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" + integrity sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI= + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + integrity sha1-XsWBgnrXI/7N04HxySg5BnbkVRs= + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + integrity sha1-v22/5Dk40XNpohPKiov3S2qQqxo= + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + integrity sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + integrity sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU= + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + integrity sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4= + +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= + +babel-plugin-transform-async-to-generator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + integrity sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E= + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + integrity sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + integrity sha1-u8UbSflk1wy42OC5ToICRs46YUE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" + integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8= + dependencies: + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-plugin-transform-es2015-classes@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + integrity sha1-WkxYpQyclGHlZLSyo7+ryXolhNs= + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + integrity sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM= + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + integrity sha1-mXux8auWf2gtKwh2/jWNYOdlxW0= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + integrity sha1-c+s9MQypaePvnskcU3QabxV2Qj4= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + integrity sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + integrity sha1-g0yJhTvDaxrw86TF26qU/Y6sqos= + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + integrity sha1-T1SgLWzWbPkVKAAZox0xklN3yi4= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + integrity sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ= + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.26.2" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" + integrity sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q== + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + integrity sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM= + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + integrity sha1-rJl+YoXNGO1hdq22B9YCNErThGg= + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + integrity sha1-JM72muIcuDp/hgPa0CH1cusnj40= + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + integrity sha1-V6w1GrScrxSpfNE7CfZv3wpiXys= + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + integrity sha1-JPh11nIch2YbvZmkYi5R8U3jiqA= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + integrity sha1-1taKmfia7cRTbIGlQujdnxdG+NE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + integrity sha1-AMHNsaynERLN8M9hJsLta0V8zbw= + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + integrity sha1-qEs0UPfp+PH2g51taH2oS7EjbY0= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + integrity sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + integrity sha1-04sS9C6nMj9yk4fxinxa4frrNek= + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + integrity sha1-KrDJx/MJj6SJB3cruBP+QejeOg4= + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + integrity sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8= + dependencies: + regenerator-transform "^0.10.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + integrity sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-preset-env@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a" + integrity sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg== + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^3.2.6" + invariant "^2.2.2" + semver "^5.3.0" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babelify@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5" + integrity sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU= + dependencies: + babel-core "^6.0.14" + object-assign "^4.0.0" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== + +backoff@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" + integrity sha1-9hbtqdPktmuMp/ynn2lXIsX44m8= + dependencies: + precond "0.2" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base-x@^3.0.2, base-x@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" + integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.0.2, base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +bech32@1.1.4, bech32@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + +big-integer@1.6.36: + version "1.6.36" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" + integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg== + +big.js@^3.1.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== + +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + +bignumber.js@*, bignumber.js@^9.0.0, bignumber.js@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" + integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== + +bignumber.js@^7.2.0, bignumber.js@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" + integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== + +bignumber.js@^8.0.2: + version "8.1.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-8.1.1.tgz#4b072ae5aea9c20f6730e4e5d529df1271c4d885" + integrity sha512-QD46ppGintwPGuL1KqmwhR0O+N2cZUg8JG/VzwI2e28sM9TqHjQB10lI4QAaMHVbLzwVLLAwEglpKPViWX+5NQ== + +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bip39@2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.5.0.tgz#51cbd5179460504a63ea3c000db3f787ca051235" + integrity sha512-xwIx/8JKoT2+IPJpFEfXoWdYwP7UVAoUxxLNfGCfVowaJE7yg1Y5B1BVPqlUNsBq5/nGwmFkwRJ8xDW4sX8OdA== + dependencies: + create-hash "^1.1.0" + pbkdf2 "^3.0.9" + randombytes "^2.0.1" + safe-buffer "^5.0.1" + unorm "^1.3.3" + +bip66@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" + integrity sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI= + dependencies: + safe-buffer "^5.0.1" + +bl@^1.0.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" + integrity sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww== + dependencies: + readable-stream "^2.3.5" + safe-buffer "^5.1.1" + +blakejs@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.1.tgz#bf313053978b2cd4c444a48795710be05c785702" + integrity sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg== + +bluebird@^3.1.1, bluebird@^3.4.1, bluebird@^3.5.0, bluebird@^3.5.2, bluebird@^3.5.5: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bn.js@4.11.6: + version "4.11.6" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= + +bn.js@4.11.8: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.4.0, bn.js@^4.8.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.1.3: + version "5.2.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" + integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== + +body-parser@1.19.0, body-parser@^1.16.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1, braces@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@^3.0.1, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.0.1, brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.0.6, browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" + integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== + dependencies: + bn.js "^5.0.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" + integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.3" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== + dependencies: + pako "~1.0.5" + +browserslist@^3.2.6: + version "3.2.8" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6" + integrity sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ== + dependencies: + caniuse-lite "^1.0.30000844" + electron-to-chromium "^1.3.47" + +bs-let@^0.1.16: + version "0.1.16" + resolved "https://registry.yarnpkg.com/bs-let/-/bs-let-0.1.16.tgz#63cd449ed02c75f87eceb248d45963937afdd4ed" + integrity sha512-pdbSNe/QRpqgqS72dYDlkZ7kqMHc5aJkLgipLS8BFMRx+hQqkOo0JOpxWZQeDj1T677e302xgmV+Mid5gvmnBg== + +bs-platform@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-9.0.2.tgz#a6eac70eb8924a322556dacaccbfbc9b2a0d3a37" + integrity sha512-Ye9JqJ4Oa7mcjjoOVRYI8Uc2Cf8N7jQLWDcdUplY7996d/YErSR7WitmV7XnSwr4EvdrbwjEsg1NxNjUQv3ChA== + +bs58@^4.0.0, bs58@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= + dependencies: + base-x "^3.0.2" + +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + +buffer-alloc-unsafe@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" + integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== + +buffer-alloc@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" + integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== + dependencies: + buffer-alloc-unsafe "^1.1.0" + buffer-fill "^1.0.0" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= + +buffer-fill@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" + integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-to-arraybuffer@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" + integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo= + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + +buffer-xor@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-2.0.2.tgz#34f7c64f04c777a1f8aac5e661273bb9dd320289" + integrity sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ== + dependencies: + safe-buffer "^5.1.1" + +buffer@6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +buffer@^4.3.0: + version "4.9.2" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" + integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +bufferutil@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.3.tgz#66724b756bed23cd7c28c4d306d7994f9943cc6b" + integrity sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw== + dependencies: + node-gyp-build "^4.2.0" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= + +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + +bytewise-core@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/bytewise-core/-/bytewise-core-1.2.3.tgz#3fb410c7e91558eb1ab22a82834577aa6bd61d42" + integrity sha1-P7QQx+kVWOsasiqCg0V3qmvWHUI= + dependencies: + typewise-core "^1.2" + +bytewise@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/bytewise/-/bytewise-1.1.0.tgz#1d13cbff717ae7158094aa881b35d081b387253e" + integrity sha1-HRPL/3F65xWAlKqIGzXQgbOHJT4= + dependencies: + bytewise-core "^1.2.2" + typewise "^1.0.3" + +cacache@^12.0.2: + version "12.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" + integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== + dependencies: + bluebird "^3.5.5" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.4" + graceful-fs "^4.1.15" + infer-owner "^1.0.3" + lru-cache "^5.1.1" + mississippi "^3.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.3" + ssri "^6.0.1" + unique-filename "^1.1.1" + y18n "^4.0.0" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +cacheable-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" + integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^1.0.2" + +cachedown@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cachedown/-/cachedown-1.0.0.tgz#d43f036e4510696b31246d7db31ebf0f7ac32d15" + integrity sha1-1D8DbkUQaWsxJG19sx6/D3rDLRU= + dependencies: + abstract-leveldown "^2.4.1" + lru-cache "^3.2.0" + +call-bind@^1.0.0, call-bind@^1.0.2, call-bind@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camel-case@3.0.x, camel-case@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M= + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + +camelcase@^5.0.0, camelcase@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +caniuse-lite@^1.0.30000844: + version "1.0.30001252" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz#cb16e4e3dafe948fc4a9bb3307aea054b912019a" + integrity sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw== + +caseless@^0.12.0, caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +cbor@^4.1.5: + version "4.3.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-4.3.0.tgz#0217c1cadd067d9112f44336dca07e72020bb804" + integrity sha512-CvzaxQlaJVa88sdtTWvLJ++MbdtPHtZOBBNjm7h3YKUHILMs9nQyD4AC6hvFZy7GBVB3I6bRibJcxeHydyT2IQ== + dependencies: + bignumber.js "^9.0.0" + commander "^3.0.0" + json-text-sequence "^0.1" + nofilter "^1.0.3" + +cbor@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" + integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== + dependencies: + bignumber.js "^9.0.1" + nofilter "^1.0.4" + +cbor@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-8.0.0.tgz#51657d26a99a6a1866f8c3258e948576eb17d709" + integrity sha512-nMmaLWbj7+bC6MsApKRIig8h+yjgNLhPLXaCelq5+C7mpWsHgIcseZSdvgexSY5uE1Q3m2uPvIDZwSdxdo7qig== + dependencies: + nofilter "^3.0.2" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60= + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chai-bn@^0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/chai-bn/-/chai-bn-0.2.2.tgz#4dcf30dbc79db2378a00781693bc749c972bf34f" + integrity sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg== + +chai@^4.2.0, chai@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" + integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" + get-func-name "^2.0.0" + pathval "^1.1.1" + type-detect "^4.0.5" + +chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.1.0, chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +change-case@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037" + integrity sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA== + dependencies: + camel-case "^3.0.0" + constant-case "^2.0.0" + dot-case "^2.1.0" + header-case "^1.0.0" + is-lower-case "^1.1.0" + is-upper-case "^1.1.0" + lower-case "^1.1.1" + lower-case-first "^1.0.0" + no-case "^2.3.2" + param-case "^2.1.0" + pascal-case "^2.0.0" + path-case "^2.1.0" + sentence-case "^2.1.0" + snake-case "^2.1.0" + swap-case "^1.1.0" + title-case "^2.1.0" + upper-case "^1.1.1" + upper-case-first "^1.1.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +"charenc@>= 0.0.1": + version "0.0.2" + resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" + integrity sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc= + +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= + +checkpoint-store@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" + integrity sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY= + dependencies: + functional-red-black-tree "^1.0.1" + +cheerio-select@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-1.5.0.tgz#faf3daeb31b17c5e1a9dabcee288aaf8aafa5823" + integrity sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg== + dependencies: + css-select "^4.1.3" + css-what "^5.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + domutils "^2.7.0" + +cheerio@^1.0.0-rc.2: + version "1.0.0-rc.10" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.10.tgz#2ba3dcdfcc26e7956fc1f440e61d51c643379f3e" + integrity sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw== + dependencies: + cheerio-select "^1.5.0" + dom-serializer "^1.3.2" + domhandler "^4.2.0" + htmlparser2 "^6.1.0" + parse5 "^6.0.1" + parse5-htmlparser2-tree-adapter "^6.0.1" + tslib "^2.2.0" + +chokidar@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" + +chokidar@^2.1.8: + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + optionalDependencies: + fsevents "^1.2.7" + +chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" + integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chownr@^1.1.1, chownr@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +chrome-trace-event@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +cids@^0.7.1: + version "0.7.5" + resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" + integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== + dependencies: + buffer "^5.5.0" + class-is "^1.1.0" + multibase "~0.6.0" + multicodec "^1.0.0" + multihashes "~0.4.15" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-is@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" + integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +clean-css@4.2.x: + version "4.2.3" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78" + integrity sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA== + dependencies: + source-map "~0.6.0" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + +cli-cursor@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-table3@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" + integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== + dependencies: + object-assign "^4.1.0" + string-width "^2.1.1" + optionalDependencies: + colors "^1.1.2" + +cli-width@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" + integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +clone-response@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + +clone@2.1.2, clone@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colors@^1.1.2, colors@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +command-exists@^1.2.8: + version "1.2.9" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" + integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== + +command-line-args@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.7.tgz#f8d1916ecb90e9e121eda6428e41300bfb64cc46" + integrity sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA== + dependencies: + array-back "^2.0.0" + find-replace "^1.0.3" + typical "^2.6.1" + +commander@2.17.x: + version "2.17.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" + integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== + +commander@2.18.0: + version "2.18.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" + integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ== + +commander@3.0.2, commander@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== + +commander@^2.15.1, commander@^2.20.0, commander@^2.8.1: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@~2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + +compare-versions@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" + integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-stream@^1.5.0, concat-stream@^1.5.1, concat-stream@^1.6.0, concat-stream@^1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +configstore@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/configstore/-/configstore-4.0.0.tgz#5933311e95d3687efb592c528b922d9262d227e7" + integrity sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ== + dependencies: + dot-prop "^4.1.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + unique-string "^1.0.0" + write-file-atomic "^2.0.0" + xdg-basedir "^3.0.0" + +console-browserify@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" + integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== + +consolidate@^0.15.1: + version "0.15.1" + resolved "https://registry.yarnpkg.com/consolidate/-/consolidate-0.15.1.tgz#21ab043235c71a07d45d9aad98593b0dba56bab7" + integrity sha512-DW46nrsMJgy9kqAbPt5rKaCr7uFtpo4mSUvLHIUbJEjm0vo+aY5QLwBUq3FK4tRnJr/X0Psc0C4jf/h+HtXSMw== + dependencies: + bluebird "^3.1.1" + +constant-case@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" + integrity sha1-QXV2TTidP6nI7NKRhu1gBSQ7akY= + dependencies: + snake-case "^2.1.0" + upper-case "^1.1.1" + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= + +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + +content-hash@^2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" + integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== + dependencies: + cids "^0.7.1" + multicodec "^0.5.5" + multihashes "^0.4.15" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +convert-source-map@^1.5.1: + version "1.8.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== + dependencies: + safe-buffer "~5.1.1" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + +cookie@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" + integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== + +cookiejar@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" + integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== + +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-js-pure@^3.0.1: + version "3.17.1" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.17.1.tgz#4f2faa60843409a4cb4070431dbaa8cc6e602c78" + integrity sha512-EBMGdzQg7lHk3uI5bQ9NH56K+lx9HAl8pOmLarODePLLGkpwVEC1VydJTocuFchPlRDF7ZPxgKshyaM4CuV6Uw== + +core-js@3.6.5: + version "3.6.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" + integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== + +core-js@^2.4.0, core-js@^2.5.0: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +cors@^2.8.1: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +cosmiconfig@^5.0.7: + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.13.1" + parse-json "^4.0.0" + +crc-32@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.0.tgz#cb2db6e29b88508e32d9dd0ec1693e7b41a18208" + integrity sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA== + dependencies: + exit-on-epipe "~1.0.1" + printj "~1.1.0" + +create-ecdh@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" + integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== + dependencies: + bn.js "^4.1.0" + elliptic "^6.5.3" + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-fetch@^2.1.0, cross-fetch@^2.1.1: + version "2.2.5" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.5.tgz#afaf5729f3b6c78d89c9296115c9f142541a5705" + integrity sha512-xqYAhQb4NhCJSRym03dwxpP1bYXpK3y7UN83Bo2WFi3x1Zmzn0SL/6xGoPr+gpt4WmNrgCCX3HPysvOwFOW36w== + dependencies: + node-fetch "2.6.1" + whatwg-fetch "2.0.4" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^6.0.0, cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +"crypt@>= 0.0.1": + version "0.0.2" + resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" + integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= + +crypto-addr-codec@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz#e16cea892730178fe25a38f6d15b680cab3124ae" + integrity sha512-X4hzfBzNhy4mAc3UpiXEC/L0jo5E8wAa9unsnA8nNXYzXjCcGk83hfC5avJWCSGT8V91xMnAS9AKMHmjw5+XCg== + dependencies: + base-x "^3.0.8" + big-integer "1.6.36" + blakejs "^1.1.0" + bs58 "^4.0.1" + ripemd160-min "0.0.6" + safe-buffer "^5.2.0" + sha3 "^2.1.1" + +crypto-browserify@3.12.0, crypto-browserify@^3.11.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +crypto-random-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" + integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= + +css-loader@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-2.1.1.tgz#d8254f72e412bb2238bb44dd674ffbef497333ea" + integrity sha512-OcKJU/lt232vl1P9EEDamhoO9iKY3tIjY5GU+XDLblAykTdgs6Ux9P1hTHve8nFKy5KPpOXOsVI/hIwi3841+w== + dependencies: + camelcase "^5.2.0" + icss-utils "^4.1.0" + loader-utils "^1.2.3" + normalize-path "^3.0.0" + postcss "^7.0.14" + postcss-modules-extract-imports "^2.0.0" + postcss-modules-local-by-default "^2.0.6" + postcss-modules-scope "^2.1.0" + postcss-modules-values "^2.0.0" + postcss-value-parser "^3.3.0" + schema-utils "^1.0.0" + +css-select@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.3.tgz#a70440f70317f2669118ad74ff105e65849c7067" + integrity sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA== + dependencies: + boolbase "^1.0.0" + css-what "^5.0.0" + domhandler "^4.2.0" + domutils "^2.6.0" + nth-check "^2.0.0" + +css-what@^5.0.0, css-what@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.0.1.tgz#3efa820131f4669a8ac2408f9c32e7c7de9f4cad" + integrity sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg== + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + +cyclist@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" + integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= + +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +de-indent@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" + integrity sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0= + +death@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" + integrity sha1-AaqcQB7dknUFFEcLgmY5DGbGcxg= + +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== + dependencies: + ms "2.1.2" + +debug@=3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +debug@^3.0.1, debug@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +decompress-response@^3.2.0, decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + dependencies: + mimic-response "^1.0.0" + +decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1" + integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ== + dependencies: + file-type "^5.2.0" + is-stream "^1.1.0" + tar-stream "^1.5.2" + +decompress-tarbz2@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b" + integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A== + dependencies: + decompress-tar "^4.1.0" + file-type "^6.1.0" + is-stream "^1.1.0" + seek-bzip "^1.0.5" + unbzip2-stream "^1.0.9" + +decompress-targz@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee" + integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w== + dependencies: + decompress-tar "^4.1.1" + file-type "^5.2.0" + is-stream "^1.1.0" + +decompress-unzip@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" + integrity sha1-3qrM39FK6vhVePczroIQ+bSEj2k= + dependencies: + file-type "^3.8.0" + get-stream "^2.2.0" + pify "^2.3.0" + yauzl "^2.4.2" + +decompress@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.1.tgz#007f55cc6a62c055afa37c07eb6a4ee1b773f118" + integrity sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ== + dependencies: + decompress-tar "^4.0.0" + decompress-tarbz2 "^4.0.0" + decompress-targz "^4.0.0" + decompress-unzip "^4.0.1" + graceful-fs "^4.1.10" + make-dir "^1.0.0" + pify "^2.3.0" + strip-dirs "^2.0.0" + +deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + dependencies: + type-detect "^4.0.0" + +deep-equal@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" + integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== + dependencies: + is-arguments "^1.0.4" + is-date-object "^1.0.1" + is-regex "^1.0.4" + object-is "^1.0.1" + object-keys "^1.1.1" + regexp.prototype.flags "^1.2.0" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +defer-to-connect@^1.0.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" + integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== + +deferred-leveldown@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz#3acd2e0b75d1669924bc0a4b642851131173e1eb" + integrity sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA== + dependencies: + abstract-leveldown "~2.6.0" + +deferred-leveldown@~4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz#0b0570087827bf480a23494b398f04c128c19a20" + integrity sha512-5fMC8ek8alH16QiV0lTCis610D1Zt1+LA4MS4d63JgS32lrCjTFDUFz2ao09/j2I4Bqb5jL4FZYwu7Jz0XO1ww== + dependencies: + abstract-leveldown "~5.0.0" + inherits "^2.0.3" + +deferred-leveldown@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz#27a997ad95408b61161aa69bd489b86c71b78058" + integrity sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw== + dependencies: + abstract-leveldown "~6.2.1" + inherits "^2.0.3" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +defined@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +delimit-stream@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/delimit-stream/-/delimit-stream-0.1.0.tgz#9b8319477c0e5f8aeb3ce357ae305fc25ea1cd2b" + integrity sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +des.js@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" + integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= + dependencies: + repeating "^2.0.0" + +detect-indent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= + +detect-port@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.3.0.tgz#d9c40e9accadd4df5cac6a782aefd014d573d1f1" + integrity sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ== + dependencies: + address "^1.0.1" + debug "^2.6.0" + +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +diff@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +dom-converter@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" + integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== + dependencies: + utila "~0.4" + +dom-serializer@^1.0.1, dom-serializer@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" + integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.2.0" + entities "^2.0.0" + +dom-storage@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/dom-storage/-/dom-storage-2.1.0.tgz#00fb868bc9201357ea243c7bcfd3304c1e34ea39" + integrity sha512-g6RpyWXzl0RR6OTElHKBl7nwnK87GUyZMYC7JWsB/IA73vpqK2K6LT39x4VepLxlSsWBFrPVLnsSR5Jyty0+2Q== + +dom-walk@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== + +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== + +domelementtype@^2.0.1, domelementtype@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" + integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== + +domhandler@^4.0.0, domhandler@^4.2.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.2.tgz#e825d721d19a86b8c201a35264e226c678ee755f" + integrity sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w== + dependencies: + domelementtype "^2.2.0" + +domutils@^2.5.2, domutils@^2.6.0, domutils@^2.7.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + +dot-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz#34dcf37f50a8e93c2b3bca8bb7fb9155c7da3bee" + integrity sha1-NNzzf1Co6TwrO8qLt/uRVcfaO+4= + dependencies: + no-case "^2.2.0" + +dot-prop@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4" + integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ== + dependencies: + is-obj "^1.0.0" + +dotenv@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" + integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== + +dotignore@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dotignore/-/dotignore-0.1.2.tgz#f942f2200d28c3a76fbdd6f0ee9f3257c8a2e905" + integrity sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw== + dependencies: + minimatch "^3.0.4" + +drbg.js@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" + integrity sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs= + dependencies: + browserify-aes "^1.0.6" + create-hash "^1.1.2" + create-hmac "^1.1.4" + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + +duplexify@^3.4.2, duplexify@^3.6.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +electron-to-chromium@^1.3.47: + version "1.3.827" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.827.tgz#c725e8db8c5be18b472a919e5f57904512df0fc1" + integrity sha512-ye+4uQOY/jbjRutMcE/EmOcNwUeo1qo9aKL2tPyb09cU3lmxNeyDF4RWiemmkknW+p29h7dyDqy02higTxc9/A== + +elliptic@6.3.3: + version "6.3.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.3.tgz#5482d9646d54bcb89fd7d994fc9e2e9568876e3f" + integrity sha1-VILZZG1UvLif19mU/J4ulWiHbj8= + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + inherits "^2.0.1" + +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= + +emojis-list@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== + +encode-utf8@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" + integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +encoding-down@5.0.4, encoding-down@~5.0.0: + version "5.0.4" + resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-5.0.4.tgz#1e477da8e9e9d0f7c8293d320044f8b2cd8e9614" + integrity sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw== + dependencies: + abstract-leveldown "^5.0.0" + inherits "^2.0.3" + level-codec "^9.0.0" + level-errors "^2.0.0" + xtend "^4.0.1" + +encoding-down@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-6.3.0.tgz#b1c4eb0e1728c146ecaef8e32963c549e76d082b" + integrity sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw== + dependencies: + abstract-leveldown "^6.2.1" + inherits "^2.0.3" + level-codec "^9.0.0" + level-errors "^2.0.0" + +encoding@^0.1.11: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +enhanced-resolve@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" + integrity sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24= + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + object-assign "^4.0.1" + tapable "^0.2.7" + +enhanced-resolve@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" + integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.5.0" + tapable "^1.0.0" + +enquirer@^2.3.0, enquirer@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + +env-paths@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + +errno@^0.1.3, errno@~0.1.1, errno@~0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + +error-ex@^1.2.0, error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.18.0-next.2, es-abstract@^1.18.5: + version "1.18.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.5.tgz#9b10de7d4c206a3581fd5b2124233e04db49ae19" + integrity sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.2" + internal-slot "^1.0.3" + is-callable "^1.2.3" + is-negative-zero "^2.0.1" + is-regex "^1.1.3" + is-string "^1.0.6" + object-inspect "^1.11.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@~0.10.14: + version "0.10.53" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.3" + next-tick "~1.0.0" + +es6-iterator@^2.0.3, es6-iterator@~2.0.1, es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + integrity sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA= + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + integrity sha1-0rPsXU2ADO2BjbU40ol02wpzzLE= + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + integrity sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc= + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-symbol@^3.1.1, es6-symbol@~3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +es6-weak-map@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escodegen@1.8.x: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + integrity sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg= + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + integrity sha1-4Bl16BJ4GhY6ba392AOY3GTIicM= + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.3.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint@^5.6.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" + integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.9.1" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^4.0.3" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^5.0.1" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^6.2.2" + js-yaml "^3.13.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.11" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^5.5.1" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^5.2.3" + text-table "^0.2.0" + +espree@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== + dependencies: + acorn "^6.0.7" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" + +esprima@2.7.x, esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + integrity sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE= + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.0.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + integrity sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q= + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +eth-block-tracker@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-3.0.1.tgz#95cd5e763c7293e0b1b2790a2a39ac2ac188a5e1" + integrity sha512-WUVxWLuhMmsfenfZvFO5sbl1qFY2IqUlw/FPVmjjdElpqLsZtSG+wPe9Dz7W/sB6e80HgFKknOmKk2eNlznHug== + dependencies: + eth-query "^2.1.0" + ethereumjs-tx "^1.3.3" + ethereumjs-util "^5.1.3" + ethjs-util "^0.1.3" + json-rpc-engine "^3.6.0" + pify "^2.3.0" + tape "^4.6.3" + +eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" + integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= + dependencies: + idna-uts46-hx "^2.3.1" + js-sha3 "^0.5.7" + +eth-gas-reporter@^0.2.20: + version "0.2.22" + resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.22.tgz#bbe91f5d7b22433d26f099eeb5b20118ced0e575" + integrity sha512-L1FlC792aTf3j/j+gGzSNlGrXKSxNPXQNk6TnV5NNZ2w3jnQCRyJjDl0zUo25Cq2t90IS5vGdbkwqFQK7Ce+kw== + dependencies: + "@ethersproject/abi" "^5.0.0-beta.146" + "@solidity-parser/parser" "^0.12.0" + cli-table3 "^0.5.0" + colors "^1.1.2" + ethereumjs-util "6.2.0" + ethers "^4.0.40" + fs-readdir-recursive "^1.1.0" + lodash "^4.17.14" + markdown-table "^1.1.3" + mocha "^7.1.1" + req-cwd "^2.0.0" + request "^2.88.0" + request-promise-native "^1.0.5" + sha1 "^1.1.1" + sync-request "^6.0.0" + +eth-json-rpc-infura@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/eth-json-rpc-infura/-/eth-json-rpc-infura-3.2.1.tgz#26702a821067862b72d979c016fd611502c6057f" + integrity sha512-W7zR4DZvyTn23Bxc0EWsq4XGDdD63+XPUCEhV2zQvQGavDVC4ZpFDK4k99qN7bd7/fjj37+rxmuBOBeIqCA5Mw== + dependencies: + cross-fetch "^2.1.1" + eth-json-rpc-middleware "^1.5.0" + json-rpc-engine "^3.4.0" + json-rpc-error "^2.0.0" + +eth-json-rpc-middleware@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz#5c9d4c28f745ccb01630f0300ba945f4bef9593f" + integrity sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q== + dependencies: + async "^2.5.0" + eth-query "^2.1.2" + eth-tx-summary "^3.1.2" + ethereumjs-block "^1.6.0" + ethereumjs-tx "^1.3.3" + ethereumjs-util "^5.1.2" + ethereumjs-vm "^2.1.0" + fetch-ponyfill "^4.0.0" + json-rpc-engine "^3.6.0" + json-rpc-error "^2.0.0" + json-stable-stringify "^1.0.1" + promise-to-callback "^1.0.0" + tape "^4.6.3" + +eth-lib@0.2.7: + version "0.2.7" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.7.tgz#2f93f17b1e23aec3759cd4a3fe20c1286a3fc1ca" + integrity sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco= + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +eth-lib@0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" + integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +eth-lib@^0.1.26: + version "0.1.29" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" + integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + nano-json-stream-parser "^0.1.2" + servify "^0.1.12" + ws "^3.0.0" + xhr-request-promise "^0.1.2" + +eth-query@^2.0.2, eth-query@^2.1.0, eth-query@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" + integrity sha1-1nQdkAAQa1FRDHLbktY2VFam2l4= + dependencies: + json-rpc-random-id "^1.0.0" + xtend "^4.0.1" + +eth-sig-util@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-3.0.0.tgz#75133b3d7c20a5731af0690c385e184ab942b97e" + integrity sha512-4eFkMOhpGbTxBQ3AMzVf0haUX2uTur7DpWiHzWyTURa28BVJJtOkcb9Ok5TV0YvEPG61DODPW7ZUATbJTslioQ== + dependencies: + buffer "^5.2.1" + elliptic "^6.4.0" + ethereumjs-abi "0.6.5" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.0" + tweetnacl-util "^0.15.0" + +eth-sig-util@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-1.4.2.tgz#8d958202c7edbaae839707fba6f09ff327606210" + integrity sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA= + dependencies: + ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" + ethereumjs-util "^5.1.1" + +eth-sig-util@^2.5.2: + version "2.5.4" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-2.5.4.tgz#577b01fe491b6bf59b0464be09633e20c1677bc5" + integrity sha512-aCMBwp8q/4wrW4QLsF/HYBOSA7TpLKmkVwP3pYQNkEEseW2Rr8Z5Uxc9/h6HX+OG3tuHo+2bINVSihIeBfym6A== + dependencies: + ethereumjs-abi "0.6.8" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.0" + +eth-tx-summary@^3.1.2: + version "3.2.4" + resolved "https://registry.yarnpkg.com/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz#e10eb95eb57cdfe549bf29f97f1e4f1db679035c" + integrity sha512-NtlDnaVZah146Rm8HMRUNMgIwG/ED4jiqk0TME9zFheMl1jOp6jL1m0NKGjJwehXQ6ZKCPr16MTr+qspKpEXNg== + dependencies: + async "^2.1.2" + clone "^2.0.0" + concat-stream "^1.5.1" + end-of-stream "^1.1.0" + eth-query "^2.0.2" + ethereumjs-block "^1.4.1" + ethereumjs-tx "^1.1.1" + ethereumjs-util "^5.0.1" + ethereumjs-vm "^2.6.0" + through2 "^2.0.3" + +ethashjs@~0.0.7: + version "0.0.8" + resolved "https://registry.yarnpkg.com/ethashjs/-/ethashjs-0.0.8.tgz#227442f1bdee409a548fb04136e24c874f3aa6f9" + integrity sha512-/MSbf/r2/Ld8o0l15AymjOTlPqpN8Cr4ByUEA9GtR4x0yAh3TdtDzEg29zMjXCNPI7u6E5fOQdj/Cf9Tc7oVNw== + dependencies: + async "^2.1.2" + buffer-xor "^2.0.1" + ethereumjs-util "^7.0.2" + miller-rabin "^4.0.0" + +ethereum-bloom-filters@^1.0.6: + version "1.0.10" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" + integrity sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA== + dependencies: + js-sha3 "^0.8.0" + +ethereum-common@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" + integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== + +ethereum-common@^0.0.18: + version "0.0.18" + resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" + integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8= + +ethereum-cryptography@^0.1.2, ethereum-cryptography@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" + integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + dependencies: + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^4.0.1" + blakejs "^1.1.0" + browserify-aes "^1.2.0" + bs58check "^2.1.2" + create-hash "^1.2.0" + create-hmac "^1.1.7" + hash.js "^1.1.7" + keccak "^3.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + safe-buffer "^5.1.2" + scrypt-js "^3.0.0" + secp256k1 "^4.0.1" + setimmediate "^1.0.5" + +ethereum-waffle@^3.3.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/ethereum-waffle/-/ethereum-waffle-3.4.0.tgz#990b3c6c26db9c2dd943bf26750a496f60c04720" + integrity sha512-ADBqZCkoSA5Isk486ntKJVjFEawIiC+3HxNqpJqONvh3YXBTNiRfXvJtGuAFLXPG91QaqkGqILEHANAo7j/olQ== + dependencies: + "@ethereum-waffle/chai" "^3.4.0" + "@ethereum-waffle/compiler" "^3.4.0" + "@ethereum-waffle/mock-contract" "^3.3.0" + "@ethereum-waffle/provider" "^3.4.0" + ethers "^5.0.1" + +ethereumjs-abi@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241" + integrity sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE= + dependencies: + bn.js "^4.10.0" + ethereumjs-util "^4.3.0" + +ethereumjs-abi@0.6.8, ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +"ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": + version "0.6.8" + resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0" + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-account@3.0.0, ethereumjs-account@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz#728f060c8e0c6e87f1e987f751d3da25422570a9" + integrity sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA== + dependencies: + ethereumjs-util "^6.0.0" + rlp "^2.2.1" + safe-buffer "^5.1.1" + +ethereumjs-account@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz#eeafc62de544cb07b0ee44b10f572c9c49e00a84" + integrity sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA== + dependencies: + ethereumjs-util "^5.0.0" + rlp "^2.0.0" + safe-buffer "^5.1.1" + +ethereumjs-block@2.2.2, ethereumjs-block@^2.2.2, ethereumjs-block@~2.2.0, ethereumjs-block@~2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz#c7654be7e22df489fda206139ecd63e2e9c04965" + integrity sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg== + dependencies: + async "^2.0.1" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.1" + ethereumjs-util "^5.0.0" + merkle-patricia-tree "^2.1.2" + +ethereumjs-block@^1.2.2, ethereumjs-block@^1.4.1, ethereumjs-block@^1.6.0: + version "1.7.1" + resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz#78b88e6cc56de29a6b4884ee75379b6860333c3f" + integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== + dependencies: + async "^2.0.1" + ethereum-common "0.2.0" + ethereumjs-tx "^1.2.2" + ethereumjs-util "^5.0.0" + merkle-patricia-tree "^2.1.2" + +ethereumjs-blockchain@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.4.tgz#30f2228dc35f6dcf94423692a6902604ae34960f" + integrity sha512-zCxaRMUOzzjvX78DTGiKjA+4h2/sF0OYL1QuPux0DHpyq8XiNoF5GYHtb++GUxVlMsMfZV7AVyzbtgcRdIcEPQ== + dependencies: + async "^2.6.1" + ethashjs "~0.0.7" + ethereumjs-block "~2.2.2" + ethereumjs-common "^1.5.0" + ethereumjs-util "^6.1.0" + flow-stoplight "^1.0.0" + level-mem "^3.0.1" + lru-cache "^5.1.1" + rlp "^2.2.2" + semaphore "^1.1.0" + +ethereumjs-common@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.0.tgz#d3e82fc7c47c0cef95047f431a99485abc9bb1cd" + integrity sha512-SZOjgK1356hIY7MRj3/ma5qtfr/4B5BL+G4rP/XSMYr2z1H5el4RX5GReYCKmQmYI/nSBmRnwrZ17IfHuG0viQ== + +ethereumjs-common@^1.1.0, ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz#2065dbe9214e850f2e955a80e650cb6999066979" + integrity sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA== + +ethereumjs-testrpc@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/ethereumjs-testrpc/-/ethereumjs-testrpc-6.0.3.tgz#7a0b87bf3670f92f607f98fa6a78801d9741b124" + integrity sha512-lAxxsxDKK69Wuwqym2K49VpXtBvLEsXr1sryNG4AkvL5DomMdeCBbu3D87UEevKenLHBiT8GTjARwN6Yj039gA== + dependencies: + webpack "^3.0.0" + +ethereumjs-tx@2.1.2, ethereumjs-tx@^2.1.1, ethereumjs-tx@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" + integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== + dependencies: + ethereumjs-common "^1.5.0" + ethereumjs-util "^6.0.0" + +ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.3: + version "1.3.7" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz#88323a2d875b10549b8347e09f4862b546f3d89a" + integrity sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA== + dependencies: + ethereum-common "^0.0.18" + ethereumjs-util "^5.0.0" + +ethereumjs-util@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz#23ec79b2488a7d041242f01e25f24e5ad0357960" + integrity sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + ethjs-util "0.1.6" + keccak "^2.0.0" + rlp "^2.2.3" + secp256k1 "^3.0.1" + +ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0, ethereumjs-util@^6.2.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + +ethereumjs-util@^4.3.0: + version "4.5.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.1.tgz#f4bf9b3b515a484e3cc8781d61d9d980f7c83bd0" + integrity sha512-WrckOZ7uBnei4+AKimpuF1B3Fv25OmoRgmYCpGsP7u8PFxXAmAgiJSYT2kRWnt6fVIlKaQlZvuwXp7PIrmn3/w== + dependencies: + bn.js "^4.8.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + rlp "^2.0.0" + +ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5, ethereumjs-util@^5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz#a833f0e5fca7e5b361384dc76301a721f537bf65" + integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== + dependencies: + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "^0.1.3" + rlp "^2.0.0" + safe-buffer "^5.1.1" + +ethereumjs-util@^7.0.10, ethereumjs-util@^7.0.2, ethereumjs-util@^7.0.3, ethereumjs-util@^7.0.7, ethereumjs-util@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz#e2b43a30bfcdbcb432a4eb42bd5f2393209b3fd5" + integrity sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw== + dependencies: + "@types/bn.js" "^5.1.0" + bn.js "^5.1.2" + create-hash "^1.1.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.4" + +ethereumjs-vm@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-4.2.0.tgz#e885e861424e373dbc556278f7259ff3fca5edab" + integrity sha512-X6qqZbsY33p5FTuZqCnQ4+lo957iUJMM6Mpa6bL4UW0dxM6WmDSHuI4j/zOp1E2TDKImBGCJA9QPfc08PaNubA== + dependencies: + async "^2.1.2" + async-eventemitter "^0.2.2" + core-js-pure "^3.0.1" + ethereumjs-account "^3.0.0" + ethereumjs-block "^2.2.2" + ethereumjs-blockchain "^4.0.3" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.2" + ethereumjs-util "^6.2.0" + fake-merkle-patricia-tree "^1.0.1" + functional-red-black-tree "^1.0.1" + merkle-patricia-tree "^2.3.2" + rustbn.js "~0.2.0" + safe-buffer "^5.1.1" + util.promisify "^1.0.0" + +ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz#76243ed8de031b408793ac33907fb3407fe400c6" + integrity sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw== + dependencies: + async "^2.1.2" + async-eventemitter "^0.2.2" + ethereumjs-account "^2.0.3" + ethereumjs-block "~2.2.0" + ethereumjs-common "^1.1.0" + ethereumjs-util "^6.0.0" + fake-merkle-patricia-tree "^1.0.1" + functional-red-black-tree "^1.0.1" + merkle-patricia-tree "^2.3.2" + rustbn.js "~0.2.0" + safe-buffer "^5.1.1" + +ethereumjs-wallet@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz#685e9091645cee230ad125c007658833991ed474" + integrity sha512-MDwjwB9VQVnpp/Dc1XzA6J1a3wgHQ4hSvA1uWNatdpOrtCbPVuQSKSyRnjLvS0a+KKMw2pvQ9Ybqpb3+eW8oNA== + dependencies: + aes-js "^3.1.1" + bs58check "^2.1.2" + ethereum-cryptography "^0.1.3" + ethereumjs-util "^6.0.0" + randombytes "^2.0.6" + safe-buffer "^5.1.2" + scryptsy "^1.2.1" + utf8 "^3.0.0" + uuid "^3.3.2" + +ethers@4.0.0-beta.3: + version "4.0.0-beta.3" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.0-beta.3.tgz#15bef14e57e94ecbeb7f9b39dd0a4bd435bc9066" + integrity sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog== + dependencies: + "@types/node" "^10.3.2" + aes-js "3.0.0" + bn.js "^4.4.0" + elliptic "6.3.3" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.3" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" + +ethers@^4.0.20, ethers@^4.0.32, ethers@^4.0.40, ethers@^4.0.45: + version "4.0.49" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.49.tgz#0eb0e9161a0c8b4761be547396bbe2fb121a8894" + integrity sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg== + dependencies: + aes-js "3.0.0" + bn.js "^4.11.9" + elliptic "6.5.4" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.4" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" + +ethers@^5.0.0, ethers@^5.0.1, ethers@^5.0.13, ethers@^5.0.2, ethers@^5.4.6: + version "5.4.6" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.6.tgz#fe0a023956b5502c947f58e82fbcf9a73e5e75b6" + integrity sha512-F7LXARyB/Px3AQC6/QKedWZ8eqCkgOLORqL4B/F0Mag/K+qJSFGqsR36EaOZ6fKg3ZonI+pdbhb4A8Knt/43jQ== + dependencies: + "@ethersproject/abi" "5.4.1" + "@ethersproject/abstract-provider" "5.4.1" + "@ethersproject/abstract-signer" "5.4.1" + "@ethersproject/address" "5.4.0" + "@ethersproject/base64" "5.4.0" + "@ethersproject/basex" "5.4.0" + "@ethersproject/bignumber" "5.4.1" + "@ethersproject/bytes" "5.4.0" + "@ethersproject/constants" "5.4.0" + "@ethersproject/contracts" "5.4.1" + "@ethersproject/hash" "5.4.0" + "@ethersproject/hdnode" "5.4.0" + "@ethersproject/json-wallets" "5.4.0" + "@ethersproject/keccak256" "5.4.0" + "@ethersproject/logger" "5.4.1" + "@ethersproject/networks" "5.4.2" + "@ethersproject/pbkdf2" "5.4.0" + "@ethersproject/properties" "5.4.1" + "@ethersproject/providers" "5.4.5" + "@ethersproject/random" "5.4.0" + "@ethersproject/rlp" "5.4.0" + "@ethersproject/sha2" "5.4.0" + "@ethersproject/signing-key" "5.4.0" + "@ethersproject/solidity" "5.4.0" + "@ethersproject/strings" "5.4.0" + "@ethersproject/transactions" "5.4.0" + "@ethersproject/units" "5.4.0" + "@ethersproject/wallet" "5.4.0" + "@ethersproject/web" "5.4.0" + "@ethersproject/wordlists" "5.4.0" + +ethjs-abi@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/ethjs-abi/-/ethjs-abi-0.2.1.tgz#e0a7a93a7e81163a94477bad56ede524ab6de533" + integrity sha1-4KepOn6BFjqUR3utVu3lJKtt5TM= + dependencies: + bn.js "4.11.6" + js-sha3 "0.5.5" + number-to-bn "1.7.0" + +ethjs-unit@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" + integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= + dependencies: + bn.js "4.11.6" + number-to-bn "1.7.0" + +ethjs-util@0.1.6, ethjs-util@^0.1.3: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk= + dependencies: + d "1" + es5-ext "~0.10.14" + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +eventemitter3@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== + +eventemitter3@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" + integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== + +events@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +exit-on-epipe@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" + integrity sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw== + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +express@^4.14.0: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +ext@^1.1.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.5.0.tgz#e93b97ae0cb23f8370380f6107d2d2b7887687ad" + integrity sha512-+ONcYoWj/SoQwUofMr94aGu05Ou4FepKi7N7b+O8T4jVfyIsZQV1/xeS8jpaBzF0csAk0KLXoHCxU7cKYZjo1Q== + dependencies: + type "^2.5.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fake-merkle-patricia-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" + integrity sha1-S4w6z7Ugr635hgsfFM2M40As3dM= + dependencies: + checkpoint-store "^1.1.0" + +faker@^5.3.1: + version "5.5.3" + resolved "https://registry.yarnpkg.com/faker/-/faker-5.5.3.tgz#c57974ee484431b25205c2c8dc09fda861e51e0e" + integrity sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g== + +fast-check@^2.12.1: + version "2.17.0" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.17.0.tgz#9b9637684332be386219a5f73a4799874da7461c" + integrity sha512-fNNKkxNEJP+27QMcEzF6nbpOYoSZIS0p+TyB+xh/jXqRBxRhLkiZSREly4ruyV8uJi7nwH1YWAhi7OOK5TubRw== + dependencies: + pure-rand "^5.0.0" + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + +fast-glob@^3.0.3: + version "3.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" + integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +fastq@^1.6.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.12.0.tgz#ed7b6ab5d62393fb2cc591c853652a5c318bf794" + integrity sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg== + dependencies: + reusify "^1.0.4" + +faye-websocket@0.11.3: + version "0.11.3" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== + dependencies: + websocket-driver ">=0.5.1" + +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= + dependencies: + pend "~1.2.0" + +fetch-ponyfill@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893" + integrity sha1-rjzl9zLGReq4fkroeTQUcJsjmJM= + dependencies: + node-fetch "~1.7.1" + +figgy-pudding@^3.5.1: + version "3.5.2" + resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" + integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + +file-type@^3.8.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" + integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek= + +file-type@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" + integrity sha1-LdvqfHP/42No365J3DOMBYwritY= + +file-type@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919" + integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg== + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-cache-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-replace@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0" + integrity sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A= + dependencies: + array-back "^1.0.4" + test-value "^2.1.0" + +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-yarn-workspace-root@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz#40eb8e6e7c2502ddfaa2577c176f221422f860db" + integrity sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q== + dependencies: + fs-extra "^4.0.3" + micromatch "^3.1.4" + +find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + +firebase@^7.8.0: + version "7.24.0" + resolved "https://registry.yarnpkg.com/firebase/-/firebase-7.24.0.tgz#dab53b9c0f1c9538d2d6f4f51769897b0b6d60d8" + integrity sha512-j6jIyGFFBlwWAmrlUg9HyQ/x+YpsPkc/TTkbTyeLwwAJrpAmmEHNPT6O9xtAnMV4g7d3RqLL/u9//aZlbY4rQA== + dependencies: + "@firebase/analytics" "0.6.0" + "@firebase/app" "0.6.11" + "@firebase/app-types" "0.6.1" + "@firebase/auth" "0.15.0" + "@firebase/database" "0.6.13" + "@firebase/firestore" "1.18.0" + "@firebase/functions" "0.5.1" + "@firebase/installations" "0.4.17" + "@firebase/messaging" "0.7.1" + "@firebase/performance" "0.4.2" + "@firebase/polyfill" "0.3.36" + "@firebase/remote-config" "0.1.28" + "@firebase/storage" "0.3.43" + "@firebase/util" "0.3.2" + +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flat@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" + integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== + dependencies: + is-buffer "~2.0.3" + +flatted@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" + integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== + +flow-stoplight@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/flow-stoplight/-/flow-stoplight-1.0.0.tgz#4a292c5bcff8b39fa6cc0cb1a853d86f27eeff7b" + integrity sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s= + +flush-write-stream@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" + integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== + dependencies: + inherits "^2.0.3" + readable-stream "^2.3.6" + +fmix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fmix/-/fmix-0.1.0.tgz#c7bbf124dec42c9d191cfb947d0a9778dd986c0c" + integrity sha1-x7vxJN7ELJ0ZHPuUfQqXeN2YbAw= + dependencies: + imul "^1.0.0" + +follow-redirects@1.5.10: + version "1.5.10" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" + integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== + dependencies: + debug "=3.1.0" + +follow-redirects@^1.10.0, follow-redirects@^1.12.1: + version "1.14.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.2.tgz#cecb825047c00f5e66b142f90fed4f515dec789b" + integrity sha512-yLR6WaE2lbF0x4K2qE2p9PEXKLDjUjnR/xmjS3wHAYxtlsI9MLLBJUZirAHKzUZDGLxje7w/cXR49WOUo4rbsA== + +for-each@^0.3.3, for-each@~0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@^2.2.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fp-ts@1.19.3: + version "1.19.3" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" + integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== + +fp-ts@^1.0.0: + version "1.19.5" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" + integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + +fs-extra@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs-extra@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" + integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^4.0.2, fs-extra@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^7.0.0, fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^9.0.1: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-minipass@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +fs-readdir-recursive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== + +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@^1.2.7: + version "1.2.13" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" + integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== + dependencies: + bindings "^1.5.0" + nan "^2.12.1" + +fsevents@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +ganache-cli@^6.1.0, ganache-cli@^6.12.2: + version "6.12.2" + resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.12.2.tgz#c0920f7db0d4ac062ffe2375cb004089806f627a" + integrity sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw== + dependencies: + ethereumjs-util "6.2.1" + source-map-support "0.5.12" + yargs "13.2.4" + +ganache-core@^2.13.2: + version "2.13.2" + resolved "https://registry.yarnpkg.com/ganache-core/-/ganache-core-2.13.2.tgz#27e6fc5417c10e6e76e2e646671869d7665814a3" + integrity sha512-tIF5cR+ANQz0+3pHWxHjIwHqFXcVo0Mb+kcsNhglNFALcYo49aQpnS9dqHartqPfMFjiHh/qFoD3mYK0d/qGgw== + dependencies: + abstract-leveldown "3.0.0" + async "2.6.2" + bip39 "2.5.0" + cachedown "1.0.0" + clone "2.1.2" + debug "3.2.6" + encoding-down "5.0.4" + eth-sig-util "3.0.0" + ethereumjs-abi "0.6.8" + ethereumjs-account "3.0.0" + ethereumjs-block "2.2.2" + ethereumjs-common "1.5.0" + ethereumjs-tx "2.1.2" + ethereumjs-util "6.2.1" + ethereumjs-vm "4.2.0" + heap "0.2.6" + keccak "3.0.1" + level-sublevel "6.6.4" + levelup "3.1.1" + lodash "4.17.20" + lru-cache "5.1.1" + merkle-patricia-tree "3.0.0" + patch-package "6.2.2" + seedrandom "3.0.1" + source-map-support "0.5.12" + tmp "0.1.0" + web3-provider-engine "14.2.1" + websocket "1.0.32" + optionalDependencies: + ethereumjs-wallet "0.6.5" + web3 "1.2.11" + +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + +get-port@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" + integrity sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw= + +get-stream@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" + integrity sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4= + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-stream@^4.0.0, get-stream@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +ghost-testrpc@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz#c4de9557b1d1ae7b2d20bbe474a91378ca90ce92" + integrity sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ== + dependencies: + chalk "^2.4.2" + node-emoji "^1.10.0" + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^5.0.15: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.7: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-modules@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== + dependencies: + global-prefix "^3.0.0" + +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + +global@~4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== + dependencies: + min-document "^2.19.0" + process "^0.11.10" + +globals@^11.7.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== + +globby@^10.0.1: + version "10.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" + integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + +got@9.6.0: + version "9.6.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" + url-parse-lax "^3.0.0" + +got@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" + integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== + dependencies: + decompress-response "^3.2.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + is-plain-obj "^1.1.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + p-cancelable "^0.3.0" + p-timeout "^1.1.1" + safe-buffer "^5.0.1" + timed-out "^4.0.0" + url-parse-lax "^1.0.0" + url-to-options "^1.0.1" + +graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: + version "4.2.8" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +handlebars@^4.0.1: + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + +hardhat-abi-exporter@^2.2.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/hardhat-abi-exporter/-/hardhat-abi-exporter-2.3.0.tgz#f7aeb56f2ceef1ccdb75a5b8d81dc80cbbfeefc4" + integrity sha512-9EVhogHgFWsi4Bc46tv+WirOR+auGBZrv9V5/qAHBjOqYiZPbNXoFUo/yQhOAsF8Bz4Q9p4jHpdeQXnYt7g6Yw== + +hardhat-deploy@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.9.0.tgz#83480e1834ecf41d4a63017ab1aecfc586476ba5" + integrity sha512-opAolAR0WiUkMfZU0RljqwxXyrNjefx4eHn+sARXLPUfaUJWx/kjaaUUWw9Vz6Qlvi1pQfENDfYwGaWjnDJImw== + dependencies: + "@ethersproject/abi" "^5.4.0" + "@ethersproject/abstract-signer" "^5.4.1" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.1" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/contracts" "^5.4.1" + "@ethersproject/providers" "^5.4.4" + "@ethersproject/solidity" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/wallet" "^5.4.0" + "@types/qs" "^6.9.7" + axios "^0.21.1" + chalk "^4.1.2" + chokidar "^3.5.2" + debug "^4.3.2" + enquirer "^2.3.6" + form-data "^4.0.0" + fs-extra "^10.0.0" + match-all "^1.2.6" + murmur-128 "^0.2.1" + qs "^6.9.4" + +hardhat-docgen@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/hardhat-docgen/-/hardhat-docgen-1.1.2.tgz#20c814f74376c2221631d830bb243189e068e9f3" + integrity sha512-gN1UyqA4kYDm/rSMRUACT6rsh7Nw5EsKItxxJxctfNFEin1Pb56C3uUftCuffT282829ofDxbrUcREcvL9+d+A== + dependencies: + css-loader "^2.1.0" + html-webpack-plugin "^3.2.0" + vue "^2.6.12" + vue-loader "^15.6.4" + vue-router "^3.4.9" + vue-template-compiler "^2.6.7" + webpack "^4.29.5" + +hardhat-gas-reporter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.4.tgz#59e3137e38e0dfeac2e4f90d5c74160b50ad4829" + integrity sha512-G376zKh81G3K9WtDA+SoTLWsoygikH++tD1E7llx+X7J+GbIqfwhDKKgvJjcnEesMrtR9UqQHK02lJuXY1RTxw== + dependencies: + eth-gas-reporter "^0.2.20" + sha1 "^1.1.1" + +hardhat-spdx-license-identifier@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/hardhat-spdx-license-identifier/-/hardhat-spdx-license-identifier-2.0.3.tgz#6dd89a7e036ede4f7e86fb349eb23daaaad6890f" + integrity sha512-G4u4I1md0tWaitX6Os7Nq9sYZ/CFdR+ibm7clCksGJ4yrtdHEZxgLjWpJ0WiALF9SoFKt03PwCe9lczDQ/5ADA== + +hardhat@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.6.2.tgz#940d1df0a0373a6400879e1041fe0c9b746ed84d" + integrity sha512-83kCYIrkRq+vrsjOLIv349fbMpL7Vp/ZGpWtu+KLMH3wcAAs+aMsABZJ8W5hb5uo69+06KeF0pCHQ6y8tBAcwA== + dependencies: + "@ethereumjs/block" "^3.4.0" + "@ethereumjs/blockchain" "^5.4.0" + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/tx" "^3.3.0" + "@ethereumjs/vm" "^5.5.2" + "@ethersproject/abi" "^5.1.2" + "@sentry/node" "^5.18.1" + "@solidity-parser/parser" "^0.11.0" + "@types/bn.js" "^5.1.0" + "@types/lru-cache" "^5.1.0" + abort-controller "^3.0.0" + adm-zip "^0.4.16" + ansi-escapes "^4.3.0" + chalk "^2.4.2" + chokidar "^3.4.0" + ci-info "^2.0.0" + debug "^4.1.1" + enquirer "^2.3.0" + env-paths "^2.2.0" + eth-sig-util "^2.5.2" + ethereum-cryptography "^0.1.2" + ethereumjs-abi "^0.6.8" + ethereumjs-util "^7.1.0" + find-up "^2.1.0" + fp-ts "1.19.3" + fs-extra "^7.0.1" + glob "^7.1.3" + https-proxy-agent "^5.0.0" + immutable "^4.0.0-rc.12" + io-ts "1.10.4" + lodash "^4.17.11" + merkle-patricia-tree "^4.2.0" + mnemonist "^0.38.0" + mocha "^7.1.2" + node-fetch "^2.6.0" + qs "^6.7.0" + raw-body "^2.4.1" + resolve "1.17.0" + semver "^6.3.0" + slash "^3.0.0" + solc "0.7.3" + source-map-support "^0.5.13" + stacktrace-parser "^0.1.10" + "true-case-path" "^2.2.1" + tsort "0.0.1" + uuid "^3.3.2" + ws "^7.4.6" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbol-support-x@^1.4.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" + integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== + +has-symbols@^1.0.0, has-symbols@^1.0.1, has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + +has-to-string-tag-x@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" + integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== + dependencies: + has-symbol-support-x "^1.4.1" + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.3, has@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash-sum@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-1.0.2.tgz#33b40777754c6432573c120cc3808bbd10d47f04" + integrity sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ= + +hash.js@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.0, he@1.2.x, he@^1.1.0, he@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +header-case@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz#9535973197c144b09613cd65d317ef19963bd02d" + integrity sha1-lTWXMZfBRLCWE81l0xfvGZY70C0= + dependencies: + no-case "^2.2.0" + upper-case "^1.1.3" + +heap@0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" + integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= + +highlight.js@^10.4.1: + version "10.7.3" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" + integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== + +highlightjs-solidity@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/highlightjs-solidity/-/highlightjs-solidity-2.0.0.tgz#37150fe2823b9313f1477197217f37da403f3cb3" + integrity sha512-104Nitqem7ntqVR4FyF+a+whp7C15g5moC/K7eHWyet09+wjUVCWcSm2dcaVKOIPAHGiW8X7knq+ZGwkg3aq+A== + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + +html-minifier@^3.2.3: + version "3.5.21" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.21.tgz#d0040e054730e354db008463593194015212d20c" + integrity sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA== + dependencies: + camel-case "3.0.x" + clean-css "4.2.x" + commander "2.17.x" + he "1.2.x" + param-case "2.1.x" + relateurl "0.2.x" + uglify-js "3.4.x" + +html-webpack-plugin@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b" + integrity sha1-sBq71yOsqqeze2r0SS69oD2d03s= + dependencies: + html-minifier "^3.2.3" + loader-utils "^0.2.16" + lodash "^4.17.3" + pretty-error "^2.0.2" + tapable "^1.0.0" + toposort "^1.0.0" + util.promisify "1.0.0" + +htmlparser2@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" + integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + domutils "^2.5.2" + entities "^2.0.0" + +http-basic@^8.1.1: + version "8.1.3" + resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" + integrity sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw== + dependencies: + caseless "^0.12.0" + concat-stream "^1.6.2" + http-response-object "^3.0.1" + parse-cache-control "^1.0.1" + +http-cache-semantics@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" + integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@1.7.3, http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-https@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" + integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= + +http-parser-js@>=0.5.1: + version "0.5.3" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" + integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg== + +http-response-object@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" + integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA== + dependencies: + "@types/node" "^10.0.3" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= + +https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + dependencies: + agent-base "6" + debug "4" + +iconv-lite@0.4.24, iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +icss-replace-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" + integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0= + +icss-utils@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" + integrity sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA== + dependencies: + postcss "^7.0.14" + +idb@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/idb/-/idb-3.0.2.tgz#c8e9122d5ddd40f13b60ae665e4862f8b13fa384" + integrity sha512-+FLa/0sTXqyux0o6C+i2lOR0VoS60LU/jzUo5xjfY6+7sEEgy4Gz1O7yFBXvjd7N0NyIGWIRg8DcQSLEG+VSPw== + +idna-uts46-hx@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" + integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== + dependencies: + punycode "2.1.0" + +ieee754@^1.1.13, ieee754@^1.1.4, ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +ignore@^5.1.1: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== + +immediate@^3.2.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" + integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== + +immediate@~3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" + integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= + +immutable@^4.0.0-rc.12: + version "4.0.0-rc.14" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0-rc.14.tgz#29ba96631ec10867d1348515ac4e6bdba462f071" + integrity sha512-pfkvmRKJSoW7JFx0QeYlAmT+kNYvn5j0u7bnpNq4N2RCvHSTlLT208G8jgaquNe+Q8kCPHKOSpxJkyvLDpYq0w== + +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + +import-fresh@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imul@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" + integrity sha1-nVhnFh6LPelsLDjV3HyxAvNeKsk= + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +infer-owner@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ini@^1.3.5: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +inquirer@^6.2.2, inquirer@^6.4.1: + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + +interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + +io-ts@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" + integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== + dependencies: + fp-ts "^1.0.0" + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arguments@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-buffer@^2.0.2, is-buffer@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.3: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + +is-core-module@^2.2.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.6.0.tgz#d7553b2526fe59b92ba3e40c8df757ec8a709e19" + integrity sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ== + dependencies: + has "^1.0.3" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-finite@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" + integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== + +is-fn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" + integrity sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw= + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-function@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== + +is-generator-function@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= + +is-lower-case@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" + integrity sha1-fhR75HaNxGbbO/shzGCzHmrWk5M= + dependencies: + lower-case "^1.1.0" + +is-natural-number@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" + integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= + +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + +is-number-object@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== + dependencies: + has-tostringtag "^1.0.0" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= + +is-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" + integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== + +is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-regex@^1.0.4, is-regex@^1.1.3, is-regex@~1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-retry-allowed@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + +is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-string@^1.0.5, is-string@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-typed-array@^1.1.3, is-typed-array@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.8.tgz#cbaa6585dc7db43318bc5b89523ea384a6f65e79" + integrity sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-abstract "^1.18.5" + foreach "^2.0.5" + has-tostringtag "^1.0.0" + +is-typedarray@^1.0.0, is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-upper-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" + integrity sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8= + dependencies: + upper-case "^1.1.0" + +is-url@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" + integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= + +is-wsl@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +isurl@^1.0.0-alpha5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" + integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== + dependencies: + has-to-string-tag-x "^1.2.0" + is-object "^1.0.1" + +js-sha3@0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.5.tgz#baf0c0e8c54ad5903447df96ade7a4a1bca79a4a" + integrity sha1-uvDA6MVK1ZA0R9+Wreekobynmko= + +js-sha3@0.5.7, js-sha3@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" + integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= + +js-sha3@0.8.0, js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + +js-yaml@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.14.0: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + +json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + +json-loader@^0.5.4: + version "0.5.7" + resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" + integrity sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w== + +json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-rpc-engine@^3.4.0, json-rpc-engine@^3.6.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz#9d4ff447241792e1d0a232f6ef927302bb0c62a9" + integrity sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA== + dependencies: + async "^2.0.1" + babel-preset-env "^1.7.0" + babelify "^7.3.0" + json-rpc-error "^2.0.0" + promise-to-callback "^1.0.0" + safe-event-emitter "^1.0.1" + +json-rpc-error@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/json-rpc-error/-/json-rpc-error-2.0.0.tgz#a7af9c202838b5e905c7250e547f1aff77258a02" + integrity sha1-p6+cICg4tekFxyUOVH8a/3cligI= + dependencies: + inherits "^2.0.1" + +json-rpc-random-id@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" + integrity sha1-uknZat7RRE27jaPSA3SKy7zeyMg= + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json-text-sequence@^0.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/json-text-sequence/-/json-text-sequence-0.1.1.tgz#a72f217dc4afc4629fff5feb304dc1bd51a2f3d2" + integrity sha1-py8hfcSvxGKf/1/rME3BvVGi89I= + dependencies: + delimit-stream "0.1.0" + +json5@^0.5.0, json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= + +jsonschema@^1.2.4: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.0.tgz#1afa34c4bc22190d8e42271ec17ac8b3404f87b2" + integrity sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw== + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +keccak@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff" + integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +keccak@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-2.1.0.tgz#734ea53f2edcfd0f42cdb8d5f4c358fef052752b" + integrity sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q== + dependencies: + bindings "^1.5.0" + inherits "^2.0.4" + nan "^2.14.0" + safe-buffer "^5.2.0" + +keccak@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.2.tgz#4c2c6e8c54e04f2670ee49fa734eb9da152206e0" + integrity sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + readable-stream "^3.6.0" + +keyv@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + dependencies: + json-buffer "3.0.0" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= + optionalDependencies: + graceful-fs "^4.1.9" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + dependencies: + invert-kv "^1.0.0" + +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + +level-codec@^9.0.0: + version "9.0.2" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.2.tgz#fd60df8c64786a80d44e63423096ffead63d8cbc" + integrity sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ== + dependencies: + buffer "^5.6.0" + +level-codec@~7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7" + integrity sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ== + +level-concat-iterator@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz#1d1009cf108340252cb38c51f9727311193e6263" + integrity sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw== + +level-errors@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.1.2.tgz#4399c2f3d3ab87d0625f7e3676e2d807deff404d" + integrity sha512-Sw/IJwWbPKF5Ai4Wz60B52yj0zYeqzObLh8k1Tk88jVmD51cJSKWSYpRyhVIvFzZdvsPqlH5wfhp/yxdsaQH4w== + dependencies: + errno "~0.1.1" + +level-errors@^2.0.0, level-errors@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8" + integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== + dependencies: + errno "~0.1.1" + +level-errors@~1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.0.5.tgz#83dbfb12f0b8a2516bdc9a31c4876038e227b859" + integrity sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig== + dependencies: + errno "~0.1.1" + +level-iterator-stream@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-2.0.3.tgz#ccfff7c046dcf47955ae9a86f46dfa06a31688b4" + integrity sha512-I6Heg70nfF+e5Y3/qfthJFexhRw/Gi3bIymCoXAlijZdAcLaPuWSJs3KXyTYf23ID6g0o2QF62Yh+grOXY3Rig== + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.5" + xtend "^4.0.0" + +level-iterator-stream@~1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz#e43b78b1a8143e6fa97a4f485eb8ea530352f2ed" + integrity sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0= + dependencies: + inherits "^2.0.1" + level-errors "^1.0.3" + readable-stream "^1.0.33" + xtend "^4.0.0" + +level-iterator-stream@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz#2c98a4f8820d87cdacab3132506815419077c730" + integrity sha512-nEIQvxEED9yRThxvOrq8Aqziy4EGzrxSZK+QzEFAVuJvQ8glfyZ96GB6BoI4sBbLfjMXm2w4vu3Tkcm9obcY0g== + dependencies: + inherits "^2.0.1" + readable-stream "^2.3.6" + xtend "^4.0.0" + +level-iterator-stream@~4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz#7ceba69b713b0d7e22fcc0d1f128ccdc8a24f79c" + integrity sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q== + dependencies: + inherits "^2.0.4" + readable-stream "^3.4.0" + xtend "^4.0.2" + +level-mem@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/level-mem/-/level-mem-3.0.1.tgz#7ce8cf256eac40f716eb6489654726247f5a89e5" + integrity sha512-LbtfK9+3Ug1UmvvhR2DqLqXiPW1OJ5jEh0a3m9ZgAipiwpSxGj/qaVVy54RG5vAQN1nCuXqjvprCuKSCxcJHBg== + dependencies: + level-packager "~4.0.0" + memdown "~3.0.0" + +level-mem@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/level-mem/-/level-mem-5.0.1.tgz#c345126b74f5b8aa376dc77d36813a177ef8251d" + integrity sha512-qd+qUJHXsGSFoHTziptAKXoLX87QjR7v2KMbqncDXPxQuCdsQlzmyX+gwrEHhlzn08vkf8TyipYyMmiC6Gobzg== + dependencies: + level-packager "^5.0.3" + memdown "^5.0.0" + +level-packager@^5.0.3: + version "5.1.1" + resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-5.1.1.tgz#323ec842d6babe7336f70299c14df2e329c18939" + integrity sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ== + dependencies: + encoding-down "^6.3.0" + levelup "^4.3.2" + +level-packager@~4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-4.0.1.tgz#7e7d3016af005be0869bc5fa8de93d2a7f56ffe6" + integrity sha512-svCRKfYLn9/4CoFfi+d8krOtrp6RoX8+xm0Na5cgXMqSyRru0AnDYdLl+YI8u1FyS6gGZ94ILLZDE5dh2but3Q== + dependencies: + encoding-down "~5.0.0" + levelup "^3.0.0" + +level-post@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/level-post/-/level-post-1.0.7.tgz#19ccca9441a7cc527879a0635000f06d5e8f27d0" + integrity sha512-PWYqG4Q00asOrLhX7BejSajByB4EmG2GaKHfj3h5UmmZ2duciXLPGYWIjBzLECFWUGOZWlm5B20h/n3Gs3HKew== + dependencies: + ltgt "^2.1.2" + +level-sublevel@6.6.4: + version "6.6.4" + resolved "https://registry.yarnpkg.com/level-sublevel/-/level-sublevel-6.6.4.tgz#f7844ae893919cd9d69ae19d7159499afd5352ba" + integrity sha512-pcCrTUOiO48+Kp6F1+UAzF/OtWqLcQVTVF39HLdZ3RO8XBoXt+XVPKZO1vVr1aUoxHZA9OtD2e1v7G+3S5KFDA== + dependencies: + bytewise "~1.1.0" + level-codec "^9.0.0" + level-errors "^2.0.0" + level-iterator-stream "^2.0.3" + ltgt "~2.1.1" + pull-defer "^0.2.2" + pull-level "^2.0.3" + pull-stream "^3.6.8" + typewiselite "~1.0.0" + xtend "~4.0.0" + +level-supports@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-1.0.1.tgz#2f530a596834c7301622521988e2c36bb77d122d" + integrity sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg== + dependencies: + xtend "^4.0.2" + +level-ws@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" + integrity sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos= + dependencies: + readable-stream "~1.0.15" + xtend "~2.1.1" + +level-ws@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-1.0.0.tgz#19a22d2d4ac57b18cc7c6ecc4bd23d899d8f603b" + integrity sha512-RXEfCmkd6WWFlArh3X8ONvQPm8jNpfA0s/36M4QzLqrLEIt1iJE9WBHLZ5vZJK6haMjJPJGJCQWfjMNnRcq/9Q== + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.8" + xtend "^4.0.1" + +level-ws@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-2.0.0.tgz#207a07bcd0164a0ec5d62c304b4615c54436d339" + integrity sha512-1iv7VXx0G9ec1isqQZ7y5LmoZo/ewAsyDHNA8EFDW5hqH2Kqovm33nSFkSdnLLAK+I5FlT+lo5Cw9itGe+CpQA== + dependencies: + inherits "^2.0.3" + readable-stream "^3.1.0" + xtend "^4.0.1" + +levelup@3.1.1, levelup@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-3.1.1.tgz#c2c0b3be2b4dc316647c53b42e2f559e232d2189" + integrity sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg== + dependencies: + deferred-leveldown "~4.0.0" + level-errors "~2.0.0" + level-iterator-stream "~3.0.0" + xtend "~4.0.0" + +levelup@^1.2.1: + version "1.3.9" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-1.3.9.tgz#2dbcae845b2bb2b6bea84df334c475533bbd82ab" + integrity sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ== + dependencies: + deferred-leveldown "~1.2.1" + level-codec "~7.0.0" + level-errors "~1.0.3" + level-iterator-stream "~1.3.0" + prr "~1.0.1" + semver "~5.4.1" + xtend "~4.0.0" + +levelup@^4.3.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.4.0.tgz#f89da3a228c38deb49c48f88a70fb71f01cafed6" + integrity sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ== + dependencies: + deferred-leveldown "~5.3.0" + level-errors "~2.0.0" + level-iterator-stream "~4.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +loader-runner@^2.3.0, loader-runner@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" + integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== + +loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + integrity sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g= + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" + integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^1.0.1" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lockfile@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" + integrity sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA== + dependencies: + signal-exit "^3.0.2" + +lodash.assign@^4.0.3, lodash.assign@^4.0.6: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= + +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= + +lodash.escaperegexp@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347" + integrity sha1-ZHYsSGGAglGKw99Mz11YhtriA0c= + +lodash.flatten@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + +lodash.isequalwith@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.isequalwith/-/lodash.isequalwith-4.4.0.tgz#266726ddd528f854f21f4ea98a065606e0fbc6b0" + integrity sha1-Jmcm3dUo+FTyH06pigZWBuD7xrA= + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.partition@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.partition/-/lodash.partition-4.6.0.tgz#a38e46b73469e0420b0da1212e66d414be364ba4" + integrity sha1-o45GtzRp4EILDaEhLmbUFL42S6Q= + +lodash.sum@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/lodash.sum/-/lodash.sum-4.0.2.tgz#ad90e397965d803d4f1ff7aa5b2d0197f3b4637b" + integrity sha1-rZDjl5ZdgD1PH/eqWy0Bl/O0Y3s= + +lodash@4.17.20: + version "4.17.20" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" + integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== + +lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.17.4: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +long@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= + +looper@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/looper/-/looper-2.0.0.tgz#66cd0c774af3d4fedac53794f742db56da8f09ec" + integrity sha1-Zs0Md0rz1P7axTeU90LbVtqPCew= + +looper@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/looper/-/looper-3.0.0.tgz#2efa54c3b1cbaba9b94aee2e5914b0be57fbb749" + integrity sha1-LvpUw7HLq6m5Su4uWRSwvlf7t0k= + +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lower-case-first@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz#e5da7c26f29a7073be02d52bac9980e5922adfa1" + integrity sha1-5dp8JvKacHO+AtUrrJmA5ZIq36E= + dependencies: + lower-case "^1.1.2" + +lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= + +lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + +lru-cache@5.1.1, lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee" + integrity sha1-cXibO39Tmb7IVl3aOKow0qCX7+4= + dependencies: + pseudomap "^1.0.1" + +lru-cache@^4.0.1, lru-cache@^4.1.2: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= + +ltgt@^2.1.2, ltgt@~2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + +ltgt@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.1.3.tgz#10851a06d9964b971178441c23c9e52698eece34" + integrity sha1-EIUaBtmWS5cReEQcI8nlJpjuzjQ= + +make-dir@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== + dependencies: + pify "^3.0.0" + +make-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +markdown-table@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" + integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== + +match-all@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" + integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== + +mcl-wasm@^0.7.1: + version "0.7.8" + resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.8.tgz#4d0dc5a92f7bd20892fd3fcd41764acf86fd1e6e" + integrity sha512-qNHlYO6wuEtSoH5A8TcZfCEHtw8gGPqF6hLZpQn2SVd/Mck0ELIKOkmj072D98S9B9CI/jZybTUC96q1P2/ZDw== + dependencies: + typescript "^4.3.4" + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= + dependencies: + mimic-fn "^1.0.0" + +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + +memdown@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" + integrity sha1-tOThkhdGZP+65BNhqlAPMRnv4hU= + dependencies: + abstract-leveldown "~2.7.1" + functional-red-black-tree "^1.0.1" + immediate "^3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.1.1" + +memdown@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-5.1.0.tgz#608e91a9f10f37f5b5fe767667a8674129a833cb" + integrity sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw== + dependencies: + abstract-leveldown "~6.2.1" + functional-red-black-tree "~1.0.1" + immediate "~3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.2.0" + +memdown@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-3.0.0.tgz#93aca055d743b20efc37492e9e399784f2958309" + integrity sha512-tbV02LfZMWLcHcq4tw++NuqMO+FZX8tNJEiD2aNRm48ZZusVg5N8NART+dmBkepJVye986oixErf7jfXboMGMA== + dependencies: + abstract-leveldown "~5.0.0" + functional-red-black-tree "~1.0.1" + immediate "~3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.1.1" + +memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +memory-fs@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" + integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +merge-source-map@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" + integrity sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw== + dependencies: + source-map "^0.6.1" + +merge2@^1.2.3, merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +merkle-patricia-tree@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-3.0.0.tgz#448d85415565df72febc33ca362b8b614f5a58f8" + integrity sha512-soRaMuNf/ILmw3KWbybaCjhx86EYeBbD8ph0edQCTed0JN/rxDt1EBN52Ajre3VyGo+91f8+/rfPIRQnnGMqmQ== + dependencies: + async "^2.6.1" + ethereumjs-util "^5.2.0" + level-mem "^3.0.1" + level-ws "^1.0.0" + readable-stream "^3.0.6" + rlp "^2.0.0" + semaphore ">=1.0.1" + +merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz#982ca1b5a0fde00eed2f6aeed1f9152860b8208a" + integrity sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g== + dependencies: + async "^1.4.2" + ethereumjs-util "^5.0.0" + level-ws "0.0.0" + levelup "^1.2.1" + memdown "^1.0.0" + readable-stream "^2.0.0" + rlp "^2.0.0" + semaphore ">=1.0.1" + +merkle-patricia-tree@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-4.2.1.tgz#fc43e7b162e597a0720ccdd702bf1d49765691d2" + integrity sha512-25reMgrT8PhJy0Ba0U7fMZD2oobS1FPWB9vQa0uBpJYIQYYuFXEHoqEkTqA/UzX+s9br3pmUVVY/TOsFt/x0oQ== + dependencies: + "@types/levelup" "^4.3.0" + ethereumjs-util "^7.1.0" + level-mem "^5.0.1" + level-ws "^2.0.0" + readable-stream "^3.6.0" + rlp "^2.2.4" + semaphore-async-await "^1.5.1" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@^3.1.10, micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +micromatch@^4.0.2, micromatch@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== + dependencies: + braces "^3.0.1" + picomatch "^2.2.3" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.49.0: + version "1.49.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" + integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== + +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.32" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" + integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== + dependencies: + mime-db "1.49.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +mimic-fn@^2.0.0, mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +mimic-response@^1.0.0, mimic-response@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= + dependencies: + dom-walk "^0.1.0" + +min-indent@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" + integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +minipass@^2.6.0, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +mississippi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" + integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^3.0.0" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp-promise@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" + integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= + dependencies: + mkdirp "*" + +mkdirp@*, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mkdirp@0.5.5, mkdirp@0.5.x, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5, mkdirp@~0.5.0: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mnemonist@^0.38.0: + version "0.38.3" + resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.3.tgz#35ec79c1c1f4357cfda2fe264659c2775ccd7d9d" + integrity sha512-2K9QYubXx/NAjv4VLq1d1Ly8pWNC5L3BrixtdkyTegXWJIqY+zLNDhhX/A+ZwWt70tB1S8H4BE8FLYEFyNoOBw== + dependencies: + obliterator "^1.6.1" + +mocha@^7.1.1, mocha@^7.1.2: + version "7.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" + integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + mkdirp "0.5.5" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + +mock-fs@^4.1.0: + version "4.14.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" + integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== + +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multibase@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" + integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multibase@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" + integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multicodec@^0.5.5: + version "0.5.7" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" + integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== + dependencies: + varint "^5.0.0" + +multicodec@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" + integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== + dependencies: + buffer "^5.6.0" + varint "^5.0.0" + +multihashes@^0.4.15, multihashes@~0.4.15: + version "0.4.21" + resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" + integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== + dependencies: + buffer "^5.5.0" + multibase "^0.7.0" + varint "^5.0.0" + +murmur-128@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/murmur-128/-/murmur-128-0.2.1.tgz#a9f6568781d2350ecb1bf80c14968cadbeaa4b4d" + integrity sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg== + dependencies: + encode-utf8 "^1.0.2" + fmix "^0.1.0" + imul "^1.0.0" + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + +nan@^2.12.1, nan@^2.14.0: + version "2.15.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" + integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== + +nano-base32@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nano-base32/-/nano-base32-1.0.1.tgz#ba548c879efcfb90da1c4d9e097db4a46c9255ef" + integrity sha1-ulSMh578+5DaHE2eCX20pGySVe8= + +nano-json-stream-parser@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" + integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +next-tick@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +no-case@^2.2.0, no-case@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== + dependencies: + lower-case "^1.1.1" + +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-emoji@^1.10.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" + integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== + dependencies: + lodash "^4.17.21" + +node-environment-flags@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + +node-fetch@2.6.1, node-fetch@^2.6.0, node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + +node-fetch@~1.7.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +node-gyp-build@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" + integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== + +node-libs-browser@^2.0.0, node-libs-browser@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" + integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== + dependencies: + assert "^1.1.1" + browserify-zlib "^0.2.0" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^3.0.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "0.0.1" + process "^0.11.10" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.3.3" + stream-browserify "^2.0.1" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.11.0" + vm-browserify "^1.0.1" + +nofilter@^1.0.3, nofilter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" + integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== + +nofilter@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-3.0.3.tgz#3ff3b142efdccb403434ccae4a0c2c835cb9b522" + integrity sha512-TN/MCrQmXQk5DyUJ8TGUq1Il8rv4fTsjddLmMopV006QP8DMkglmGgYfQKD5620vXLRXfr8iGI6ZZ4/ZWld2cQ== + +nopt@3.x: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +normalize-url@^4.1.0: + version "4.5.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" + integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== + +npm-programmatic@0.0.12: + version "0.0.12" + resolved "https://registry.yarnpkg.com/npm-programmatic/-/npm-programmatic-0.0.12.tgz#566ba2452c886c7fd3a41586bd559cdc872fa77e" + integrity sha512-fvZdiJS038ZH31z59cEiIywOcgX1u23aLc0wAKF4btyhbYQxE93wTQjzs/URERK+GhS/QghDILQmEvgxu77/zQ== + dependencies: + bluebird "^3.4.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +nth-check@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.0.tgz#1bb4f6dac70072fc313e8c9cd1417b5074c0a125" + integrity sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q== + dependencies: + boolbase "^1.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +number-to-bn@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" + integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA= + dependencies: + bn.js "4.11.6" + strip-hex-prefix "1.0.0" + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-inspect@^1.11.0, object-inspect@^1.9.0, object-inspect@~1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" + integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== + +object-is@^1.0.1: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" + integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-keys@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + integrity sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + +object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7" + integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +obliterator@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-1.6.1.tgz#dea03e8ab821f6c4d96a299e17aef6a3af994ef3" + integrity sha512-9WXswnqINnnhOG/5SLimUlzuU1hFJUc8zkwyD59Sd+dPOMf05PmnYG/d6Q7HZ+KmgkZJa1PxRso6QdM3sTNHig== + +oboe@2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" + integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= + dependencies: + http-https "^1.0.0" + +oboe@2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" + integrity sha1-VVQoTFQ6ImbXo48X4HOCH73jk80= + dependencies: + http-https "^1.0.0" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + +onetime@^5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + +optionator@^0.8.1, optionator@^0.8.2: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +original-require@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/original-require/-/original-require-1.0.1.tgz#0f130471584cd33511c5ec38c8d59213f9ac5e20" + integrity sha1-DxMEcVhM0zURxew4yNWSE/msXiA= + +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= + dependencies: + lcid "^1.0.0" + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + +os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +p-cancelable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" + integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== + +p-cancelable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-timeout@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" + integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= + dependencies: + p-finally "^1.0.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +pako@~1.0.5: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + +parallel-transform@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" + integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== + dependencies: + cyclist "^1.0.1" + inherits "^2.0.3" + readable-stream "^2.1.5" + +param-case@2.1.x, param-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc= + dependencies: + no-case "^2.2.0" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-asn1@^5.0.0, parse-asn1@^5.1.5: + version "5.1.6" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" + integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== + dependencies: + asn1.js "^5.2.0" + browserify-aes "^1.0.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + +parse-cache-control@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" + integrity sha1-juqz5U+laSD+Fro493+iGqzC104= + +parse-headers@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.4.tgz#9eaf2d02bed2d1eff494331ce3df36d7924760bf" + integrity sha512-psZ9iZoCNFLrgRjZ1d8mn0h9WRqJwFxM9q3x7iUjN/YT2OksthDJ5TiPCu2F38kS4zutqfW+YdVVkBZZx3/1aw== + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse5-htmlparser2-tree-adapter@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" + integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== + dependencies: + parse5 "^6.0.1" + +parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +pascal-case@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.1.tgz#2d578d3455f660da65eca18ef95b4e0de912761e" + integrity sha1-LVeNNFX2YNpl7KGO+VtODekSdh4= + dependencies: + camel-case "^3.0.0" + upper-case-first "^1.1.0" + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +patch-package@6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.2.2.tgz#71d170d650c65c26556f0d0fbbb48d92b6cc5f39" + integrity sha512-YqScVYkVcClUY0v8fF0kWOjDYopzIM8e3bj/RU1DPeEF14+dCGm6UeOYm4jvCyxqIEQ5/eJzmbWfDWnUleFNMg== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^2.4.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^1.2.1" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.0" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + +patch-package@^6.2.2: + version "6.4.7" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.4.7.tgz#2282d53c397909a0d9ef92dae3fdeb558382b148" + integrity sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^2.4.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^2.0.0" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.0" + open "^7.4.2" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + +path-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" + integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== + +path-browserify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" + integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== + +path-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.1.tgz#94b8037c372d3fe2906e465bb45e25d226e8eea5" + integrity sha1-lLgDfDctP+KQbkZbtF4l0ibo7qU= + dependencies: + no-case "^2.2.0" + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-parse@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + dependencies: + pify "^2.0.0" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +pbkdf2@^3.0.17, pbkdf2@^3.0.3, pbkdf2@^3.0.9: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== + +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +postcss-modules-extract-imports@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" + integrity sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ== + dependencies: + postcss "^7.0.5" + +postcss-modules-local-by-default@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.6.tgz#dd9953f6dd476b5fd1ef2d8830c8929760b56e63" + integrity sha512-oLUV5YNkeIBa0yQl7EYnxMgy4N6noxmiwZStaEJUSe2xPMcdNc8WmBQuQCx18H5psYbVxz8zoHk0RAAYZXP9gA== + dependencies: + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" + postcss-value-parser "^3.3.1" + +postcss-modules-scope@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" + integrity sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ== + dependencies: + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" + +postcss-modules-values@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-2.0.0.tgz#479b46dc0c5ca3dc7fa5270851836b9ec7152f64" + integrity sha512-Ki7JZa7ff1N3EIMlPnGTZfUMe69FFwiQPnVSXC9mnn3jozCRBYIxiZd44yJOV2AmabOo4qFf8s0dC/+lweG7+w== + dependencies: + icss-replace-symbols "^1.1.0" + postcss "^7.0.6" + +postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2: + version "6.0.6" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz#2c5bba8174ac2f6981ab631a42ab0ee54af332ea" + integrity sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + +postcss-value-parser@^3.3.0, postcss-value-parser@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== + +postcss@^7.0.14, postcss@^7.0.36, postcss@^7.0.5, postcss@^7.0.6: + version "7.0.36" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.36.tgz#056f8cffa939662a8f5905950c07d5285644dfcb" + integrity sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + +postinstall-postinstall@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3" + integrity sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ== + +precond@0.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" + integrity sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw= + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + +prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + +prettier-plugin-solidity@^1.0.0-beta.15: + version "1.0.0-beta.17" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.17.tgz#fc0fe977202b6503763a338383efeceaa6c7661e" + integrity sha512-YFkxV/rHi1mphi17/XKcJ9QjZlb+L/J0yY2erix21BZfzPv2BN9dfmSRGr/poDp/FBOFSW+jteP2BCMe7HndVQ== + dependencies: + "@solidity-parser/parser" "^0.13.2" + emoji-regex "^9.2.2" + escape-string-regexp "^4.0.0" + semver "^7.3.5" + solidity-comments-extractor "^0.0.7" + string-width "^4.2.2" + +prettier@^1.14.2, prettier@^1.14.3, prettier@^1.18.2: + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== + +prettier@^2.1.2, prettier@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" + integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== + +pretty-error@^2.0.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.2.tgz#be89f82d81b1c86ec8fdfbc385045882727f93b6" + integrity sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw== + dependencies: + lodash "^4.17.20" + renderkid "^2.0.4" + +printj@~1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222" + integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ== + +private@^0.1.6, private@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= + +promise-polyfill@8.1.3: + version "8.1.3" + resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-8.1.3.tgz#8c99b3cf53f3a91c68226ffde7bde81d7f904116" + integrity sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g== + +promise-to-callback@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" + integrity sha1-XSp0kBC/tn2WNZj805YHRqaP7vc= + dependencies: + is-fn "^1.0.0" + set-immediate-shim "^1.0.1" + +promise@^8.0.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/promise/-/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e" + integrity sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q== + dependencies: + asap "~2.0.6" + +proper-lockfile@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz#c8b9de2af6b2f1601067f98e01ac66baa223141f" + integrity sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA== + dependencies: + graceful-fs "^4.2.4" + retry "^0.12.0" + signal-exit "^3.0.2" + +protobufjs@^6.8.6: + version "6.11.2" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.2.tgz#de39fabd4ed32beaa08e9bb1e30d08544c1edf8b" + integrity sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^4.0.1" + "@types/node" ">=13.7.0" + long "^4.0.0" + +proxy-addr@~2.0.5: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + +pseudomap@^1.0.1, pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +pull-cat@^1.1.9: + version "1.1.11" + resolved "https://registry.yarnpkg.com/pull-cat/-/pull-cat-1.1.11.tgz#b642dd1255da376a706b6db4fa962f5fdb74c31b" + integrity sha1-tkLdElXaN2pwa220+pYvX9t0wxs= + +pull-defer@^0.2.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/pull-defer/-/pull-defer-0.2.3.tgz#4ee09c6d9e227bede9938db80391c3dac489d113" + integrity sha512-/An3KE7mVjZCqNhZsr22k1Tx8MACnUnHZZNPSJ0S62td8JtYr/AiRG42Vz7Syu31SoTLUzVIe61jtT/pNdjVYA== + +pull-level@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pull-level/-/pull-level-2.0.4.tgz#4822e61757c10bdcc7cf4a03af04c92734c9afac" + integrity sha512-fW6pljDeUThpq5KXwKbRG3X7Ogk3vc75d5OQU/TvXXui65ykm+Bn+fiktg+MOx2jJ85cd+sheufPL+rw9QSVZg== + dependencies: + level-post "^1.0.7" + pull-cat "^1.1.9" + pull-live "^1.0.1" + pull-pushable "^2.0.0" + pull-stream "^3.4.0" + pull-window "^2.1.4" + stream-to-pull-stream "^1.7.1" + +pull-live@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/pull-live/-/pull-live-1.0.1.tgz#a4ecee01e330155e9124bbbcf4761f21b38f51f5" + integrity sha1-pOzuAeMwFV6RJLu89HYfIbOPUfU= + dependencies: + pull-cat "^1.1.9" + pull-stream "^3.4.0" + +pull-pushable@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/pull-pushable/-/pull-pushable-2.2.0.tgz#5f2f3aed47ad86919f01b12a2e99d6f1bd776581" + integrity sha1-Xy867UethpGfAbEqLpnW8b13ZYE= + +pull-stream@^3.2.3, pull-stream@^3.4.0, pull-stream@^3.6.8: + version "3.6.14" + resolved "https://registry.yarnpkg.com/pull-stream/-/pull-stream-3.6.14.tgz#529dbd5b86131f4a5ed636fdf7f6af00781357ee" + integrity sha512-KIqdvpqHHaTUA2mCYcLG1ibEbu/LCKoJZsBWyv9lSYtPkJPBq8m3Hxa103xHi6D2thj5YXa0TqK3L3GUkwgnew== + +pull-window@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/pull-window/-/pull-window-2.1.4.tgz#fc3b86feebd1920c7ae297691e23f705f88552f0" + integrity sha1-/DuG/uvRkgx64pdpHiP3BfiFUvA= + dependencies: + looper "^2.0.0" + +pump@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.5.1" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" + integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== + dependencies: + duplexify "^3.6.0" + inherits "^2.0.3" + pump "^2.0.0" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + +punycode@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= + +punycode@^1.2.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +pure-rand@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-5.0.0.tgz#87f5bdabeadbd8904e316913a5c0b8caac517b37" + integrity sha512-lD2/y78q+7HqBx2SaT6OT4UcwtvXNRfEpzYEzl0EQ+9gZq2Qi3fa0HDnYPeqQwhlHJFBUhT7AO3mLU3+8bynHA== + +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + +qs@^6.4.0, qs@^6.7.0, qs@^6.9.4: + version "6.10.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" + integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg== + dependencies: + side-channel "^1.0.4" + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +query-string@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +random@^3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/random/-/random-3.0.6.tgz#c918e9498dee461affde72986c79ac4d9ef486cf" + integrity sha512-B53pp/8eFBxULg6sfQgjjmy3vZ2CWVt0Nk4OgkSpvmAf3VXfcEUgGASbNWbXiTiExWe8hCIf5HlddNHzrte9jg== + dependencies: + seedrandom "^3.0.5" + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +randomhex@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/randomhex/-/randomhex-0.1.5.tgz#baceef982329091400f2a2912c6cd02f1094f585" + integrity sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU= + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + +raw-body@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" + integrity sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA== + dependencies: + bytes "3.1.0" + http-errors "1.7.3" + iconv-lite "0.4.24" + unpipe "1.0.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.8, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^1.0.33: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^3.0.6, readable-stream@^3.1.0, readable-stream@^3.4.0, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@~1.0.15: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== + dependencies: + picomatch "^2.0.4" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= + dependencies: + resolve "^1.1.6" + +recursive-readdir@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" + integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg== + dependencies: + minimatch "3.0.4" + +regenerate@^1.2.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + +regenerator-runtime@^0.13.4: + version "0.13.9" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" + integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== + +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" + integrity sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q== + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexp.prototype.flags@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" + integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + integrity sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA= + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + integrity sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw= + dependencies: + jsesc "~0.5.0" + +relateurl@0.2.x: + version "0.2.7" + resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +renderkid@^2.0.4: + version "2.0.7" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.7.tgz#464f276a6bdcee606f4a15993f9b29fc74ca8609" + integrity sha512-oCcFyxaMrKsKcTY59qnCAtmDVSLfPbrv6A3tVbPdFMMrv5jaK10V6m40cKsoPNhAqN6rmHW9sswW4o3ruSrwUQ== + dependencies: + css-select "^4.1.3" + dom-converter "^0.2.0" + htmlparser2 "^6.1.0" + lodash "^4.17.21" + strip-ansi "^3.0.1" + +repeat-element@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== + +repeat-string@^1.5.2, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" + +req-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-2.0.0.tgz#d4082b4d44598036640fb73ddea01ed53db49ebc" + integrity sha1-1AgrTURZgDZkD7c93qAe1T20nrw= + dependencies: + req-from "^2.0.0" + +req-from@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/req-from/-/req-from-2.0.0.tgz#d74188e47f93796f4aa71df6ee35ae689f3e0e70" + integrity sha1-10GI5H+TeW9Kpx327jWuaJ8+DnA= + dependencies: + resolve-from "^3.0.0" + +request-promise-core@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" + integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== + dependencies: + lodash "^4.17.19" + +request-promise-native@^1.0.5: + version "1.0.9" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" + integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== + dependencies: + request-promise-core "1.1.4" + stealthy-require "^1.1.1" + tough-cookie "^2.3.3" + +request@^2.79.0, request@^2.85.0, request@^2.88.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + integrity sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg= + +require-from-string@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +rescript@^9.1.4: + version "9.1.4" + resolved "https://registry.yarnpkg.com/rescript/-/rescript-9.1.4.tgz#1eb126f98d6c16942c0bf0df67c050198e580515" + integrity sha512-aXANK4IqecJzdnDpJUsU6pxMViCR5ogAxzuqS0mOr8TloMnzAjJFu63fjD6LCkWrKAhlMkFFzQvVQYaAaVkFXw== + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= + +resolve@1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.8.1, resolve@~1.20.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + +responselike@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +resumer@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" + integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= + dependencies: + through "~2.3.4" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8= + dependencies: + align-text "^0.1.1" + +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +ripemd160-min@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/ripemd160-min/-/ripemd160-min-0.0.6.tgz#a904b77658114474d02503e819dcc55853b67e62" + integrity sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A== + +ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.0.0, rlp@^2.2.1, rlp@^2.2.2, rlp@^2.2.3, rlp@^2.2.4: + version "2.2.6" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.6.tgz#c80ba6266ac7a483ef1e69e8e2f056656de2fb2c" + integrity sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg== + dependencies: + bn.js "^4.11.1" + +run-async@^2.2.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= + dependencies: + aproba "^1.1.1" + +rustbn.js@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" + integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== + +rxjs@^6.4.0: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + +rxjs@^7.2.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.3.0.tgz#39fe4f3461dc1e50be1475b2b85a0a88c1e938c6" + integrity sha512-p2yuGIg9S1epc3vrjKf6iVb3RCaAYjYskkO+jHIaV0IjOPlJop4UnodOoFb2xeNwlguqLYvGw1b1McillYb5Gw== + dependencies: + tslib "~2.1.0" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-event-emitter@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz#5b692ef22329ed8f69fdce607e50ca734f6f20af" + integrity sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg== + dependencies: + events "^3.0.0" + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sc-istanbul@^0.4.5: + version "0.4.6" + resolved "https://registry.yarnpkg.com/sc-istanbul/-/sc-istanbul-0.4.6.tgz#cf6784355ff2076f92d70d59047d71c13703e839" + integrity sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g== + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" + +schema-utils@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" + integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== + dependencies: + ajv "^6.1.0" + ajv-errors "^1.0.0" + ajv-keywords "^3.1.0" + +scrypt-js@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.3.tgz#bb0040be03043da9a012a2cea9fc9f852cfc87d4" + integrity sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q= + +scrypt-js@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" + integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== + +scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +"scrypt-shim@github:web3-js/scrypt-shim": + version "0.1.0" + resolved "https://codeload.github.com/web3-js/scrypt-shim/tar.gz/aafdadda13e660e25e1c525d1f5b2443f5eb1ebb" + dependencies: + scryptsy "^2.1.0" + semver "^6.3.0" + +scryptsy@2.1.0, scryptsy@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-2.1.0.tgz#8d1e8d0c025b58fdd25b6fa9a0dc905ee8faa790" + integrity sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w== + +scryptsy@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-1.2.1.tgz#a3225fa4b2524f802700761e2855bdf3b2d92163" + integrity sha1-oyJfpLJST4AnAHYeKFW987LZIWM= + dependencies: + pbkdf2 "^3.0.3" + +secp256k1@^3.0.1: + version "3.8.0" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.8.0.tgz#28f59f4b01dbee9575f56a47034b7d2e3b3b352d" + integrity sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw== + dependencies: + bindings "^1.5.0" + bip66 "^1.1.5" + bn.js "^4.11.8" + create-hash "^1.2.0" + drbg.js "^1.0.1" + elliptic "^6.5.2" + nan "^2.14.0" + safe-buffer "^5.1.2" + +secp256k1@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz#15dd57d0f0b9fdb54ac1fa1694f40e5e9a54f4a1" + integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg== + dependencies: + elliptic "^6.5.2" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +seedrandom@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.1.tgz#eb3dde015bcf55df05a233514e5df44ef9dce083" + integrity sha512-1/02Y/rUeU1CJBAGLebiC5Lbo5FnB22gQbIFFYTLkwvp1xdABZJH1sn4ZT1MzXmPpzv+Rf/Lu2NcsLJiK4rcDg== + +seedrandom@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" + integrity sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg== + +seek-bzip@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.6.tgz#35c4171f55a680916b52a07859ecf3b5857f21c4" + integrity sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ== + dependencies: + commander "^2.8.1" + +semaphore-async-await@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" + integrity sha1-hXvvXjZEYBykuVcLh+nfXKEpdPo= + +semaphore@>=1.0.1, semaphore@^1.0.3, semaphore@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" + integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== + +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" + integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.3.4, semver@^7.3.5: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + +semver@~5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== + +send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +sentence-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz#1f6e2dda39c168bf92d13f86d4a918933f667ed4" + integrity sha1-H24t2jnBaL+S0T+G1KkYkz9mftQ= + dependencies: + no-case "^2.2.0" + upper-case-first "^1.1.2" + +serialize-javascript@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" + integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== + dependencies: + randombytes "^2.1.0" + +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +servify@^0.1.12: + version "0.1.12" + resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" + integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== + dependencies: + body-parser "^1.16.0" + cors "^2.8.1" + express "^4.14.0" + request "^2.79.0" + xhr "^2.3.3" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setimmediate@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" + integrity sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48= + +setimmediate@^1.0.4, setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +sha1@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/sha1/-/sha1-1.1.1.tgz#addaa7a93168f393f19eb2b15091618e2700f848" + integrity sha1-rdqnqTFo85PxnrKxUJFhjicA+Eg= + dependencies: + charenc ">= 0.0.1" + crypt ">= 0.0.1" + +sha3@^2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/sha3/-/sha3-2.1.4.tgz#000fac0fe7c2feac1f48a25e7a31b52a6492cc8f" + integrity sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg== + dependencies: + buffer "6.0.3" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shelljs@^0.8.3: + version "0.8.4" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" + integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^2.7.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz#0e22e91d4575d87620620bc91308d57a77f44b5d" + integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== + dependencies: + decompress-response "^3.3.0" + once "^1.3.1" + simple-concat "^1.0.0" + +simple-git@^1.110.0: + version "1.132.0" + resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-1.132.0.tgz#53ac4c5ec9e74e37c2fd461e23309f22fcdf09b1" + integrity sha512-xauHm1YqCTom1sC9eOjfq3/9RKiUA9iPnxBbrY2DdL8l4ADMu0jjM5l5lphQP5YWNqAL2aXC/OeuQ76vHtW5fg== + dependencies: + debug "^4.0.1" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= + +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + +snake-case@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" + integrity sha1-Qb2xtz8w7GagTU4srRt2OH1NbZ8= + dependencies: + no-case "^2.2.0" + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +solc-wrapper@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/solc-wrapper/-/solc-wrapper-0.6.3.tgz#3230f9665bf8dce9fbe5a1517bd81b96c605e3a3" + integrity sha512-FWBnuQfU537SVSsBxuE4XkOKcK88a/bpLMVde2gc3BZcj0VmPc38wYO0Hkqqxsek7ZLK2lmXuEDLmgXhXl8Kyw== + dependencies: + command-exists "^1.2.8" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +solc@0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" + integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + follow-redirects "^1.12.1" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +solc@^0.4.20: + version "0.4.26" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.26.tgz#5390a62a99f40806b86258c737c1cf653cc35cb5" + integrity sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA== + dependencies: + fs-extra "^0.30.0" + memorystream "^0.3.1" + require-from-string "^1.1.0" + semver "^5.3.0" + yargs "^4.7.1" + +solc@^0.6.3: + version "0.6.12" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.6.12.tgz#48ac854e0c729361b22a7483645077f58cba080e" + integrity sha512-Lm0Ql2G9Qc7yPP2Ba+WNmzw2jwsrd3u4PobHYlSOxaut3TtUbj9+5ZrT6f4DUpNPEoBaFUOEg9Op9C0mk7ge9g== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +solhint@^3.3.6: + version "3.3.6" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.6.tgz#abe9af185a9a7defefba480047b3e42cbe9a1210" + integrity sha512-HWUxTAv2h7hx3s3hAab3ifnlwb02ZWhwFU/wSudUHqteMS3ll9c+m1FlGn9V8ztE2rf3Z82fQZA005Wv7KpcFA== + dependencies: + "@solidity-parser/parser" "^0.13.2" + ajv "^6.6.1" + antlr4 "4.7.1" + ast-parents "0.0.1" + chalk "^2.4.2" + commander "2.18.0" + cosmiconfig "^5.0.7" + eslint "^5.6.0" + fast-diff "^1.1.2" + glob "^7.1.3" + ignore "^4.0.6" + js-yaml "^3.12.0" + lodash "^4.17.11" + semver "^6.3.0" + optionalDependencies: + prettier "^1.14.3" + +solidity-ast@^0.4.15: + version "0.4.26" + resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.26.tgz#6e644bdb897c245dd07695a63ffa95edfe02c11f" + integrity sha512-UR9Ip3QoiEvNON5lOA28JNEzKT+1fLFA4xpIbZSEl4CEnYr/a4Pj0qMJh0652UQ51pKplI/nncZsDOMzdHdCcg== + +solidity-comments-extractor@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19" + integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw== + +solidity-coverage@^0.7.17: + version "0.7.17" + resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.17.tgz#5139de8f6666d4755d88f453d8e35632a7bb3444" + integrity sha512-Erw2hd2xdACAvDX8jUdYkmgJlIIazGznwDJA5dhRaw4def2SisXN9jUjneeyOZnl/E7j6D3XJYug4Zg9iwodsg== + dependencies: + "@solidity-parser/parser" "^0.13.2" + "@truffle/provider" "^0.2.24" + chalk "^2.4.2" + death "^1.1.0" + detect-port "^1.3.0" + fs-extra "^8.1.0" + ganache-cli "^6.12.2" + ghost-testrpc "^0.0.2" + global-modules "^2.0.0" + globby "^10.0.1" + jsonschema "^1.2.4" + lodash "^4.17.15" + node-emoji "^1.10.0" + pify "^4.0.1" + recursive-readdir "^2.2.2" + sc-istanbul "^0.4.5" + semver "^7.3.4" + shelljs "^0.8.3" + web3-utils "^1.3.0" + +source-list-map@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@0.5.12: + version "0.5.12" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" + integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== + dependencies: + source-map "^0.5.6" + +source-map-support@^0.5.13, source-map-support@~0.5.12: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== + +source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + integrity sha1-2rc/vPwrqBm03gO9b26qSBZLP50= + dependencies: + amdefine ">=0.0.4" + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.10" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz#0d9becccde7003d6c658d487dd48a32f0bf3014b" + integrity sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA== + +spinnies@^0.3.0: + version "0.3.2" + resolved "https://registry.yarnpkg.com/spinnies/-/spinnies-0.3.2.tgz#693d85cdaa095e253b13a8dc0dc8808cef23d678" + integrity sha512-WOvGI8X3h2XbAu/VBzIG99qJTeWCZ5RjyZtuLc4Q6qwAIv1/OPA2aL9j5wYEhwNsWLbBDHH5bLk/bOJTpexljw== + dependencies: + chalk "^2.4.2" + cli-cursor "^3.0.0" + +spinnies@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/spinnies/-/spinnies-0.4.3.tgz#2ea0ad148e78353ddf621dec3951a6f4c3cbf66e" + integrity sha512-TTA2vWXrXJpfThWAl2t2hchBnCMI1JM5Wmb2uyI7Zkefdw/xO98LDy6/SBYwQPiYXL3swx3Eb44ZxgoS8X5wpA== + dependencies: + chalk "^2.4.2" + cli-cursor "^3.0.0" + strip-ansi "^5.2.0" + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +ssri@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" + integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q== + dependencies: + figgy-pudding "^3.5.1" + +stacktrace-parser@^0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" + integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== + dependencies: + type-fest "^0.7.1" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +stealthy-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= + +stream-browserify@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" + integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-each@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" + integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + +stream-http@^2.7.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" + integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + +stream-to-pull-stream@^1.7.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/stream-to-pull-stream/-/stream-to-pull-stream-1.7.3.tgz#4161aa2d2eb9964de60bfa1af7feaf917e874ece" + integrity sha512-6sNyqJpr5dIOQdgNy/xcDWwDuzAsAwVzhzrWlAPAQ7Lkjx/rv0wgvxEyKwTq6FmNd5rjTrELt/CLmaSw7crMGg== + dependencies: + looper "^3.0.0" + pull-stream "^3.2.3" + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trim@~1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.4.tgz#6014689baf5efaf106ad031a5fa45157666ed1bd" + integrity sha512-hWCk/iqf7lp0/AgTF7/ddO1IWtSNPASjlzCicV5irAVdE1grjsneK26YG6xACMBEdCvO8fUST0UzDMh/2Qy+9Q== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string_decoder@^1.0.0, string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-dirs@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" + integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g== + dependencies: + is-natural-number "^4.0.1" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= + dependencies: + is-hex-prefixed "1.0.0" + +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= + +strip-json-comments@2.0.1, strip-json-comments@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +super-split@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/super-split/-/super-split-1.1.0.tgz#43b3ba719155f4d43891a32729d59b213d9155fc" + integrity sha512-I4bA5mgcb6Fw5UJ+EkpzqXfiuvVGS/7MuND+oBxNFmxu3ugLNrdIatzBLfhFRMVMLxgSsRy+TjIktgkF9RFSNQ== + +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== + dependencies: + has-flag "^3.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + +supports-color@^3.1.0: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= + dependencies: + has-flag "^1.0.0" + +supports-color@^4.2.1: + version "4.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" + integrity sha1-vnoN5ITexcXN34s9WRJQRJEvY1s= + dependencies: + has-flag "^2.0.0" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +swap-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3" + integrity sha1-w5IDpFhzhfrTyFCgvRvK+ggZdOM= + dependencies: + lower-case "^1.1.1" + upper-case "^1.1.1" + +swarm-js@0.1.39: + version "0.1.39" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.39.tgz#79becb07f291d4b2a178c50fee7aa6e10342c0e8" + integrity sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + decompress "^4.0.0" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^7.1.0" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request-promise "^0.1.2" + +swarm-js@^0.1.40: + version "0.1.40" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" + integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^7.1.0" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request "^1.0.1" + +sync-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" + integrity sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw== + dependencies: + http-response-object "^3.0.1" + sync-rpc "^1.2.1" + then-request "^6.0.0" + +sync-rpc@^1.2.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/sync-rpc/-/sync-rpc-1.3.6.tgz#b2e8b2550a12ccbc71df8644810529deb68665a7" + integrity sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw== + dependencies: + get-port "^3.1.0" + +table@^5.2.3: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + +tapable@^0.2.7: + version "0.2.9" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.9.tgz#af2d8bbc9b04f74ee17af2b4d9048f807acd18a8" + integrity sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A== + +tapable@^1.0.0, tapable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + +tape@^4.6.3: + version "4.14.0" + resolved "https://registry.yarnpkg.com/tape/-/tape-4.14.0.tgz#e4d46097e129817175b90925f2385f6b1bcfa826" + integrity sha512-z0+WrUUJuG6wIdWrl4W3rTte2CR26G6qcPOj3w1hfRdcmhF3kHBhOBW9VHsPVAkz08ZmGzp7phVpDupbLzrYKQ== + dependencies: + call-bind "~1.0.2" + deep-equal "~1.1.1" + defined "~1.0.0" + dotignore "~0.1.2" + for-each "~0.3.3" + glob "~7.1.7" + has "~1.0.3" + inherits "~2.0.4" + is-regex "~1.1.3" + minimist "~1.2.5" + object-inspect "~1.11.0" + resolve "~1.20.0" + resumer "~0.0.0" + string.prototype.trim "~1.2.4" + through "~2.3.8" + +tar-stream@^1.5.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" + integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== + dependencies: + bl "^1.0.0" + buffer-alloc "^1.2.0" + end-of-stream "^1.0.0" + fs-constants "^1.0.0" + readable-stream "^2.3.0" + to-buffer "^1.1.1" + xtend "^4.0.0" + +tar@^4.0.2: + version "4.4.19" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== + dependencies: + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" + +terser-webpack-plugin@^1.4.3: + version "1.4.5" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b" + integrity sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw== + dependencies: + cacache "^12.0.2" + find-cache-dir "^2.1.0" + is-wsl "^1.1.0" + schema-utils "^1.0.0" + serialize-javascript "^4.0.0" + source-map "^0.6.1" + terser "^4.1.2" + webpack-sources "^1.4.0" + worker-farm "^1.7.0" + +terser@^4.1.2: + version "4.8.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" + integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + +test-value@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" + integrity sha1-Edpv9nDzRxpztiXKTz/c97t0gpE= + dependencies: + array-back "^1.0.3" + typical "^2.6.0" + +testrpc@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" + integrity sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA== + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +then-request@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" + integrity sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA== + dependencies: + "@types/concat-stream" "^1.6.0" + "@types/form-data" "0.0.33" + "@types/node" "^8.0.0" + "@types/qs" "^6.2.31" + caseless "~0.12.0" + concat-stream "^1.6.0" + form-data "^2.2.0" + http-basic "^8.1.1" + http-response-object "^3.0.1" + promise "^8.0.0" + qs "^6.4.0" + +through2@^2.0.0, through2@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +through@^2.3.6, through@^2.3.8, through@~2.3.4, through@~2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +timed-out@^4.0.0, timed-out@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= + +timers-browserify@^2.0.4: + version "2.0.12" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" + integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== + dependencies: + setimmediate "^1.0.4" + +title-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" + integrity sha1-PhJyFtpY0rxb7PE3q5Ha46fNj6o= + dependencies: + no-case "^2.2.0" + upper-case "^1.0.3" + +tmp@0.0.33, tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +tmp@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.1.0.tgz#ee434a4e22543082e294ba6201dcc6eafefa2877" + integrity sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw== + dependencies: + rimraf "^2.6.3" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= + +to-buffer@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" + integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + +toposort@^1.0.0: + version "1.0.7" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029" + integrity sha1-LmhELZ9k7HILjMieZEOsbKqVACk= + +toposort@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330" + integrity sha1-riF2gXXRVZ1IvvNUILL0li8JwzA= + +tough-cookie@^2.3.3, tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + +"true-case-path@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-2.2.1.tgz#c5bf04a5bbec3fd118be4084461b3a27c4d796bf" + integrity sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q== + +truffle-config@1.1.16: + version "1.1.16" + resolved "https://registry.yarnpkg.com/truffle-config/-/truffle-config-1.1.16.tgz#366ec223165953c77852437e00f01ed8921a77a2" + integrity sha512-of9wKDjXAKIA4kpdQbxnSxRl4EOPi6ipkoOn01J3yC1UJ942jeyLm7hUrTRdxcL8Nz3G47xO+xTMX5T7UYbdTA== + dependencies: + configstore "^4.0.0" + find-up "^2.1.0" + lodash "^4.17.13" + original-require "1.0.1" + truffle-error "^0.0.5" + truffle-provider "^0.1.12" + +truffle-error@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/truffle-error/-/truffle-error-0.0.5.tgz#6b5740c9f3aac74f47b85d654fff7fe2c1fc5e0e" + integrity sha512-JpzPLMPSCE0vaZ3vH5NO5u42GpMj/Y1SRBkQ6b69PSw3xMSH1umApN32cEcg1nnh8q5FNYc5FnKu0m4tiBffyQ== + +truffle-flattener@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/truffle-flattener/-/truffle-flattener-1.5.0.tgz#c358fa3e5cb0a663429f7912a58c4f0879414e64" + integrity sha512-vmzWG/L5OXoNruMV6u2l2IaheI091e+t+fFCOR9sl46EE3epkSRIwGCmIP/EYDtPsFBIG7e6exttC9/GlfmxEQ== + dependencies: + "@resolver-engine/imports-fs" "^0.2.2" + "@solidity-parser/parser" "^0.8.0" + find-up "^2.1.0" + mkdirp "^1.0.4" + tsort "0.0.1" + +truffle-interface-adapter@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/truffle-interface-adapter/-/truffle-interface-adapter-0.2.5.tgz#aa0bee635517b4a8e06adcdc99eacb993e68c243" + integrity sha512-EL39OpP8FcZ99ne1Rno3jImfb92Nectd4iVsZzoEUCBfbwHe7sr0k+i45guoruSoP8nMUE81Mov2s8I5pi6d9Q== + dependencies: + bn.js "^4.11.8" + ethers "^4.0.32" + lodash "^4.17.13" + web3 "1.2.1" + +truffle-provider@^0.1.12: + version "0.1.16" + resolved "https://registry.yarnpkg.com/truffle-provider/-/truffle-provider-0.1.16.tgz#05db46a4bda9b7e6503f8701f2b03ccb1e6c78ba" + integrity sha512-3d5WqSKIzZcpgW44mdfF97s+Tgh2a/3Ly6vHJirBV9OZDUtiAzP6WVnlRNvmlDJXFCDqt6Yb9qQWoXFHbYoR6w== + dependencies: + "@truffle/error" "^0.0.6" + truffle-interface-adapter "^0.2.5" + web3 "1.2.1" + +ts-essentials@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-1.0.4.tgz#ce3b5dade5f5d97cf69889c11bf7d2da8555b15a" + integrity sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ== + +ts-essentials@^6.0.3: + version "6.0.7" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-6.0.7.tgz#5f4880911b7581a873783740ce8b94da163d18a6" + integrity sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw== + +ts-generator@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/ts-generator/-/ts-generator-0.0.8.tgz#7bd48ca064db026d9520bcb682b69efc20971d6a" + integrity sha512-Gi+aZCELpVL7Mqb+GuMgM+n8JZ/arZZib1iD/R9Ok8JDjOCOCrqS9b1lr72ku7J45WeDCFZxyJoRsiQvhokCnw== + dependencies: + "@types/mkdirp" "^0.5.2" + "@types/prettier" "^1.13.2" + "@types/resolve" "^0.0.8" + chalk "^2.4.1" + glob "^7.1.2" + mkdirp "^0.5.1" + prettier "^1.14.2" + resolve "^1.8.1" + ts-essentials "^1.0.0" + +ts-generator@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ts-generator/-/ts-generator-0.1.1.tgz#af46f2fb88a6db1f9785977e9590e7bcd79220ab" + integrity sha512-N+ahhZxTLYu1HNTQetwWcx3so8hcYbkKBHTr4b4/YgObFTIKkOSSsaa+nal12w8mfrJAyzJfETXawbNjSfP2gQ== + dependencies: + "@types/mkdirp" "^0.5.2" + "@types/prettier" "^2.1.1" + "@types/resolve" "^0.0.8" + chalk "^2.4.1" + glob "^7.1.2" + mkdirp "^0.5.1" + prettier "^2.1.2" + resolve "^1.8.1" + ts-essentials "^1.0.0" + +tslib@^1.11.1, tslib@^1.9.0, tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + +tslib@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" + integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== + +tsort@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" + integrity sha1-4igPXoF/i/QnVlf9D5rr1E9aJ4Y= + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl-util@^0.15.0: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +tweetnacl@^1.0.0, tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type-fest@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" + integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== + +type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.5.0.tgz#0a2e78c2e77907b252abe5f298c1b01c63f0db3d" + integrity sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw== + +typechain-target-truffle@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typechain-target-truffle/-/typechain-target-truffle-1.0.2.tgz#52ecbd8b7a854960567ad223660d60fcb42eaa17" + integrity sha512-XF3Iq2IzR+Pqvx6fcKIKGXNEk3lEcY24vYv9VqoVPfPB6vUM09PRLJCeLm1/ag6Pr2PICKUA0f4Es+YTR3ESKA== + dependencies: + lodash "^4.17.15" + +typechain-target-web3-v1@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typechain-target-web3-v1/-/typechain-target-web3-v1-1.0.4.tgz#0157359e534737c07fc62529d5d8570a2047a2da" + integrity sha512-jQ6eCfY7QorBq6kQDjSy5LMuImZGkp6IXR6FXZp7/ulITIxAfb6Dxh+yvh0NN/zboLnMPvvSJi6tHWCqlwfSDA== + dependencies: + lodash "^4.17.15" + web3 "^1.2.4" + +typechain@^1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-1.0.5.tgz#797899d9dbce54a83b3aef04ce1727ddf07d2138" + integrity sha512-gbQmJXPKuYQ0p3tK+dMhpdQql/UPtSnkPQXw2QM/aqwCengI86z2vEM2e5rVQpmk/blFx1PYNdApSDxE12rR1Q== + dependencies: + command-line-args "^4.0.7" + debug "^3.0.1" + fs-extra "^7.0.0" + js-sha3 "^0.8.0" + lodash "^4.17.15" + ts-generator "^0.0.8" + +typechain@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-3.0.0.tgz#d5a47700831f238e43f7429b987b4bb54849b92e" + integrity sha512-ft4KVmiN3zH4JUFu2WJBrwfHeDf772Tt2d8bssDTo/YcckKW2D+OwFrHXRC6hJvO3mHjFQTihoMV6fJOi0Hngg== + dependencies: + command-line-args "^4.0.7" + debug "^4.1.1" + fs-extra "^7.0.0" + js-sha3 "^0.8.0" + lodash "^4.17.15" + ts-essentials "^6.0.3" + ts-generator "^0.1.1" + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +typescript@^4.3.4: + version "4.4.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86" + integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ== + +typewise-core@^1.2, typewise-core@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/typewise-core/-/typewise-core-1.2.0.tgz#97eb91805c7f55d2f941748fa50d315d991ef195" + integrity sha1-l+uRgFx/VdL5QXSPpQ0xXZke8ZU= + +typewise@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typewise/-/typewise-1.0.3.tgz#1067936540af97937cc5dcf9922486e9fa284651" + integrity sha1-EGeTZUCvl5N8xdz5kiSG6fooRlE= + dependencies: + typewise-core "^1.2.0" + +typewiselite@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typewiselite/-/typewiselite-1.0.0.tgz#c8882fa1bb1092c06005a97f34ef5c8508e3664e" + integrity sha1-yIgvobsQksBgBal/NO9chQjjZk4= + +typical@^2.6.0, typical@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" + integrity sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0= + +uglify-js@3.4.x: + version "3.4.10" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.10.tgz#9ad9563d8eb3acdfb8d38597d2af1d815f6a755f" + integrity sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw== + dependencies: + commander "~2.19.0" + source-map "~0.6.1" + +uglify-js@^2.8.29: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0= + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-js@^3.1.4: + version "3.14.1" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.1.tgz#e2cb9fe34db9cb4cf7e35d1d26dfea28e09a7d06" + integrity sha512-JhS3hmcVaXlp/xSo3PKY5R0JqKs5M3IV+exdLHW99qKvKivPO4Z8qbej6mte17SOPqAOVMjt/XGgWacnFSzM3g== + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= + +uglifyjs-webpack-plugin@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" + integrity sha1-uVH0q7a9YX5m9j64kUmOORdj4wk= + dependencies: + source-map "^0.5.6" + uglify-js "^2.8.29" + webpack-sources "^1.0.1" + +ultron@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" + integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== + +unbox-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + +unbzip2-stream@^1.0.9: + version "1.4.3" + resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" + integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== + dependencies: + buffer "^5.2.1" + through "^2.3.8" + +underscore@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" + integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== + +underscore@^1.9.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.1.tgz#0c1c6bd2df54b6b69f2314066d65b6cde6fcf9d1" + integrity sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g== + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" + integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== + dependencies: + imurmurhash "^0.1.4" + +unique-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" + integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= + dependencies: + crypto-random-string "^1.0.0" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +unorm@^1.3.3: + version "1.6.0" + resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af" + integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + +upper-case-first@^1.1.0, upper-case-first@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" + integrity sha1-XXm+3P8UQZUY/S7bCgUHybaFkRU= + dependencies: + upper-case "^1.1.1" + +upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= + dependencies: + prepend-http "^1.0.1" + +url-parse-lax@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + dependencies: + prepend-http "^2.0.0" + +url-set-query@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" + integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk= + +url-to-options@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" + integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +utf-8-validate@^5.0.2: + version "5.0.5" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.5.tgz#dd32c2e82c72002dc9f02eb67ba6761f43456ca1" + integrity sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ== + dependencies: + node-gyp-build "^4.2.0" + +utf8@3.0.0, utf8@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" + integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== + +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util.promisify@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== + dependencies: + define-properties "^1.1.2" + object.getownpropertydescriptors "^2.0.3" + +util.promisify@^1.0.0, util.promisify@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.1.1.tgz#77832f57ced2c9478174149cae9b96e9918cd54b" + integrity sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + for-each "^0.3.3" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.1" + +util@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= + dependencies: + inherits "2.0.1" + +util@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" + integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== + dependencies: + inherits "2.0.3" + +util@^0.12.0: + version "0.12.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" + integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + safe-buffer "^5.1.2" + which-typed-array "^1.1.2" + +utila@~0.4: + version "0.4.0" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" + integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" + integrity sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w= + +uuid@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + +uuid@^3.3.2, uuid@^3.3.3: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +varint@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" + integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vm-browserify@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" + integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== + +vue-hot-reload-api@^2.3.0: + version "2.3.4" + resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2" + integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog== + +vue-loader@^15.6.4: + version "15.9.8" + resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-15.9.8.tgz#4b0f602afaf66a996be1e534fb9609dc4ab10e61" + integrity sha512-GwSkxPrihfLR69/dSV3+5CdMQ0D+jXg8Ma1S4nQXKJAznYFX14vHdc/NetQc34Dw+rBbIJyP7JOuVb9Fhprvog== + dependencies: + "@vue/component-compiler-utils" "^3.1.0" + hash-sum "^1.0.2" + loader-utils "^1.1.0" + vue-hot-reload-api "^2.3.0" + vue-style-loader "^4.1.0" + +vue-router@^3.4.9: + version "3.5.2" + resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.5.2.tgz#5f55e3f251970e36c3e8d88a7cd2d67a350ade5c" + integrity sha512-807gn82hTnjCYGrnF3eNmIw/dk7/GE4B5h69BlyCK9KHASwSloD1Sjcn06zg9fVG4fYH2DrsNBZkpLtb25WtaQ== + +vue-style-loader@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz#6d55863a51fa757ab24e89d9371465072aa7bc35" + integrity sha512-sFuh0xfbtpRlKfm39ss/ikqs9AbKCoXZBpHeVZ8Tx650o0k0q/YCM7FRvigtxpACezfq6af+a7JeqVTWvncqDg== + dependencies: + hash-sum "^1.0.2" + loader-utils "^1.0.2" + +vue-template-compiler@^2.6.7: + version "2.6.14" + resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.6.14.tgz#a2f0e7d985670d42c9c9ee0d044fed7690f4f763" + integrity sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g== + dependencies: + de-indent "^1.0.2" + he "^1.1.0" + +vue-template-es2015-compiler@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825" + integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw== + +vue@^2.6.12: + version "2.6.14" + resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.14.tgz#e51aa5250250d569a3fbad3a8a5a687d6036e235" + integrity sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ== + +watchpack-chokidar2@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz#38500072ee6ece66f3769936950ea1771be1c957" + integrity sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww== + dependencies: + chokidar "^2.1.8" + +watchpack@^1.4.0, watchpack@^1.7.4: + version "1.7.5" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" + integrity sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== + dependencies: + graceful-fs "^4.1.2" + neo-async "^2.5.0" + optionalDependencies: + chokidar "^3.4.1" + watchpack-chokidar2 "^2.0.1" + +web3-bzz@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.1.tgz#c3bd1e8f0c02a13cd6d4e3c3e9e1713f144f6f0d" + integrity sha512-LdOO44TuYbGIPfL4ilkuS89GQovxUpmLz6C1UC7VYVVRILeZS740FVB3j9V4P4FHUk1RenaDfKhcntqgVCHtjw== + dependencies: + got "9.6.0" + swarm-js "0.1.39" + underscore "1.9.1" + +web3-bzz@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.11.tgz#41bc19a77444bd5365744596d778b811880f707f" + integrity sha512-XGpWUEElGypBjeFyUhTkiPXFbDVD6Nr/S5jznE3t8cWUA0FxRf1n3n/NuIZeb0H9RkN2Ctd/jNma/k8XGa3YKg== + dependencies: + "@types/node" "^12.12.6" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.9.1" + +web3-bzz@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.2.tgz#a3b9f613c49fd3e120e0997088a73557d5adb724" + integrity sha512-b1O2ObsqUN1lJxmFSjvnEC4TsaCbmh7Owj3IAIWTKqL9qhVgx7Qsu5O9cD13pBiSPNZJ68uJPaKq380QB4NWeA== + dependencies: + "@types/node" "^10.12.18" + got "9.6.0" + swarm-js "0.1.39" + underscore "1.9.1" + +web3-bzz@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.5.2.tgz#a04feaa19462cff6d5a8c87dad1aca4619d9dfc8" + integrity sha512-W/sPCdA+XQ9duUYKHAwf/g69cbbV8gTCRsa1MpZwU7spXECiyJ2EvD/QzAZ+UpJk3GELXFF/fUByeZ3VRQKF2g== + dependencies: + "@types/node" "^12.12.6" + got "9.6.0" + swarm-js "^0.1.40" + +web3-core-helpers@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz#f5f32d71c60a4a3bd14786118e633ce7ca6d5d0d" + integrity sha512-Gx3sTEajD5r96bJgfuW377PZVFmXIH4TdqDhgGwd2lZQCcMi+DA4TgxJNJGxn0R3aUVzyyE76j4LBrh412mXrw== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.1" + web3-utils "1.2.1" + +web3-core-helpers@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.11.tgz#84c681ed0b942c0203f3b324a245a127e8c67a99" + integrity sha512-PEPoAoZd5ME7UfbnCZBdzIerpe74GEvlwT4AjOmHeCVZoIFk7EqvOZDejJHt+feJA6kMVTdd0xzRNN295UhC1A== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.11" + web3-utils "1.2.11" + +web3-core-helpers@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.2.tgz#484974f4bd4a487217b85b0d7cfe841af0907619" + integrity sha512-HJrRsIGgZa1jGUIhvGz4S5Yh6wtOIo/TMIsSLe+Xay+KVnbseJpPprDI5W3s7H2ODhMQTbogmmUFquZweW2ImQ== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.2" + web3-utils "1.2.2" + +web3-core-helpers@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.5.2.tgz#b6bd5071ca099ba3f92dfafb552eed2b70af2795" + integrity sha512-U7LJoeUdQ3aY9t5gU7t/1XpcApsWm+4AcW5qKl/44ZxD44w0Dmsq1c5zJm3GuLr/a9MwQfXK4lpmvxVQWHHQRg== + dependencies: + web3-eth-iban "1.5.2" + web3-utils "1.5.2" + +web3-core-method@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.1.tgz#9df1bafa2cd8be9d9937e01c6a47fc768d15d90a" + integrity sha512-Ghg2WS23qi6Xj8Od3VCzaImLHseEA7/usvnOItluiIc5cKs00WYWsNy2YRStzU9a2+z8lwQywPYp0nTzR/QXdQ== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.1" + web3-core-promievent "1.2.1" + web3-core-subscriptions "1.2.1" + web3-utils "1.2.1" + +web3-core-method@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.11.tgz#f880137d1507a0124912bf052534f168b8d8fbb6" + integrity sha512-ff0q76Cde94HAxLDZ6DbdmKniYCQVtvuaYh+rtOUMB6kssa5FX0q3vPmixi7NPooFnbKmmZCM6NvXg4IreTPIw== + dependencies: + "@ethersproject/transactions" "^5.0.0-beta.135" + underscore "1.9.1" + web3-core-helpers "1.2.11" + web3-core-promievent "1.2.11" + web3-core-subscriptions "1.2.11" + web3-utils "1.2.11" + +web3-core-method@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.2.tgz#d4fe2bb1945b7152e5f08e4ea568b171132a1e56" + integrity sha512-szR4fDSBxNHaF1DFqE+j6sFR/afv9Aa36OW93saHZnrh+iXSrYeUUDfugeNcRlugEKeUCkd4CZylfgbK2SKYJA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.2" + web3-core-promievent "1.2.2" + web3-core-subscriptions "1.2.2" + web3-utils "1.2.2" + +web3-core-method@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.5.2.tgz#d1d602657be1000a29d11e3ca3bf7bc778dea9a5" + integrity sha512-/mC5t9UjjJoQmJJqO5nWK41YHo+tMzFaT7Tp7jDCQsBkinE68KsUJkt0jzygpheW84Zra0DVp6q19gf96+cugg== + dependencies: + "@ethereumjs/common" "^2.4.0" + "@ethersproject/transactions" "^5.0.0-beta.135" + web3-core-helpers "1.5.2" + web3-core-promievent "1.5.2" + web3-core-subscriptions "1.5.2" + web3-utils "1.5.2" + +web3-core-promievent@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz#003e8a3eb82fb27b6164a6d5b9cad04acf733838" + integrity sha512-IVUqgpIKoeOYblwpex4Hye6npM0aMR+kU49VP06secPeN0rHMyhGF0ZGveWBrGvf8WDPI7jhqPBFIC6Jf3Q3zw== + dependencies: + any-promise "1.3.0" + eventemitter3 "3.1.2" + +web3-core-promievent@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.11.tgz#51fe97ca0ddec2f99bf8c3306a7a8e4b094ea3cf" + integrity sha512-il4McoDa/Ox9Agh4kyfQ8Ak/9ABYpnF8poBLL33R/EnxLsJOGQG2nZhkJa3I067hocrPSjEdlPt/0bHXsln4qA== + dependencies: + eventemitter3 "4.0.4" + +web3-core-promievent@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.2.tgz#3b60e3f2a0c96db8a891c927899d29d39e66ab1c" + integrity sha512-tKvYeT8bkUfKABcQswK6/X79blKTKYGk949urZKcLvLDEaWrM3uuzDwdQT3BNKzQ3vIvTggFPX9BwYh0F1WwqQ== + dependencies: + any-promise "1.3.0" + eventemitter3 "3.1.2" + +web3-core-promievent@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.5.2.tgz#2dc9fe0e5bbeb7c360fc1aac5f12b32d9949a59b" + integrity sha512-5DacbJXe98ozSor7JlkTNCy6G8945VunRRkPxMk98rUrg60ECVEM/vuefk1atACzjQsKx6tmLZuHxbJQ64TQeQ== + dependencies: + eventemitter3 "4.0.4" + +web3-core-requestmanager@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz#fa2e2206c3d738db38db7c8fe9c107006f5c6e3d" + integrity sha512-xfknTC69RfYmLKC+83Jz73IC3/sS2ZLhGtX33D4Q5nQ8yc39ElyAolxr9sJQS8kihOcM6u4J+8gyGMqsLcpIBg== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.1" + web3-providers-http "1.2.1" + web3-providers-ipc "1.2.1" + web3-providers-ws "1.2.1" + +web3-core-requestmanager@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.11.tgz#fe6eb603fbaee18530293a91f8cf26d8ae28c45a" + integrity sha512-oFhBtLfOiIbmfl6T6gYjjj9igOvtyxJ+fjS+byRxiwFJyJ5BQOz4/9/17gWR1Cq74paTlI7vDGxYfuvfE/mKvA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.11" + web3-providers-http "1.2.11" + web3-providers-ipc "1.2.11" + web3-providers-ws "1.2.11" + +web3-core-requestmanager@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.2.tgz#667ba9ac724c9c76fa8965ae8a3c61f66e68d8d6" + integrity sha512-a+gSbiBRHtHvkp78U2bsntMGYGF2eCb6219aMufuZWeAZGXJ63Wc2321PCbA8hF9cQrZI4EoZ4kVLRI4OF15Hw== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.2" + web3-providers-http "1.2.2" + web3-providers-ipc "1.2.2" + web3-providers-ws "1.2.2" + +web3-core-requestmanager@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.5.2.tgz#43ccc00779394c941b28e6e07e217350fd1ded71" + integrity sha512-oRVW9OrAsXN2JIZt68OEg1Mb1A9a/L3JAGMv15zLEFEnJEGw0KQsGK1ET2kvZBzvpFd5G0EVkYCnx7WDe4HSNw== + dependencies: + util "^0.12.0" + web3-core-helpers "1.5.2" + web3-providers-http "1.5.2" + web3-providers-ipc "1.5.2" + web3-providers-ws "1.5.2" + +web3-core-subscriptions@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz#8c2368a839d4eec1c01a4b5650bbeb82d0e4a099" + integrity sha512-nmOwe3NsB8V8UFsY1r+sW6KjdOS68h8nuh7NzlWxBQT/19QSUGiERRTaZXWu5BYvo1EoZRMxCKyCQpSSXLc08g== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.1" + +web3-core-subscriptions@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.11.tgz#beca908fbfcb050c16f45f3f0f4c205e8505accd" + integrity sha512-qEF/OVqkCvQ7MPs1JylIZCZkin0aKK9lDxpAtQ1F8niEDGFqn7DT8E/vzbIa0GsOjL2fZjDhWJsaW+BSoAW1gg== + dependencies: + eventemitter3 "4.0.4" + underscore "1.9.1" + web3-core-helpers "1.2.11" + +web3-core-subscriptions@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.2.tgz#bf4ba23a653a003bdc3551649958cc0b080b068e" + integrity sha512-QbTgigNuT4eicAWWr7ahVpJyM8GbICsR1Ys9mJqzBEwpqS+RXTRVSkwZ2IsxO+iqv6liMNwGregbJLq4urMFcQ== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.2" + +web3-core-subscriptions@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.5.2.tgz#8eaebde44f81fc13c45b555c4422fe79393da9cf" + integrity sha512-hapI4rKFk22yurtIv0BYvkraHsM7epA4iI8Np+HuH6P9DD0zj/llaps6TXLM9HyacLBRwmOLZmr+pHBsPopUnQ== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.5.2" + +web3-core@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.1.tgz#7278b58fb6495065e73a77efbbce781a7fddf1a9" + integrity sha512-5ODwIqgl8oIg/0+Ai4jsLxkKFWJYE0uLuE1yUKHNVCL4zL6n3rFjRMpKPokd6id6nJCNgeA64KdWQ4XfpnjdMg== + dependencies: + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-core-requestmanager "1.2.1" + web3-utils "1.2.1" + +web3-core@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.11.tgz#1043cacc1becb80638453cc5b2a14be9050288a7" + integrity sha512-CN7MEYOY5ryo5iVleIWRE3a3cZqVaLlIbIzDPsvQRUfzYnvzZQRZBm9Mq+ttDi2STOOzc1MKylspz/o3yq/LjQ== + dependencies: + "@types/bn.js" "^4.11.5" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-core-requestmanager "1.2.11" + web3-utils "1.2.11" + +web3-core@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.2.tgz#334b99c8222ef9cfd0339e27352f0b58ea789a2f" + integrity sha512-miHAX3qUgxV+KYfaOY93Hlc3kLW2j5fH8FJy6kSxAv+d4d5aH0wwrU2IIoJylQdT+FeenQ38sgsCnFu9iZ1hCQ== + dependencies: + "@types/bn.js" "^4.11.4" + "@types/node" "^12.6.1" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-core-requestmanager "1.2.2" + web3-utils "1.2.2" + +web3-core@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.5.2.tgz#ca2b9b1ed3cf84d48b31c9bb91f7628f97cfdcd5" + integrity sha512-sebMpQbg3kbh3vHUbHrlKGKOxDWqjgt8KatmTBsTAWj/HwWYVDzeX+2Q84+swNYsm2DrTBVFlqTErFUwPBvyaA== + dependencies: + "@types/bn.js" "^4.11.5" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.5.2" + web3-core-method "1.5.2" + web3-core-requestmanager "1.5.2" + web3-utils "1.5.2" + +web3-eth-abi@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.1.tgz#9b915b1c9ebf82f70cca631147035d5419064689" + integrity sha512-jI/KhU2a/DQPZXHjo2GW0myEljzfiKOn+h1qxK1+Y9OQfTcBMxrQJyH5AP89O6l6NZ1QvNdq99ThAxBFoy5L+g== + dependencies: + ethers "4.0.0-beta.3" + underscore "1.9.1" + web3-utils "1.2.1" + +web3-eth-abi@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz#a887494e5d447c2926d557a3834edd66e17af9b0" + integrity sha512-PkRYc0+MjuLSgg03QVWqWlQivJqRwKItKtEpRUaxUAeLE7i/uU39gmzm2keHGcQXo3POXAbOnMqkDvOep89Crg== + dependencies: + "@ethersproject/abi" "5.0.0-beta.153" + underscore "1.9.1" + web3-utils "1.2.11" + +web3-eth-abi@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.2.tgz#d5616d88a90020f894763423a9769f2da11fe37a" + integrity sha512-Yn/ZMgoOLxhTVxIYtPJ0eS6pnAnkTAaJgUJh1JhZS4ekzgswMfEYXOwpMaD5eiqPJLpuxmZFnXnBZlnQ1JMXsw== + dependencies: + ethers "4.0.0-beta.3" + underscore "1.9.1" + web3-utils "1.2.2" + +web3-eth-abi@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.5.2.tgz#b627eada967f39ae4657ddd61b693cb00d55cb29" + integrity sha512-P3bJbDR5wib4kWGfVeBKBVi27T+AiHy4EJxYM6SMNbpm3DboLDdisu9YBd6INMs8rzxgnprBbGmmyn4jKIDKAA== + dependencies: + "@ethersproject/abi" "5.0.7" + web3-utils "1.5.2" + +web3-eth-accounts@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz#2741a8ef337a7219d57959ac8bd118b9d68d63cf" + integrity sha512-26I4qq42STQ8IeKUyur3MdQ1NzrzCqPsmzqpux0j6X/XBD7EjZ+Cs0lhGNkSKH5dI3V8CJasnQ5T1mNKeWB7nQ== + dependencies: + any-promise "1.3.0" + crypto-browserify "3.12.0" + eth-lib "0.2.7" + scryptsy "2.1.0" + semver "6.2.0" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-utils "1.2.1" + +web3-eth-accounts@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.11.tgz#a9e3044da442d31903a7ce035a86d8fa33f90520" + integrity sha512-6FwPqEpCfKIh3nSSGeo3uBm2iFSnFJDfwL3oS9pyegRBXNsGRVpgiW63yhNzL0796StsvjHWwQnQHsZNxWAkGw== + dependencies: + crypto-browserify "3.12.0" + eth-lib "0.2.8" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + scrypt-js "^3.0.1" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-utils "1.2.11" + +web3-eth-accounts@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.2.tgz#c187e14bff6baa698ac352220290222dbfd332e5" + integrity sha512-KzHOEyXOEZ13ZOkWN3skZKqSo5f4Z1ogPFNn9uZbKCz+kSp+gCAEKxyfbOsB/JMAp5h7o7pb6eYsPCUBJmFFiA== + dependencies: + any-promise "1.3.0" + crypto-browserify "3.12.0" + eth-lib "0.2.7" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + scrypt-shim "github:web3-js/scrypt-shim" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-utils "1.2.2" + +web3-eth-accounts@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.5.2.tgz#cf506c21037fa497fe42f1f055980ce4acf83731" + integrity sha512-F8mtzxgEhxfLc66vPi0Gqd6mpscvvk7Ua575bsJ1p9J2X/VtuKgDgpWcU4e4LKeROQ+ouCpAG9//0j9jQuij3A== + dependencies: + "@ethereumjs/common" "^2.3.0" + "@ethereumjs/tx" "^3.2.1" + crypto-browserify "3.12.0" + eth-lib "0.2.8" + ethereumjs-util "^7.0.10" + scrypt-js "^3.0.1" + uuid "3.3.2" + web3-core "1.5.2" + web3-core-helpers "1.5.2" + web3-core-method "1.5.2" + web3-utils "1.5.2" + +web3-eth-contract@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz#3542424f3d341386fd9ff65e78060b85ac0ea8c4" + integrity sha512-kYFESbQ3boC9bl2rYVghj7O8UKMiuKaiMkxvRH5cEDHil8V7MGEGZNH0slSdoyeftZVlaWSMqkRP/chfnKND0g== + dependencies: + underscore "1.9.1" + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-core-promievent "1.2.1" + web3-core-subscriptions "1.2.1" + web3-eth-abi "1.2.1" + web3-utils "1.2.1" + +web3-eth-contract@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.11.tgz#917065902bc27ce89da9a1da26e62ef663663b90" + integrity sha512-MzYuI/Rq2o6gn7vCGcnQgco63isPNK5lMAan2E51AJLknjSLnOxwNY3gM8BcKoy4Z+v5Dv00a03Xuk78JowFow== + dependencies: + "@types/bn.js" "^4.11.5" + underscore "1.9.1" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-core-promievent "1.2.11" + web3-core-subscriptions "1.2.11" + web3-eth-abi "1.2.11" + web3-utils "1.2.11" + +web3-eth-contract@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.2.tgz#84e92714918a29e1028ee7718f0712536e14e9a1" + integrity sha512-EKT2yVFws3FEdotDQoNsXTYL798+ogJqR2//CaGwx3p0/RvQIgfzEwp8nbgA6dMxCsn9KOQi7OtklzpnJMkjtA== + dependencies: + "@types/bn.js" "^4.11.4" + underscore "1.9.1" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-core-promievent "1.2.2" + web3-core-subscriptions "1.2.2" + web3-eth-abi "1.2.2" + web3-utils "1.2.2" + +web3-eth-contract@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.5.2.tgz#ffbd799fd01e36596aaadefba323e24a98a23c2f" + integrity sha512-4B8X/IPFxZCTmtENpdWXtyw5fskf2muyc3Jm5brBQRb4H3lVh1/ZyQy7vOIkdphyaXu4m8hBLHzeyKkd37mOUg== + dependencies: + "@types/bn.js" "^4.11.5" + web3-core "1.5.2" + web3-core-helpers "1.5.2" + web3-core-method "1.5.2" + web3-core-promievent "1.5.2" + web3-core-subscriptions "1.5.2" + web3-eth-abi "1.5.2" + web3-utils "1.5.2" + +web3-eth-ens@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz#a0e52eee68c42a8b9865ceb04e5fb022c2d971d5" + integrity sha512-lhP1kFhqZr2nnbu3CGIFFrAnNxk2veXpOXBY48Tub37RtobDyHijHgrj+xTh+mFiPokyrapVjpFsbGa+Xzye4Q== + dependencies: + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-promievent "1.2.1" + web3-eth-abi "1.2.1" + web3-eth-contract "1.2.1" + web3-utils "1.2.1" + +web3-eth-ens@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.11.tgz#26d4d7f16d6cbcfff918e39832b939edc3162532" + integrity sha512-dbW7dXP6HqT1EAPvnniZVnmw6TmQEKF6/1KgAxbo8iBBYrVTMDGFQUUnZ+C4VETGrwwaqtX4L9d/FrQhZ6SUiA== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-promievent "1.2.11" + web3-eth-abi "1.2.11" + web3-eth-contract "1.2.11" + web3-utils "1.2.11" + +web3-eth-ens@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.2.tgz#0a4abed1d4cbdacbf5e1ab06e502d806d1192bc6" + integrity sha512-CFjkr2HnuyMoMFBoNUWojyguD4Ef+NkyovcnUc/iAb9GP4LHohKrODG4pl76R5u61TkJGobC2ij6TyibtsyVYg== + dependencies: + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-promievent "1.2.2" + web3-eth-abi "1.2.2" + web3-eth-contract "1.2.2" + web3-utils "1.2.2" + +web3-eth-ens@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.5.2.tgz#ecb3708f0e8e2e847e9d89e8428da12c30bba6a4" + integrity sha512-/UrLL42ZOCYge+BpFBdzG8ICugaRS4f6X7PxJKO+zAt+TwNgBpjuWfW/ZYNcuqJun/ZyfcTuj03TXqA1RlNhZQ== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + web3-core "1.5.2" + web3-core-helpers "1.5.2" + web3-core-promievent "1.5.2" + web3-eth-abi "1.5.2" + web3-eth-contract "1.5.2" + web3-utils "1.5.2" + +web3-eth-iban@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz#2c3801718946bea24e9296993a975c80b5acf880" + integrity sha512-9gkr4QPl1jCU+wkgmZ8EwODVO3ovVj6d6JKMos52ggdT2YCmlfvFVF6wlGLwi0VvNa/p+0BjJzaqxnnG/JewjQ== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.1" + +web3-eth-iban@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.11.tgz#f5f73298305bc7392e2f188bf38a7362b42144ef" + integrity sha512-ozuVlZ5jwFC2hJY4+fH9pIcuH1xP0HEFhtWsR69u9uDIANHLPQQtWYmdj7xQ3p2YT4bQLq/axKhZi7EZVetmxQ== + dependencies: + bn.js "^4.11.9" + web3-utils "1.2.11" + +web3-eth-iban@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.2.tgz#76bec73bad214df7c4192388979a59fc98b96c5a" + integrity sha512-gxKXBoUhaTFHr0vJB/5sd4i8ejF/7gIsbM/VvemHT3tF5smnmY6hcwSMmn7sl5Gs+83XVb/BngnnGkf+I/rsrQ== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.2" + +web3-eth-iban@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.5.2.tgz#f390ad244ef8a6c94de7c58736b0b80a484abc8e" + integrity sha512-C04YDXuSG/aDwOHSX+HySBGb0KraiAVt+/l1Mw7y/fCUrKC/K0yYzMYqY/uYOcvLtepBPsC4ZfUYWUBZ2PO8Vg== + dependencies: + bn.js "^4.11.9" + web3-utils "1.5.2" + +web3-eth-personal@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz#244e9911b7b482dc17c02f23a061a627c6e47faf" + integrity sha512-RNDVSiaSoY4aIp8+Hc7z+X72H7lMb3fmAChuSBADoEc7DsJrY/d0R5qQDK9g9t2BO8oxgLrLNyBP/9ub2Hc6Bg== + dependencies: + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-net "1.2.1" + web3-utils "1.2.1" + +web3-eth-personal@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.11.tgz#a38b3942a1d87a62070ce0622a941553c3d5aa70" + integrity sha512-42IzUtKq9iHZ8K9VN0vAI50iSU9tOA1V7XU2BhF/tb7We2iKBVdkley2fg26TxlOcKNEHm7o6HRtiiFsVK4Ifw== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-net "1.2.11" + web3-utils "1.2.11" + +web3-eth-personal@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.2.tgz#eee1c86a8132fa16b5e34c6d421ca92e684f0be6" + integrity sha512-4w+GLvTlFqW3+q4xDUXvCEMU7kRZ+xm/iJC8gm1Li1nXxwwFbs+Y+KBK6ZYtoN1qqAnHR+plYpIoVo27ixI5Rg== + dependencies: + "@types/node" "^12.6.1" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-net "1.2.2" + web3-utils "1.2.2" + +web3-eth-personal@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.5.2.tgz#043335a19ab59e119ba61e3bd6c3b8cde8120490" + integrity sha512-nH5N2GiVC0C5XeMEKU16PeFP3Hb3hkPvlR6Tf9WQ+pE+jw1c8eaXBO1CJQLr15ikhUF3s94ICyHcfjzkDsmRbA== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.5.2" + web3-core-helpers "1.5.2" + web3-core-method "1.5.2" + web3-net "1.5.2" + web3-utils "1.5.2" + +web3-eth@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.1.tgz#b9989e2557c73a9e8ffdc107c6dafbe72c79c1b0" + integrity sha512-/2xly4Yry5FW1i+uygPjhfvgUP/MS/Dk+PDqmzp5M88tS86A+j8BzKc23GrlA8sgGs0645cpZK/999LpEF5UdA== + dependencies: + underscore "1.9.1" + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-core-subscriptions "1.2.1" + web3-eth-abi "1.2.1" + web3-eth-accounts "1.2.1" + web3-eth-contract "1.2.1" + web3-eth-ens "1.2.1" + web3-eth-iban "1.2.1" + web3-eth-personal "1.2.1" + web3-net "1.2.1" + web3-utils "1.2.1" + +web3-eth@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.11.tgz#4c81fcb6285b8caf544058fba3ae802968fdc793" + integrity sha512-REvxW1wJ58AgHPcXPJOL49d1K/dPmuw4LjPLBPStOVkQjzDTVmJEIsiLwn2YeuNDd4pfakBwT8L3bz1G1/wVsQ== + dependencies: + underscore "1.9.1" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-core-subscriptions "1.2.11" + web3-eth-abi "1.2.11" + web3-eth-accounts "1.2.11" + web3-eth-contract "1.2.11" + web3-eth-ens "1.2.11" + web3-eth-iban "1.2.11" + web3-eth-personal "1.2.11" + web3-net "1.2.11" + web3-utils "1.2.11" + +web3-eth@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.2.tgz#65a1564634a23b990efd1655bf94ad513904286c" + integrity sha512-UXpC74mBQvZzd4b+baD4Ocp7g+BlwxhBHumy9seyE/LMIcMlePXwCKzxve9yReNpjaU16Mmyya6ZYlyiKKV8UA== + dependencies: + underscore "1.9.1" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-core-subscriptions "1.2.2" + web3-eth-abi "1.2.2" + web3-eth-accounts "1.2.2" + web3-eth-contract "1.2.2" + web3-eth-ens "1.2.2" + web3-eth-iban "1.2.2" + web3-eth-personal "1.2.2" + web3-net "1.2.2" + web3-utils "1.2.2" + +web3-eth@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.5.2.tgz#0f6470df60a2a7d04df4423ca7721db8ed5ad72b" + integrity sha512-DwWQ6TCOUqvYyo7T20S7HpQDPveNHNqOn2Q2F3E8ZFyEjmqT4XsGiwvm08kB/VgQ4e/ANyq/i8PPFSYMT8JKHg== + dependencies: + web3-core "1.5.2" + web3-core-helpers "1.5.2" + web3-core-method "1.5.2" + web3-core-subscriptions "1.5.2" + web3-eth-abi "1.5.2" + web3-eth-accounts "1.5.2" + web3-eth-contract "1.5.2" + web3-eth-ens "1.5.2" + web3-eth-iban "1.5.2" + web3-eth-personal "1.5.2" + web3-net "1.5.2" + web3-utils "1.5.2" + +web3-net@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.1.tgz#edd249503315dd5ab4fa00220f6509d95bb7ab10" + integrity sha512-Yt1Bs7WgnLESPe0rri/ZoPWzSy55ovioaP35w1KZydrNtQ5Yq4WcrAdhBzcOW7vAkIwrsLQsvA+hrOCy7mNauw== + dependencies: + web3-core "1.2.1" + web3-core-method "1.2.1" + web3-utils "1.2.1" + +web3-net@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.11.tgz#eda68ef25e5cdb64c96c39085cdb74669aabbe1b" + integrity sha512-sjrSDj0pTfZouR5BSTItCuZ5K/oZPVdVciPQ6981PPPIwJJkCMeVjD7I4zO3qDPCnBjBSbWvVnLdwqUBPtHxyg== + dependencies: + web3-core "1.2.11" + web3-core-method "1.2.11" + web3-utils "1.2.11" + +web3-net@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.2.tgz#5c3226ca72df7c591422440ce6f1203fd42ddad9" + integrity sha512-K07j2DXq0x4UOJgae65rWZKraOznhk8v5EGSTdFqASTx7vWE/m+NqBijBYGEsQY1lSMlVaAY9UEQlcXK5HzXTw== + dependencies: + web3-core "1.2.2" + web3-core-method "1.2.2" + web3-utils "1.2.2" + +web3-net@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.5.2.tgz#58915d7e2dad025d2a08f02c865f3abe61c48eff" + integrity sha512-VEc9c+jfoERhbJIxnx0VPlQDot8Lm4JW/tOWFU+ekHgIiu2zFKj5YxhURIth7RAbsaRsqCb79aE+M0eI8maxVQ== + dependencies: + web3-core "1.5.2" + web3-core-method "1.5.2" + web3-utils "1.5.2" + +web3-provider-engine@14.2.1: + version "14.2.1" + resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.2.1.tgz#ef351578797bf170e08d529cb5b02f8751329b95" + integrity sha512-iSv31h2qXkr9vrL6UZDm4leZMc32SjWJFGOp/D92JXfcEboCqraZyuExDkpxKw8ziTufXieNM7LSXNHzszYdJw== + dependencies: + async "^2.5.0" + backoff "^2.5.0" + clone "^2.0.0" + cross-fetch "^2.1.0" + eth-block-tracker "^3.0.0" + eth-json-rpc-infura "^3.1.0" + eth-sig-util "^1.4.2" + ethereumjs-block "^1.2.2" + ethereumjs-tx "^1.2.0" + ethereumjs-util "^5.1.5" + ethereumjs-vm "^2.3.4" + json-rpc-error "^2.0.0" + json-stable-stringify "^1.0.1" + promise-to-callback "^1.0.0" + readable-stream "^2.2.9" + request "^2.85.0" + semaphore "^1.0.3" + ws "^5.1.1" + xhr "^2.2.0" + xtend "^4.0.1" + +web3-providers-http@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.1.tgz#c93ea003a42e7b894556f7e19dd3540f947f5013" + integrity sha512-BDtVUVolT9b3CAzeGVA/np1hhn7RPUZ6YYGB/sYky+GjeO311Yoq8SRDUSezU92x8yImSC2B+SMReGhd1zL+bQ== + dependencies: + web3-core-helpers "1.2.1" + xhr2-cookies "1.1.0" + +web3-providers-http@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.11.tgz#1cd03442c61670572d40e4dcdf1faff8bd91e7c6" + integrity sha512-psh4hYGb1+ijWywfwpB2cvvOIMISlR44F/rJtYkRmQ5jMvG4FOCPlQJPiHQZo+2cc3HbktvvSJzIhkWQJdmvrA== + dependencies: + web3-core-helpers "1.2.11" + xhr2-cookies "1.1.0" + +web3-providers-http@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.2.tgz#155e55c1d69f4c5cc0b411ede40dea3d06720956" + integrity sha512-BNZ7Hguy3eBszsarH5gqr9SIZNvqk9eKwqwmGH1LQS1FL3NdoOn7tgPPdddrXec4fL94CwgNk4rCU+OjjZRNDg== + dependencies: + web3-core-helpers "1.2.2" + xhr2-cookies "1.1.0" + +web3-providers-http@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.5.2.tgz#94f95fe5572ca54aa2c2ffd42c63956436c9eb0a" + integrity sha512-dUNFJc9IMYDLZnkoQX3H4ZjvHjGO6VRVCqrBrdh84wPX/0da9dOA7DwIWnG0Gv3n9ybWwu5JHQxK4MNQ444lyA== + dependencies: + web3-core-helpers "1.5.2" + xhr2-cookies "1.1.0" + +web3-providers-ipc@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz#017bfc687a8fc5398df2241eb98f135e3edd672c" + integrity sha512-oPEuOCwxVx8L4CPD0TUdnlOUZwGBSRKScCz/Ws2YHdr9Ium+whm+0NLmOZjkjQp5wovQbyBzNa6zJz1noFRvFA== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.1" + +web3-providers-ipc@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.11.tgz#d16d6c9be1be6e0b4f4536c4acc16b0f4f27ef21" + integrity sha512-yhc7Y/k8hBV/KlELxynWjJDzmgDEDjIjBzXK+e0rHBsYEhdCNdIH5Psa456c+l0qTEU2YzycF8VAjYpWfPnBpQ== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.11" + +web3-providers-ipc@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.2.tgz#c6d165a12bc68674b4cdd543ea18aec79cafc2e8" + integrity sha512-t97w3zi5Kn/LEWGA6D9qxoO0LBOG+lK2FjlEdCwDQatffB/+vYrzZ/CLYVQSoyFZAlsDoBasVoYSWZK1n39aHA== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.2" + +web3-providers-ipc@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.5.2.tgz#68a516883c998eeddf60df4cead77baca4fb4aaa" + integrity sha512-SJC4Sivt4g9LHKlRy7cs1jkJgp7bjrQeUndE6BKs0zNALKguxu6QYnzbmuHCTFW85GfMDjhvi24jyyZHMnBNXQ== + dependencies: + oboe "2.1.5" + web3-core-helpers "1.5.2" + +web3-providers-ws@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz#2d941eaf3d5a8caa3214eff8dc16d96252b842cb" + integrity sha512-oqsQXzu+ejJACVHy864WwIyw+oB21nw/pI65/sD95Zi98+/HQzFfNcIFneF1NC4bVF3VNX4YHTNq2I2o97LAiA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.1" + websocket "github:web3-js/WebSocket-Node#polyfill/globalThis" + +web3-providers-ws@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.11.tgz#a1dfd6d9778d840561d9ec13dd453046451a96bb" + integrity sha512-ZxnjIY1Er8Ty+cE4migzr43zA/+72AF1myzsLaU5eVgdsfV7Jqx7Dix1hbevNZDKFlSoEyq/3j/jYalh3So1Zg== + dependencies: + eventemitter3 "4.0.4" + underscore "1.9.1" + web3-core-helpers "1.2.11" + websocket "^1.0.31" + +web3-providers-ws@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.2.tgz#d2c05c68598cea5ad3fa6ef076c3bcb3ca300d29" + integrity sha512-Wb1mrWTGMTXOpJkL0yGvL/WYLt8fUIXx8k/l52QB2IiKzvyd42dTWn4+j8IKXGSYYzOm7NMqv6nhA5VDk12VfA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.2" + websocket "github:web3-js/WebSocket-Node#polyfill/globalThis" + +web3-providers-ws@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.5.2.tgz#d336a93ed608b40cdcadfadd1f1bc8d32ea046e0" + integrity sha512-xy9RGlyO8MbJDuKv2vAMDkg+en+OvXG0CGTCM2BTl6l1vIdHpCa+6A/9KV2rK8aU9OBZ7/Pf+Y19517kHVl9RA== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.5.2" + websocket "^1.0.32" + +web3-shh@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.1.tgz#4460e3c1e07faf73ddec24ccd00da46f89152b0c" + integrity sha512-/3Cl04nza5kuFn25bV3FJWa0s3Vafr5BlT933h26xovQ6HIIz61LmvNQlvX1AhFL+SNJOTcQmK1SM59vcyC8bA== + dependencies: + web3-core "1.2.1" + web3-core-method "1.2.1" + web3-core-subscriptions "1.2.1" + web3-net "1.2.1" + +web3-shh@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.11.tgz#f5d086f9621c9a47e98d438010385b5f059fd88f" + integrity sha512-B3OrO3oG1L+bv3E1sTwCx66injW1A8hhwpknDUbV+sw3fehFazA06z9SGXUefuFI1kVs4q2vRi0n4oCcI4dZDg== + dependencies: + web3-core "1.2.11" + web3-core-method "1.2.11" + web3-core-subscriptions "1.2.11" + web3-net "1.2.11" + +web3-shh@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.2.tgz#44ed998f2a6ba0ec5cb9d455184a0f647826a49c" + integrity sha512-og258NPhlBn8yYrDWjoWBBb6zo1OlBgoWGT+LL5/LPqRbjPe09hlOYHgscAAr9zZGtohTOty7RrxYw6Z6oDWCg== + dependencies: + web3-core "1.2.2" + web3-core-method "1.2.2" + web3-core-subscriptions "1.2.2" + web3-net "1.2.2" + +web3-shh@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.5.2.tgz#a72a3d903c0708a004db94a72d934a302d880aea" + integrity sha512-wOxOcYt4Sa0AHAI8gG7RulCwVuVjSRS/M/AbFsea3XfJdN6sU13/syY7OdZNjNYuKjYTzxKYrd3dU/K2iqffVw== + dependencies: + web3-core "1.5.2" + web3-core-method "1.5.2" + web3-core-subscriptions "1.5.2" + web3-net "1.5.2" + +web3-utils@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.1.tgz#21466e38291551de0ab34558de21512ac4274534" + integrity sha512-Mrcn3l58L+yCKz3zBryM6JZpNruWuT0OCbag8w+reeNROSGVlXzUQkU+gtAwc9JCZ7tKUyg67+2YUGqUjVcyBA== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randomhex "0.1.5" + underscore "1.9.1" + utf8 "3.0.0" + +web3-utils@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.11.tgz#af1942aead3fb166ae851a985bed8ef2c2d95a82" + integrity sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ== + dependencies: + bn.js "^4.11.9" + eth-lib "0.2.8" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + +web3-utils@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.2.tgz#b53a08c40d2c3f31d3c4a28e7d749405df99c8c0" + integrity sha512-joF+s3243TY5cL7Z7y4h1JsJpUCf/kmFmj+eJar7Y2yNIGVcW961VyrAms75tjUysSuHaUQ3eQXjBEUJueT52A== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + +web3-utils@1.5.2, web3-utils@^1.0.0-beta.31, web3-utils@^1.2.5, web3-utils@^1.3.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.5.2.tgz#150982dcb1918ffc54eba87528e28f009ebc03aa" + integrity sha512-quTtTeQJHYSxAwIBOCGEcQtqdVcFWX6mCFNoqnp+mRbq+Hxbs8CGgO/6oqfBx4OvxIOfCpgJWYVHswRXnbEu9Q== + dependencies: + bn.js "^4.11.9" + eth-lib "0.2.8" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + utf8 "3.0.0" + +web3@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.1.tgz#5d8158bcca47838ab8c2b784a2dee4c3ceb4179b" + integrity sha512-nNMzeCK0agb5i/oTWNdQ1aGtwYfXzHottFP2Dz0oGIzavPMGSKyVlr8ibVb1yK5sJBjrWVnTdGaOC2zKDFuFRw== + dependencies: + web3-bzz "1.2.1" + web3-core "1.2.1" + web3-eth "1.2.1" + web3-eth-personal "1.2.1" + web3-net "1.2.1" + web3-shh "1.2.1" + web3-utils "1.2.1" + +web3@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.11.tgz#50f458b2e8b11aa37302071c170ed61cff332975" + integrity sha512-mjQ8HeU41G6hgOYm1pmeH0mRAeNKJGnJEUzDMoerkpw7QUQT4exVREgF1MYPvL/z6vAshOXei25LE/t/Bxl8yQ== + dependencies: + web3-bzz "1.2.11" + web3-core "1.2.11" + web3-eth "1.2.11" + web3-eth-personal "1.2.11" + web3-net "1.2.11" + web3-shh "1.2.11" + web3-utils "1.2.11" + +web3@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.2.tgz#b1b8b69aafdf94cbaeadbb68a8aa1df2ef266aec" + integrity sha512-/ChbmB6qZpfGx6eNpczt5YSUBHEA5V2+iUCbn85EVb3Zv6FVxrOo5Tv7Lw0gE2tW7EEjASbCyp3mZeiZaCCngg== + dependencies: + "@types/node" "^12.6.1" + web3-bzz "1.2.2" + web3-core "1.2.2" + web3-eth "1.2.2" + web3-eth-personal "1.2.2" + web3-net "1.2.2" + web3-shh "1.2.2" + web3-utils "1.2.2" + +web3@1.5.2, web3@^1.2.4, web3@^1.2.5: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.5.2.tgz#736ca2f39048c63964203dd811f519400973e78d" + integrity sha512-aapKLdO8t7Cos6tZLeeQUtCJvTiPMlLcHsHHDLSBZ/VaJEucSTxzun32M8sp3BmF4waDEmhY+iyUM1BKvtAcVQ== + dependencies: + web3-bzz "1.5.2" + web3-core "1.5.2" + web3-eth "1.5.2" + web3-eth-personal "1.5.2" + web3-net "1.5.2" + web3-shh "1.5.2" + web3-utils "1.5.2" + +webpack-sources@^1.0.1, webpack-sources@^1.4.0, webpack-sources@^1.4.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" + integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack@^3.0.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.12.0.tgz#3f9e34360370602fcf639e97939db486f4ec0d74" + integrity sha512-Sw7MdIIOv/nkzPzee4o0EdvCuPmxT98+vVpIvwtcwcF1Q4SDSNp92vwcKc4REe7NItH9f1S4ra9FuQ7yuYZ8bQ== + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^2.0.0" + ajv "^6.1.0" + ajv-keywords "^3.1.0" + async "^2.1.2" + enhanced-resolve "^3.4.0" + escope "^3.6.0" + interpret "^1.0.0" + json-loader "^0.5.4" + json5 "^0.5.1" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + mkdirp "~0.5.0" + node-libs-browser "^2.0.0" + source-map "^0.5.3" + supports-color "^4.2.1" + tapable "^0.2.7" + uglifyjs-webpack-plugin "^0.4.6" + watchpack "^1.4.0" + webpack-sources "^1.0.1" + yargs "^8.0.2" + +webpack@^4.29.5: + version "4.46.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.46.0.tgz#bf9b4404ea20a073605e0a011d188d77cb6ad542" + integrity sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/wasm-edit" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + acorn "^6.4.1" + ajv "^6.10.2" + ajv-keywords "^3.4.1" + chrome-trace-event "^1.0.2" + enhanced-resolve "^4.5.0" + eslint-scope "^4.0.3" + json-parse-better-errors "^1.0.2" + loader-runner "^2.4.0" + loader-utils "^1.2.3" + memory-fs "^0.4.1" + micromatch "^3.1.10" + mkdirp "^0.5.3" + neo-async "^2.6.1" + node-libs-browser "^2.2.1" + schema-utils "^1.0.0" + tapable "^1.1.3" + terser-webpack-plugin "^1.4.3" + watchpack "^1.7.4" + webpack-sources "^1.4.1" + +websocket-driver@>=0.5.1: + version "0.7.4" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== + dependencies: + http-parser-js ">=0.5.1" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== + +websocket@1.0.32: + version "1.0.32" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.32.tgz#1f16ddab3a21a2d929dec1687ab21cfdc6d3dbb1" + integrity sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + +websocket@^1.0.31, websocket@^1.0.32: + version "1.0.34" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" + integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + +"websocket@github:web3-js/WebSocket-Node#polyfill/globalThis": + version "1.0.29" + resolved "https://codeload.github.com/web3-js/WebSocket-Node/tar.gz/ef5ea2f41daf4a2113b80c9223df884b4d56c400" + dependencies: + debug "^2.2.0" + es5-ext "^0.10.50" + nan "^2.14.0" + typedarray-to-buffer "^3.1.5" + yaeti "^0.0.6" + +whatwg-fetch@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which-typed-array@^1.1.2: + version "1.1.7" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.7.tgz#2761799b9a22d4b8660b3c1b40abaa7739691793" + integrity sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-abstract "^1.18.5" + foreach "^2.0.5" + has-tostringtag "^1.0.0" + is-typed-array "^1.1.7" + +which@1.3.1, which@^1.1.1, which@^1.2.9, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= + +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= + +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + +worker-farm@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" + integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== + dependencies: + errno "~0.1.7" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write-file-atomic@^2.0.0: + version "2.4.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" + integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +ws@^3.0.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" + integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== + dependencies: + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" + +ws@^5.1.1: + version "5.2.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.3.tgz#05541053414921bc29c63bee14b8b0dd50b07b3d" + integrity sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA== + dependencies: + async-limiter "~1.0.0" + +ws@^7.4.6: + version "7.5.4" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.4.tgz#56bfa20b167427e138a7795de68d134fe92e21f9" + integrity sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg== + +xdg-basedir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" + integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ= + +xhr-request-promise@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" + integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== + dependencies: + xhr-request "^1.1.0" + +xhr-request@^1.0.1, xhr-request@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" + integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== + dependencies: + buffer-to-arraybuffer "^0.0.5" + object-assign "^4.1.1" + query-string "^5.0.1" + simple-get "^2.7.0" + timed-out "^4.0.1" + url-set-query "^1.0.0" + xhr "^2.0.4" + +xhr2-cookies@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz#7d77449d0999197f155cb73b23df72505ed89d48" + integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg= + dependencies: + cookiejar "^2.1.1" + +xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: + version "2.6.0" + resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" + integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== + dependencies: + global "~4.4.0" + is-function "^1.0.1" + parse-headers "^2.0.0" + xtend "^4.0.0" + +xmlhttprequest@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" + integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= + +xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +xtend@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" + integrity sha1-bv7MKk2tjmlixJAbM3znuoe10os= + dependencies: + object-keys "~0.4.0" + +y18n@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== + +y18n@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== + +yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" + integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + integrity sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ= + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + integrity sha1-jQrELxbqVd69MyyvTEA4s+P139k= + dependencies: + camelcase "^4.1.0" + +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + dependencies: + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" + +yargs@13.2.4: + version "13.2.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + +yargs@13.3.2, yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yargs@^4.7.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" + integrity sha1-wMQpJMpKqmsObaFznfshZDn53cA= + dependencies: + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.1" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.1" + +yargs@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" + integrity sha1-YpmpBVsc78lp/355wdkY3Osiw2A= + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + +yauzl@^2.4.2: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0"